aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2013-02-06 16:10:09 +0100
committerPetr Machata <pmachata@redhat.com>2013-03-12 00:08:53 +0100
commit2a102987aa3583449e6bf56060bf5c8129ee8cd2 (patch)
treed86674a6fe7e40b79a126424aaf8ca3d370f4e24 /sysdeps
parent1c8596d41dde12f9af6a21035fac0c64f428ab76 (diff)
downloadltrace-2a102987aa3583449e6bf56060bf5c8129ee8cd2.tar.gz
Simplify the code for ARM parameter passing
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/linux-gnu/arm/fetch.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/sysdeps/linux-gnu/arm/fetch.c b/sysdeps/linux-gnu/arm/fetch.c
index 97795a5..6b947ee 100644
--- a/sysdeps/linux-gnu/arm/fetch.c
+++ b/sysdeps/linux-gnu/arm/fetch.c
@@ -462,13 +462,6 @@ arch_fetch_retval(struct fetch_context *ctx, enum tof type,
switch (info->type) {
unsigned char *data;
- union {
- struct {
- uint32_t r0;
- uint32_t r1;
- } s;
- unsigned char buf[8];
- } u;
case ARGTYPE_VOID:
return 0;
@@ -501,12 +494,9 @@ arch_fetch_retval(struct fetch_context *ctx, enum tof type,
case ARGTYPE_ULONG:
case ARGTYPE_POINTER:
pass_in_registers:
- if (arm_get_register(proc, ARM_REG_R3, &u.s.r0) < 0
- || (sz > 4 && arm_get_register(proc, ARM_REG_R1,
- &u.s.r1) < 0)
- || (data = value_reserve(valuep, sz)) == NULL)
+ if ((data = value_reserve(valuep, sz)) == NULL)
return -1;
- memmove(data, u.buf, sz);
+ memmove(data, ctx->regs.uregs, sz);
return 0;
}
assert(info->type != info->type);