[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 25/26] tcg-aarch64: Prefer unsigned offsets b
From: |
Claudio Fontana |
Subject: |
Re: [Qemu-devel] [PATCH v3 25/26] tcg-aarch64: Prefer unsigned offsets before signed offsets for ldst |
Date: |
Fri, 11 Apr 2014 14:35:53 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 |
On 03.04.2014 21:56, Richard Henderson wrote:
> The assembler seems to prefer them, perhaps we should too.
>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> tcg/aarch64/tcg-target.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c
> index a538a87..58597e7 100644
> --- a/tcg/aarch64/tcg-target.c
> +++ b/tcg/aarch64/tcg-target.c
> @@ -645,11 +645,6 @@ static void tcg_out_ldst_r(TCGContext *s, TCGMemOp size,
> AArch64LdstType type,
> static void tcg_out_ldst(TCGContext *s, TCGMemOp size, AArch64LdstType type,
> TCGReg rd, TCGReg rn, intptr_t offset)
> {
> - if (offset >= -256 && offset < 256) {
> - tcg_out_ldst_9(s, size, type, rd, rn, offset);
> - return;
> - }
> -
> /* If the offset is naturally aligned and in range, then we can
> use the scaled uimm12 encoding */
> if (offset >= 0 && !(offset & ((1 << size) - 1))) {
> @@ -660,6 +655,11 @@ static void tcg_out_ldst(TCGContext *s, TCGMemOp size,
> AArch64LdstType type,
> }
> }
>
> + if (offset >= -256 && offset < 256) {
> + tcg_out_ldst_9(s, size, type, rd, rn, offset);
> + return;
> + }
> +
> /* Worst-case scenario, move offset to temp register, use reg offset. */
> tcg_out_movi(s, TCG_TYPE_I64, TCG_REG_TMP, offset);
> tcg_out_ldst_r(s, size, type, rd, rn, TCG_REG_TMP);
>
Reviewed-by: Claudio Fontana <address@hidden>
- [Qemu-devel] [PATCH v3 22/26] tcg-aarch64: Merge aarch64_ldst_get_data/type into tcg_out_op, (continued)
- [Qemu-devel] [PATCH v3 22/26] tcg-aarch64: Merge aarch64_ldst_get_data/type into tcg_out_op, Richard Henderson, 2014/04/03
- [Qemu-devel] [PATCH v3 24/26] tcg-aarch64: Replace aarch64_ldst_op_data with AArch64LdstType, Richard Henderson, 2014/04/03
- Re: [Qemu-devel] [PATCH v3 24/26] tcg-aarch64: Replace aarch64_ldst_op_data with AArch64LdstType, Claudio Fontana, 2014/04/07
- [Qemu-devel] [PATCH 27/26] tcg-aarch64: Introduce tcg_out_insn_3312, _3310, _3313, Richard Henderson, 2014/04/07
- Re: [Qemu-devel] [PATCH 27/26] tcg-aarch64: Introduce tcg_out_insn_3312, _3310, _3313, Claudio Fontana, 2014/04/08
- Re: [Qemu-devel] [PATCH 27/26] tcg-aarch64: Introduce tcg_out_insn_3312, _3310, _3313, Claudio Fontana, 2014/04/11
[Qemu-devel] [PATCH v3 25/26] tcg-aarch64: Prefer unsigned offsets before signed offsets for ldst, Richard Henderson, 2014/04/03
- Re: [Qemu-devel] [PATCH v3 25/26] tcg-aarch64: Prefer unsigned offsets before signed offsets for ldst,
Claudio Fontana <=
[Qemu-devel] [PATCH v3 26/26] tcg-aarch64: Use tcg_out_mov in preference to tcg_out_movr, Richard Henderson, 2014/04/03