[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/5] tcg/i386: remove hardcoded P_REXW value
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 2/5] tcg/i386: remove hardcoded P_REXW value |
Date: |
Sun, 22 Dec 2013 08:43:55 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
On 12/21/2013 08:43 AM, Aurelien Jarno wrote:
> P_REXW is defined has a constant at the beginning of i386/tcg-target.c,
> but the corresponding bit is later used in a harcoded way, which defeat
> the purpose of a constant.
>
> Fix that by using a conditional expression operator instead of a shift.
> On x86 this actually makes the code slightly smaller as GCC does in
> practice (opc >> 8) & 8 instead of (opc & 0x800) >> 8 so the constants
> are smaller to load.
>
> Signed-off-by: Aurelien Jarno <address@hidden>
> ---
> tcg/i386/tcg-target.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Richard Henderson <address@hidden>
r~
- [Qemu-devel] [PATCH 0/5] tcg/i386: use movbe instruction in qemu_ldst routines, Aurelien Jarno, 2013/12/21
- [Qemu-devel] [PATCH 3/5] tcg/i386: add support for three-byte opcodes, Aurelien Jarno, 2013/12/21
- [Qemu-devel] [PATCH 2/5] tcg/i386: remove hardcoded P_REXW value, Aurelien Jarno, 2013/12/21
- Re: [Qemu-devel] [PATCH 2/5] tcg/i386: remove hardcoded P_REXW value,
Richard Henderson <=
- [Qemu-devel] [PATCH 4/5] tcg/i386: use movbe instruction in qemu_ldst routines, Aurelien Jarno, 2013/12/21
- [Qemu-devel] [PATCH 1/5] disas/i386.c: disassemble movbe instruction, Aurelien Jarno, 2013/12/21
- [Qemu-devel] [PATCH 5/5] tcg/i386: cleanup useless #ifdef, Aurelien Jarno, 2013/12/21
- Re: [Qemu-devel] [PATCH 0/5] tcg/i386: use movbe instruction in qemu_ldst routines, Aurelien Jarno, 2013/12/22