diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2004-06-03 11:46:34 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2004-06-03 11:46:34 +0000 |
commit | c8a3b559eb7f26309b473fd6dd9fc11b10de7001 (patch) | |
tree | d33c511813624c416de2ae9cc7651e7e206bf3c2 /gdb/sh-tdep.c | |
parent | 498d4a71555fcec47e4a03cbc0983db262f08ba6 (diff) | |
download | ppe42-binutils-c8a3b559eb7f26309b473fd6dd9fc11b10de7001.tar.gz ppe42-binutils-c8a3b559eb7f26309b473fd6dd9fc11b10de7001.zip |
* sh-tdep.c (sh3e_sh4_store_return_value): Correctly store
double values in little endian mode.
Diffstat (limited to 'gdb/sh-tdep.c')
-rw-r--r-- | gdb/sh-tdep.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 45833fcfda..d8b29c924a 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); |