[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/26] tcg-aarch64: Special case small constants
From: |
Claudio Fontana |
Subject: |
Re: [Qemu-devel] [PATCH 06/26] tcg-aarch64: Special case small constants in tcg_out_movi |
Date: |
Mon, 24 Mar 2014 15:08:08 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 |
On 15.03.2014 03:48, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> tcg/aarch64/tcg-target.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c
> index 0f23e43..417f51a 100644
> --- a/tcg/aarch64/tcg-target.c
> +++ b/tcg/aarch64/tcg-target.c
> @@ -577,6 +577,16 @@ static void tcg_out_movi(TCGContext *s, TCGType type,
> TCGReg rd,
> }
> ivalue = ~svalue;
>
> + /* Speed things up by handling the common case of small positive
> + and negative values specially. */
> + if ((value & ~0xffffull) == 0) {
> + tcg_out_insn(s, 3405, MOVZ, type, rd, value, 0);
> + return;
> + } else if ((ivalue & ~0xffffull) == 0) {
> + tcg_out_insn(s, 3405, MOVN, type, rd, ivalue, 0);
> + return;
> + }
> +
> /* Check for bitfield immediates. For the benefit of 32-bit quantities,
> use the sign-extended value. That lets us match rotated values such
> as 0xff0000ff with the same 64-bit logic matching 0xffffffffff0000ff.
> */
>
Reviewed-by: Claudio Fontana <address@hidden>
- Re: [Qemu-devel] [PATCH 01/26] tcg-aarch64: Properly detect SIGSEGV writes, (continued)
- [Qemu-devel] [PATCH 02/26] tcg-aarch64: Use intptr_t apropriately, Richard Henderson, 2014/03/14
- [Qemu-devel] [PATCH 03/26] tcg-aarch64: Use TCGType and TCGMemOp constants, Richard Henderson, 2014/03/14
- [Qemu-devel] [PATCH 04/26] tcg-aarch64: Use MOVN in tcg_out_movi, Richard Henderson, 2014/03/14
- [Qemu-devel] [PATCH 06/26] tcg-aarch64: Special case small constants in tcg_out_movi, Richard Henderson, 2014/03/14
- Re: [Qemu-devel] [PATCH 06/26] tcg-aarch64: Special case small constants in tcg_out_movi,
Claudio Fontana <=
- [Qemu-devel] [PATCH 07/26] tcg-aarch64: Use adrp in tcg_out_movi, Richard Henderson, 2014/03/14
- [Qemu-devel] [PATCH 05/26] tcg-aarch64: Use ORRI in tcg_out_movi, Richard Henderson, 2014/03/14
- [Qemu-devel] [PATCH 08/26] tcg-aarch64: Use symbolic names for branches, Richard Henderson, 2014/03/14
- [Qemu-devel] [PATCH 09/26] tcg-aarch64: Create tcg_out_brcond, Richard Henderson, 2014/03/14