summaryrefslogtreecommitdiff
path: root/gdb/microblaze-tdep.c
diff options
context:
space:
mode:
authorsiddhesh <siddhesh>2012-09-26 07:52:44 +0000
committersiddhesh <siddhesh>2012-09-26 07:52:44 +0000
commit433a06cdf9c6a386b86560ec776ce1439a8f93e9 (patch)
tree594543719e132eae7bef785e6a82c6c8a5672efa /gdb/microblaze-tdep.c
parent7d9d6f555135f3c0e5a3a1ad5697b2562e43deb3 (diff)
downloadgdb-433a06cdf9c6a386b86560ec776ce1439a8f93e9.tar.gz
* 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/microblaze-tdep.c')
-rw-r--r--gdb/microblaze-tdep.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index 96584004019..9b1ff468a57 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -590,22 +590,21 @@ static void
microblaze_store_return_value (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
- int len = TYPE_LENGTH (type);
gdb_byte buf[8];
memset (buf, 0, sizeof(buf));
/* Integral and pointer return values. */
- if (len > 4)
+ if (TYPE_LENGTH (type) > 4)
{
- gdb_assert (len == 8);
+ gdb_assert (TYPE_LENGTH (type) == 8);
memcpy (buf, valbuf, 8);
regcache_cooked_write (regcache, MICROBLAZE_RETVAL_REGNUM+1, buf + 4);
}
else
/* ??? Do we need to do any sign-extension here? */
- memcpy (buf + 4 - len, valbuf, len);
+ memcpy (buf + 4 - TYPE_LENGTH (type), valbuf, TYPE_LENGTH (type));
regcache_cooked_write (regcache, MICROBLAZE_RETVAL_REGNUM, buf);
}