Patchwork [2/3] powerpc e500: set -mfloat-gprs=double

login
register
mail settings
Submitter Christopher Larson
Date March 27, 2012, 7:51 p.m.
Message ID <1332877869-12195-2-git-send-email-kergoth@gmail.com>
Download mbox | patch
Permalink /patch/24679/
State Accepted
Commit 32bb6afe3e6f3e374e4d14edc238b46a90d44169
Headers show

Comments

Christopher Larson - March 27, 2012, 7:51 p.m.
From: Christopher Larson <chris_larson@mentor.com>

Use of FPRs instead of GPRs is incompatible with e500/SPE, so let's be
explicit about the use of GPRs to avoid potential errors. For example, with
the Sourcery G++ toolchain, one can hit: conftest.c:1:0: error: E500 and FPRs
not supported.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/conf/machine/include/tune-ppce500.inc   |    2 +-
 meta/conf/machine/include/tune-ppce500v2.inc |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Khem Raj - April 7, 2012, 5:40 a.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/27/2012 12:51 PM, Christopher Larson wrote:
> From: Christopher Larson <chris_larson@mentor.com>
> 
> Use of FPRs instead of GPRs is incompatible with e500/SPE, so let's
> be explicit about the use of GPRs to avoid potential errors. For
> example, with the Sourcery G++ toolchain, one can hit:
> conftest.c:1:0: error: E500 and FPRs not supported.
> 
> Signed-off-by: Christopher Larson <chris_larson@mentor.com> --- 
> meta/conf/machine/include/tune-ppce500.inc   |    2 +- 
> meta/conf/machine/include/tune-ppce500v2.inc |    2 +- 2 files
> changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/conf/machine/include/tune-ppce500.inc
> b/meta/conf/machine/include/tune-ppce500.inc index 1326720..feb1967
> 100644 --- a/meta/conf/machine/include/tune-ppce500.inc +++
> b/meta/conf/machine/include/tune-ppce500.inc @@ -7,7 +7,7 @@
> TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce500",
> "-mcpu=8540", " TUNE_PKGARCH_tune-ppce500 = "ppce500"
> 
> TUNEVALID[spe] = "Enable SPE ABI extensions" -TUNE_CCARGS +=
> "${@bb.utils.contains("TUNE_FEATURES", "spe", "-mabi=spe -mspe",
> "", d)}" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES",
> "spe", "-mabi=spe -mspe -mfloat-gprs=double", "", d)}"
> 

IIRC e500v1 does not have double precision floating point support.


> TARGET_FPU = "ppc-efs"
> 
> diff --git a/meta/conf/machine/include/tune-ppce500v2.inc
> b/meta/conf/machine/include/tune-ppce500v2.inc index
> e7b51c6..f0158d0 100644 ---
> a/meta/conf/machine/include/tune-ppce500v2.inc +++
> b/meta/conf/machine/include/tune-ppce500v2.inc @@ -7,7 +7,7 @@
> TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce500v2",
> "-mcpu=8548", TUNE_PKGARCH_tune-ppce500v2 = "ppce500v2"
> 
> TUNEVALID[spe] = "Enable SPE ABI extensions" -TUNE_CCARGS +=
> "${@bb.utils.contains("TUNE_FEATURES", "spe", "-mabi=spe -mspe",
> "", d)}" +TUNE_CCARGS += '${@bb.utils.contains("TUNE_FEATURES",
> "spe", "-mabi=spe -mspe -mfloat-gprs=double", "", d)}'
> 
> TARGET_FPU = "ppc-efd"
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9/0zkACgkQuwUzVZGdMxTMYQCfbnz0j7H+ypE8hRTHoQOuLaCR
PcwAn3H5jeibd9N4TzKQdyYh9MiwV0F9
=J93c
-----END PGP SIGNATURE-----
Chris Larson - April 7, 2012, 4:12 p.m.
On Fri, Apr 6, 2012 at 10:40 PM, Khem Raj <raj.khem@gmail.com> wrote:
> On 03/27/2012 12:51 PM, Christopher Larson wrote:
>> From: Christopher Larson <chris_larson@mentor.com>
>>
>> Use of FPRs instead of GPRs is incompatible with e500/SPE, so let's
>> be explicit about the use of GPRs to avoid potential errors. For
>> example, with the Sourcery G++ toolchain, one can hit:
>> conftest.c:1:0: error: E500 and FPRs not supported.
>>
>> Signed-off-by: Christopher Larson <chris_larson@mentor.com> ---
>> meta/conf/machine/include/tune-ppce500.inc   |    2 +-
>> meta/conf/machine/include/tune-ppce500v2.inc |    2 +- 2 files
>> changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/conf/machine/include/tune-ppce500.inc
>> b/meta/conf/machine/include/tune-ppce500.inc index 1326720..feb1967
>> 100644 --- a/meta/conf/machine/include/tune-ppce500.inc +++
>> b/meta/conf/machine/include/tune-ppce500.inc @@ -7,7 +7,7 @@
>> TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce500",
>> "-mcpu=8540", " TUNE_PKGARCH_tune-ppce500 = "ppce500"
>>
>> TUNEVALID[spe] = "Enable SPE ABI extensions" -TUNE_CCARGS +=
>> "${@bb.utils.contains("TUNE_FEATURES", "spe", "-mabi=spe -mspe",
>> "", d)}" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES",
>> "spe", "-mabi=spe -mspe -mfloat-gprs=double", "", d)}"
>>
>
> IIRC e500v1 does not have double precision floating point support.

Yeah, I know, I sent a later patch to fix it, but Mark already fixed
it in his tuning rework. :)

Patch

diff --git a/meta/conf/machine/include/tune-ppce500.inc b/meta/conf/machine/include/tune-ppce500.inc
index 1326720..feb1967 100644
--- a/meta/conf/machine/include/tune-ppce500.inc
+++ b/meta/conf/machine/include/tune-ppce500.inc
@@ -7,7 +7,7 @@  TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce500", "-mcpu=8540", "
 TUNE_PKGARCH_tune-ppce500 = "ppce500"
 
 TUNEVALID[spe] = "Enable SPE ABI extensions"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "spe", "-mabi=spe -mspe", "", d)}"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "spe", "-mabi=spe -mspe -mfloat-gprs=double", "", d)}"
 
 TARGET_FPU = "ppc-efs"
 
diff --git a/meta/conf/machine/include/tune-ppce500v2.inc b/meta/conf/machine/include/tune-ppce500v2.inc
index e7b51c6..f0158d0 100644
--- a/meta/conf/machine/include/tune-ppce500v2.inc
+++ b/meta/conf/machine/include/tune-ppce500v2.inc
@@ -7,7 +7,7 @@  TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce500v2", "-mcpu=8548",
 TUNE_PKGARCH_tune-ppce500v2 = "ppce500v2"
 
 TUNEVALID[spe] = "Enable SPE ABI extensions"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "spe", "-mabi=spe -mspe", "", d)}"
+TUNE_CCARGS += '${@bb.utils.contains("TUNE_FEATURES", "spe", "-mabi=spe -mspe -mfloat-gprs=double", "", d)}'
 
 TARGET_FPU = "ppc-efd"