aboutsummaryrefslogtreecommitdiff
path: root/gdb/xstormy16-tdep.c
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2011-04-19 12:57:37 +0000
committerPierre Muller <muller@sourceware.org>2011-04-19 12:57:37 +0000
commit1c6e1b0de23f49e732b0ce5ed4373b43ebeb401f (patch)
tree19478e9269a659b56e135a067261de90163aa0d6 /gdb/xstormy16-tdep.c
parent74de023457c7e18e1835f64a5edf7b405e80a095 (diff)
downloadgdb-1c6e1b0de23f49e732b0ce5ed4373b43ebeb401f.zip
gdb-1c6e1b0de23f49e732b0ce5ed4373b43ebeb401f.tar.gz
gdb-1c6e1b0de23f49e732b0ce5ed4373b43ebeb401f.tar.bz2
* xstormy16-tdep.c (xstormy16_push_dummy_call): Add local
variables to simplify code and avoid == operator at end of line as this is against GNU coding standards.
Diffstat (limited to 'gdb/xstormy16-tdep.c')
-rw-r--r--gdb/xstormy16-tdep.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 53cbecd..bf32cbd 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -263,12 +263,13 @@ xstormy16_push_dummy_call (struct gdbarch *gdbarch,
/* Put argument into registers wordwise. */
val = value_contents (args[i]);
for (j = 0; j < typelen; j += xstormy16_reg_size)
- regcache_cooked_write_unsigned (regcache, argreg++,
- extract_unsigned_integer (val + j,
- typelen - j ==
- 1 ? 1 :
- xstormy16_reg_size,
- byte_order));
+ {
+ ULONGEST regval;
+ int size = (typelen - j == 1) ? 1 : xstormy16_reg_size;
+
+ regval = extract_unsigned_integer (val + j, size, byte_order);
+ regcache_cooked_write_unsigned (regcache, argreg++, regval);
+ }
}
/* Align SP */