[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 16/35] tcg-s390: Re-implement tcg_out_movi.
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 16/35] tcg-s390: Re-implement tcg_out_movi. |
Date: |
Sun, 13 Jun 2010 16:19:33 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Thunderbird/3.0.4 |
On 06/12/2010 05:04 AM, Aurelien Jarno wrote:
>> + for (i = 0; i < 4; i++) {
>> + tcg_target_long mask = 0xffffull << i*16;
>> + if ((uval & mask) != 0 && (uval & ~mask) == 0) {
>
> Wouldn't it be simpler to use (uval & mask) == uval ?
Doh.
>> + /* Try for PC-relative address load. */
>> + if ((sval & 1) == 0) {
>> + intptr_t off = (sval - (intptr_t)s->code_ptr) >> 1;
>> + if (off == (int32_t)off) {
>> + tcg_out_insn(s, RIL, LARL, ret, off);
>> + return;
>> + }
>> + }
>
> Is this part used in practice? There was such a trick on the ARM
> backend, but it was actually never used.
Yes. The difference here is we have a +- 4GB displacement.
This is primarily used when the extended-immediate facility is not present;
we can generate all even 32-bit constants from LARL, given the placement of
the code_gen_buffer.
r~
- Re: [Qemu-devel] [PATCH 15/35] tcg-s390: Query instruction extensions that are installed., (continued)
- Re: [Qemu-devel] [PATCH 15/35] tcg-s390: Query instruction extensions that are installed., Aurelien Jarno, 2010/06/12
- Re: [Qemu-devel] [PATCH 15/35] tcg-s390: Query instruction extensions that are installed., Richard Henderson, 2010/06/11
- Re: [Qemu-devel] [PATCH 15/35] tcg-s390: Query instruction extensions that are installed., Aurelien Jarno, 2010/06/13
- Re: [Qemu-devel] [PATCH 15/35] tcg-s390: Query instruction extensions that are installed., Richard Henderson, 2010/06/13
- Re: [Qemu-devel] [PATCH 15/35] tcg-s390: Query instruction extensions that are installed., Aurelien Jarno, 2010/06/13
- Re: [Qemu-devel] [PATCH 15/35] tcg-s390: Query instruction extensions that are installed., Alexander Graf, 2010/06/13
- Re: [Qemu-devel] [PATCH 15/35] tcg-s390: Query instruction extensions that are installed., Richard Henderson, 2010/06/14
- Re: [Qemu-devel] [PATCH 15/35] tcg-s390: Query instruction extensions that are installed., Alexander Graf, 2010/06/14
[Qemu-devel] [PATCH 16/35] tcg-s390: Re-implement tcg_out_movi., Richard Henderson, 2010/06/04
[Qemu-devel] [PATCH 17/35] tcg-s390: Implement sign and zero-extension operations., Richard Henderson, 2010/06/04
[Qemu-devel] [PATCH 18/35] tcg-s390: Implement bswap operations., Richard Henderson, 2010/06/04
[Qemu-devel] [PATCH 19/35] tcg-s390: Implement rotates., Richard Henderson, 2010/06/04
[Qemu-devel] [PATCH 20/35] tcg-s390: Use LOAD COMPLIMENT for negate., Richard Henderson, 2010/06/04
[Qemu-devel] [PATCH 21/35] tcg-s390: Use the ADD IMMEDIATE instructions., Richard Henderson, 2010/06/04
[Qemu-devel] [PATCH 22/35] tcg-s390: Use the AND IMMEDIATE instructions., Richard Henderson, 2010/06/04