aboutsummaryrefslogtreecommitdiff
path: root/libffi/src
diff options
context:
space:
mode:
authorAndreas Tobler <a.tobler@schweiz.org>2007-11-16 23:24:53 +0000
committerAndreas Tobler <andreast@gcc.gnu.org>2007-11-17 00:24:53 +0100
commite84296c66c1d63552db6dd6571edd92619a00e53 (patch)
treebc0fd671d12c5cacb37413d21af623ab8d556f19 /libffi/src
parentf5fd0cf12def6df8ac3c6a95e886c73debc21677 (diff)
downloadgcc-e84296c66c1d63552db6dd6571edd92619a00e53.zip
gcc-e84296c66c1d63552db6dd6571edd92619a00e53.tar.gz
gcc-e84296c66c1d63552db6dd6571edd92619a00e53.tar.bz2
sysv.S: Load correct cr to compare if we have long double.
2007-11-17 Andreas Tobler <a.tobler@schweiz.org> * src/powerpc/sysv.S: Load correct cr to compare if we have long double. * src/powerpc/linux64.S: Likewise. * src/powerpc/ffi.c: Add a comment to show which part goes into cr6. * testsuite/libffi.call/return_ldl.c: New test. From-SVN: r130247
Diffstat (limited to 'libffi/src')
-rw-r--r--libffi/src/powerpc/ffi.c3
-rw-r--r--libffi/src/powerpc/linux64.S1
-rw-r--r--libffi/src/powerpc/sysv.S1
3 files changed, 4 insertions, 1 deletions
diff --git a/libffi/src/powerpc/ffi.c b/libffi/src/powerpc/ffi.c
index fe5550d..eaa4c86 100644
--- a/libffi/src/powerpc/ffi.c
+++ b/libffi/src/powerpc/ffi.c
@@ -40,7 +40,8 @@ enum {
FLAG_RETURNS_NOTHING = 1 << (31-30), /* These go in cr7 */
FLAG_RETURNS_FP = 1 << (31-29),
FLAG_RETURNS_64BITS = 1 << (31-28),
- FLAG_RETURNS_128BITS = 1 << (31-27),
+
+ FLAG_RETURNS_128BITS = 1 << (31-27), /* cr6 */
FLAG_ARG_NEEDS_COPY = 1 << (31- 7),
FLAG_FP_ARGUMENTS = 1 << (31- 6), /* cr1.eq; specified by ABI */
diff --git a/libffi/src/powerpc/linux64.S b/libffi/src/powerpc/linux64.S
index dbfcc7b..2cfebbf 100644
--- a/libffi/src/powerpc/linux64.S
+++ b/libffi/src/powerpc/linux64.S
@@ -125,6 +125,7 @@ ffi_call_LINUX64:
.Lfp_return_value:
bf 28, .Lfloat_return_value
stfd %f1, 0(%r30)
+ mtcrf 0x02, %r31 /* cr6 */
bf 27, .Ldone_return_value
stfd %f2, 8(%r30)
b .Ldone_return_value
diff --git a/libffi/src/powerpc/sysv.S b/libffi/src/powerpc/sysv.S
index 9a9a109..9682016 100644
--- a/libffi/src/powerpc/sysv.S
+++ b/libffi/src/powerpc/sysv.S
@@ -121,6 +121,7 @@ L(done_return_value):
L(fp_return_value):
bf 28,L(float_return_value)
stfd %f1,0(%r30)
+ mtcrf 0x02,%r31 /* cr6 */
bf 27,L(done_return_value)
stfd %f2,8(%r30)
b L(done_return_value)