aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2004-06-03 11:46:34 +0000
committerCorinna Vinschen <corinna@vinschen.de>2004-06-03 11:46:34 +0000
commitc8a3b559eb7f26309b473fd6dd9fc11b10de7001 (patch)
treed33c511813624c416de2ae9cc7651e7e206bf3c2
parent498d4a71555fcec47e4a03cbc0983db262f08ba6 (diff)
downloadgdb-c8a3b559eb7f26309b473fd6dd9fc11b10de7001.zip
gdb-c8a3b559eb7f26309b473fd6dd9fc11b10de7001.tar.gz
gdb-c8a3b559eb7f26309b473fd6dd9fc11b10de7001.tar.bz2
* sh-tdep.c (sh3e_sh4_store_return_value): Correctly store
double values in little endian mode.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/sh-tdep.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e1b2b2a..6e380db 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2004-06-03 Corinna Vinschen <vinschen@redhat.com>
+
+ * sh-tdep.c (sh3e_sh4_store_return_value): Correctly store
+ double values in little endian mode.
+
2004-06-02 Albert Chin-A-Young <china@thewrittenword.com>
Committed by Andrew Cagney.
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 45833fc..d8b29c9 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1147,7 +1147,11 @@ sh3e_sh4_store_return_value (struct type *type, struct regcache *regcache,
int len = TYPE_LENGTH (type);
int i, regnum = FP0_REGNUM;
for (i = 0; i < len; i += 4)
- regcache_raw_write (regcache, regnum++, (char *) valbuf + i);
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
+ regcache_raw_write (regcache, regnum++,
+ (char *) valbuf + len - 4 - i);
+ else
+ regcache_raw_write (regcache, regnum++, (char *) valbuf + i);
}
else
sh_default_store_return_value (type, regcache, valbuf);