summaryrefslogtreecommitdiff
path: root/gdb/m68k-tdep.c
diff options
context:
space:
mode:
authorsiddhesh <siddhesh>2012-09-17 08:52:17 +0000
committersiddhesh <siddhesh>2012-09-17 08:52:17 +0000
commit681192e9b601c8312d6d021dc4befb8c3c94d6b4 (patch)
tree8dcb1f0c4e4aa52f03d7105b0e336cb901843796 /gdb/m68k-tdep.c
parentac6e6b6e4182a5fd3dfc50504fa4a5fe543faa41 (diff)
downloadgdb-681192e9b601c8312d6d021dc4befb8c3c94d6b4.tar.gz
* 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 b507c378659..b45a80f3f21 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);