aboutsummaryrefslogtreecommitdiff
path: root/gdb/lm32-tdep.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2012-09-26 07:52:48 +0000
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2012-09-26 07:52:48 +0000
commit8f8a23a2c397294ab562c6cf7020679f85b921ec (patch)
tree778b8da141ef8d1736fcf57813d8350844636760 /gdb/lm32-tdep.c
parent8ae551cf475ac573cd7d43ad46cfb81c52e58f6e (diff)
downloadgdb-8f8a23a2c397294ab562c6cf7020679f85b921ec.zip
gdb-8f8a23a2c397294ab562c6cf7020679f85b921ec.tar.gz
gdb-8f8a23a2c397294ab562c6cf7020679f85b921ec.tar.bz2
* amd64-tdep.c (amd64_return_value): Use 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/lm32-tdep.c')
-rw-r--r--gdb/lm32-tdep.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c
index 725ce5b..dd5eae8 100644
--- a/gdb/lm32-tdep.c
+++ b/gdb/lm32-tdep.c
@@ -349,18 +349,18 @@ lm32_store_return_value (struct type *type, struct regcache *regcache,
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST val;
- int len = TYPE_LENGTH (type);
- if (len <= 4)
+ if (TYPE_LENGTH (type) <= 4)
{
- val = extract_unsigned_integer (valbuf, len, byte_order);
+ val = extract_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order);
regcache_cooked_write_unsigned (regcache, SIM_LM32_R1_REGNUM, val);
}
- else if (len <= 8)
+ else if (TYPE_LENGTH (type) <= 8)
{
val = extract_unsigned_integer (valbuf, 4, byte_order);
regcache_cooked_write_unsigned (regcache, SIM_LM32_R1_REGNUM, val);
- val = extract_unsigned_integer (valbuf + 4, len - 4, byte_order);
+ val = extract_unsigned_integer (valbuf + 4, TYPE_LENGTH (type) - 4,
+ byte_order);
regcache_cooked_write_unsigned (regcache, SIM_LM32_R2_REGNUM, val);
}
else