aboutsummaryrefslogtreecommitdiff
path: root/gdb/s390-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/s390-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/s390-tdep.c')
-rw-r--r--gdb/s390-tdep.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 620eaea..ed06740 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -2489,8 +2489,7 @@ is_power_of_two (unsigned int n)
static int
s390_function_arg_pass_by_reference (struct type *type)
{
- unsigned length = TYPE_LENGTH (type);
- if (length > 8)
+ if (TYPE_LENGTH (type) > 8)
return 1;
return (is_struct_like (type) && !is_power_of_two (TYPE_LENGTH (type)))
@@ -2503,8 +2502,7 @@ s390_function_arg_pass_by_reference (struct type *type)
static int
s390_function_arg_float (struct type *type)
{
- unsigned length = TYPE_LENGTH (type);
- if (length > 8)
+ if (TYPE_LENGTH (type) > 8)
return 0;
return is_float_like (type);
@@ -2515,13 +2513,12 @@ s390_function_arg_float (struct type *type)
static int
s390_function_arg_integer (struct type *type)
{
- unsigned length = TYPE_LENGTH (type);
- if (length > 8)
+ if (TYPE_LENGTH (type) > 8)
return 0;
return is_integer_like (type)
|| is_pointer_like (type)
- || (is_struct_like (type) && is_power_of_two (length));
+ || (is_struct_like (type) && is_power_of_two (TYPE_LENGTH (type)));
}
/* Return ARG, a `SIMPLE_ARG', sign-extended or zero-extended to a full
@@ -2616,11 +2613,10 @@ s390_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
{
struct value *arg = args[i];
struct type *type = check_typedef (value_type (arg));
- unsigned length = TYPE_LENGTH (type);
if (s390_function_arg_pass_by_reference (type))
{
- sp -= length;
+ sp -= TYPE_LENGTH (type);
sp = align_down (sp, alignment_of (type));
copy_addr[i] = sp;
}
@@ -2799,8 +2795,7 @@ s390_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
static enum return_value_convention
s390_return_value_convention (struct gdbarch *gdbarch, struct type *type)
{
- int length = TYPE_LENGTH (type);
- if (length > 8)
+ if (TYPE_LENGTH (type) > 8)
return RETURN_VALUE_STRUCT_CONVENTION;
switch (TYPE_CODE (type))