[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/9] target-arm/arm-semi.c: Factor out repeated
From: |
Christopher Covington |
Subject: |
Re: [Qemu-devel] [PATCH 4/9] target-arm/arm-semi.c: Factor out repeated 'return env->regs[0]' |
Date: |
Wed, 19 Aug 2015 08:52:45 -0700 |
On Thu, Aug 13, 2015 at 9:35 AM, Peter Maydell <address@hidden> wrote:
> Factor out a repeated pattern in the semihosting code:
>
> gdb_do_syscall(arm_semi_cb, "system,%s", arg0, (int)arg1+1);
> /* arm_semi_cb sets env->regs[0] to the syscall return value */
> return env->regs[0];
>
> For A64 the return value will go in a different register; pull
> the sequence out into its own function that passes the return
> value in a static variable rather than overloading regs[0]
> for the purpose, so the code will work on both A32/T32 and A64.
>
> Note that the lack-of-synchronization bug noted in the FIXME
> comment is not introduced by this commit, but was already present.
>
> Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Christopher Covington <address@hidden>
- [Qemu-devel] [PATCH 8/9] target-arm/arm-semi.c: SYS_EXIT on A64 takes a parameter block, (continued)
- [Qemu-devel] [PATCH 8/9] target-arm/arm-semi.c: SYS_EXIT on A64 takes a parameter block, Peter Maydell, 2015/08/13
- [Qemu-devel] [PATCH 9/9] target-arm: Wire up HLT 0xf000 as the A64 semihosting instruction, Peter Maydell, 2015/08/13
- [Qemu-devel] [PATCH 6/9] target-arm/arm-semi.c: Support widening APIs to 64 bits, Peter Maydell, 2015/08/13
- [Qemu-devel] [PATCH 3/9] gdbstub: Implement gdb_do_syscallv(), Peter Maydell, 2015/08/13
- [Qemu-devel] [PATCH 1/9] target-arm/arm-semi.c: Fix broken SYS_WRITE0 via gdb, Peter Maydell, 2015/08/13
- [Qemu-devel] [PATCH 7/9] target-arm/arm-semi.c: Implement A64 specific SyncCacheRange call, Peter Maydell, 2015/08/13
- [Qemu-devel] [PATCH 4/9] target-arm/arm-semi.c: Factor out repeated 'return env->regs[0]', Peter Maydell, 2015/08/13
- Re: [Qemu-devel] [PATCH 4/9] target-arm/arm-semi.c: Factor out repeated 'return env->regs[0]',
Christopher Covington <=
- Re: [Qemu-devel] [PATCH 0/9] target-arm: Implement A64 semihosting, Christopher Covington, 2015/08/25