aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2012-09-27 10:40:01 +0000
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2012-09-27 10:40:01 +0000
commitbad43aa52e2d7018830ae79c522f74b4dc3260e4 (patch)
treee3b8a6d81c3fa243cf0173de35bca957e7643612 /gdb/h8300-tdep.c
parent * gdbtypes.c (lookup_array_range_type): Expand parameters (diff)
downloadbinutils-gdb-bad43aa52e2d7018830ae79c522f74b4dc3260e4.tar.gz
binutils-gdb-bad43aa52e2d7018830ae79c522f74b4dc3260e4.tar.bz2
binutils-gdb-bad43aa52e2d7018830ae79c522f74b4dc3260e4.zip
* amd64-tdep.c (amd64_return_value): Revert previous change
that used TYPE_LENGTH directly. * bfin-tdep.c (bfin_extract_return_value): Likewise. (bfin_store_return_value): Likewise. * cris-tdep.c (cris_store_return_value): Likewise. (cris_extract_return_value): Likewise. * h8300-tdep.c (h8300_extract_return_value): Likewise. * hppa-tdep.c (hppa64_return_value): Likewise. * lm32-tdep.c (lm32_store_return_value): Likewise. * microblaze-tdep.c (microblaze_store_return_value): Likewise. * spu-tdep.c (spu_value_from_register): Likewise. * vax-tdep.c (vax_return_value): Likewise.
Diffstat (limited to 'gdb/h8300-tdep.c')
-rw-r--r--gdb/h8300-tdep.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index bcb5b342cf7..4e98a8f7128 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -751,12 +751,12 @@ h8300_extract_return_value (struct type *type, struct regcache *regcache,
int len = TYPE_LENGTH (type);
ULONGEST c, addr;
- switch (TYPE_LENGTH (type))
+ switch (len)
{
case 1:
case 2:
regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
- store_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order, c);
+ store_unsigned_integer (valbuf, len, byte_order, c);
break;
case 4: /* Needs two registers on plain H8/300 */
regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
@@ -768,9 +768,8 @@ h8300_extract_return_value (struct type *type, struct regcache *regcache,
if (TYPE_CODE (type) == TYPE_CODE_INT)
{
regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &addr);
- c = read_memory_unsigned_integer ((CORE_ADDR) addr,
- TYPE_LENGTH (type), byte_order);
- store_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order, c);
+ c = read_memory_unsigned_integer ((CORE_ADDR) addr, len, byte_order);
+ store_unsigned_integer (valbuf, len, byte_order, c);
}
else
{