[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm an
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl |
Date: |
Mon, 16 Sep 2013 12:11:46 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
On 09/16/2013 08:32 AM, Richard Henderson wrote:
> Nor do we provide ASR or ROR shifts; should we provide those too? Please
> think
> about what situations in which those would be useful. Also think about the
> one
> operation at a time nature of TCG.
>
> My guess is that, beyond the one explicit use in the tlb, we could only make
> use of shifted operations if TCG grew some sort of peephole optimizer so that
> we can look across single operations. And I don't ever see that happening.
>
> Therefore I think adding LSR, ASR and ROR shifts is both a waste of time and
> bloats the backend.
Unless: one decides NOT to use the alias definitions in the manual:
LSR d, n, shift => UBFM d, n, shift, 63
LSL d, n, shift => UBFM d, n, 64 - shift, 63 - shift
ASR d, n, shift => SBFN d, n, shift, 63
ROR d, n, shift => EXTR d, n, n, shift
and instead use
LSR d, n, shift => ORR d, xzr, n, lsr #shift
LSL d, n, shift => ORR d, xzr, n, lsl #shift
ASR d, n, shift => ORR d, xzr, n, asr #shift
ROR d, n, shift => ORR d, xzr, n, ror #shift
It's not implausible that using the same (base) insn for all of these could
result in more code sharing and therefore smaller code size within the tcg
backend.
r~
PS: All rather academic, but considering that AArch64 ORR (shifted register) is
the preferred implementation for MOV, and AArch32 MOV (shifted register) is the
preferred implementation for shift immediates, I'm actually surprised that:
there is no AArch64 MOV (shifted register) alias for AArch32 compatibility, and
that ORR isn't the preferred implementation of shift immediates for AArch64.
- [Qemu-devel] [PATCH v4 05/33] tcg-aarch64: Change enum aarch64_arith_opc to AArch64Insn, (continued)
- [Qemu-devel] [PATCH v4 07/33] tcg-aarch64: Remove the shift_imm parameter from tcg_out_cmp, Richard Henderson, 2013/09/14
- [Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl, Richard Henderson, 2013/09/14
- Re: [Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl, Claudio Fontana, 2013/09/16
- Re: [Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl, Richard Henderson, 2013/09/16
- Re: [Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl,
Richard Henderson <=
- Re: [Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl, Claudio Fontana, 2013/09/17
- Re: [Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl, Richard Henderson, 2013/09/17
- Re: [Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl, Claudio Fontana, 2013/09/18
- Re: [Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl, Richard Henderson, 2013/09/18
- Re: [Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl, Claudio Fontana, 2013/09/18
[Qemu-devel] [PATCH v4 09/33] tcg-aarch64: Introduce tcg_fmt_Rdn_aimm, Richard Henderson, 2013/09/14
[Qemu-devel] [PATCH v4 10/33] tcg-aarch64: Implement mov with tcg_fmt_* functions, Richard Henderson, 2013/09/14
[Qemu-devel] [PATCH v4 11/33] tcg-aarch64: Handle constant operands to add, sub, and compare, Richard Henderson, 2013/09/14