aboutsummaryrefslogtreecommitdiff
path: root/gdb/m68k-tdep.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2012-09-17 08:52:18 +0000
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2012-09-17 08:52:18 +0000
commit354ecfd5f7127b2a8aee435e081067d602fb177b (patch)
tree64d2bae4a7f5b9b0c5c820eac55ac84a7ce6e378 /gdb/m68k-tdep.c
parent6fc1c7733ea454110cfcb02be7d9b4b0f12eca91 (diff)
downloadgdb-354ecfd5f7127b2a8aee435e081067d602fb177b.zip
gdb-354ecfd5f7127b2a8aee435e081067d602fb177b.tar.gz
gdb-354ecfd5f7127b2a8aee435e081067d602fb177b.tar.bz2
* m2-valprint.c (m2_print_array_contents): Eliminate variable
ELTLEN and use TYPE_LENGTH directly. (m2_val_print): Likewise. * m68k-tdep.c (m68k_svr4_extract_return_value): Eliminate variable LEN and use TYPE_LENGTH directly. (m68k_svr4_store_return_value): Likewise. * mips-tdep.c (mips_o32_push_dummy_call): Eliminate variable ARGLEN and use TYPE_LENGTH directly. (mips_o64_push_dummy_call): Likewise. * s390-tdep (s390_function_arg_pass_by_reference): Eliminate variable LENGTH and use TYPE_LENGTH directly. (s390_function_arg_float): Likewise. (s390_function_arg_integer): Likewise. (s390_push_dummy_call): Likewise. (s390_return_value_convention): Likewise. * spu-tdep.c (spu_push_dummy_call): Eliminate LEN and use TYPE_LENGTH directly.
Diffstat (limited to 'gdb/m68k-tdep.c')
-rw-r--r--gdb/m68k-tdep.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index b507c37..b45a80f 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -315,7 +315,6 @@ static void
m68k_svr4_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *valbuf)
{
- int len = TYPE_LENGTH (type);
gdb_byte buf[M68K_MAX_REGISTER_SIZE];
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@@ -326,7 +325,7 @@ m68k_svr4_extract_return_value (struct type *type, struct regcache *regcache,
regcache_raw_read (regcache, M68K_FP0_REGNUM, buf);
convert_typed_floating (buf, fpreg_type, valbuf, type);
}
- else if (TYPE_CODE (type) == TYPE_CODE_PTR && len == 4)
+ else if (TYPE_CODE (type) == TYPE_CODE_PTR && TYPE_LENGTH (type) == 4)
regcache_raw_read (regcache, M68K_A0_REGNUM, valbuf);
else
m68k_extract_return_value (type, regcache, valbuf);
@@ -357,7 +356,6 @@ static void
m68k_svr4_store_return_value (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
- int len = TYPE_LENGTH (type);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@@ -368,7 +366,7 @@ m68k_svr4_store_return_value (struct type *type, struct regcache *regcache,
convert_typed_floating (valbuf, type, buf, fpreg_type);
regcache_raw_write (regcache, M68K_FP0_REGNUM, buf);
}
- else if (TYPE_CODE (type) == TYPE_CODE_PTR && len == 4)
+ else if (TYPE_CODE (type) == TYPE_CODE_PTR && TYPE_LENGTH (type) == 4)
{
regcache_raw_write (regcache, M68K_A0_REGNUM, valbuf);
regcache_raw_write (regcache, M68K_D0_REGNUM, valbuf);