[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] tcg/aarch64: Fix tcg_out_qemu_{ld, st} for linu
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH] tcg/aarch64: Fix tcg_out_qemu_{ld, st} for linux-user |
Date: |
Fri, 28 Aug 2015 22:33:49 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
On 08/28/2015 09:23 AM, Andreas Färber wrote:
An otype argument is being inserted as next-to-last argument for the
function definitions. Same for the softmmu callsites. Only in the *-user
callsites the argument order is being changed with addr_reg and off_r
switching order? I don't see why that should be done in this patch. If
it was wrong before, it should've been done in a separate patch.
It wasn't "wrong" before because it didn't matter before.
The whole point of the patch is that we're changing from
(xD = data_reg, xA = addr_reg, xG = GUEST_BASE)
ldr xD, [xA, xG]
to
ldr xD, [xG, wA, uxtw]
i.e. zero-extending xA during the address formation.
Before this patch, the order of xA and xG doesn't matter; they're both straight
addition operands. After this patch, if we don't switch the argument order
it'll be xG that gets zero-extending GUEST_BASE, which is obviously incorrect.
You'll note that we also switch the argument order for the softmmu case in the
next patch, and for the same reason.
Tomorrow I'll be home and can do any further investigation in depth.
r~