[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/5] tcg/ppc: Hoist common argument loads in tcg_out_op()
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 2/5] tcg/ppc: Hoist common argument loads in tcg_out_op() |
Date: |
Wed, 13 Jan 2021 16:49:05 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 1/13/21 4:25 PM, Philippe Mathieu-Daudé wrote:
> On 1/11/21 4:01 PM, Philippe Mathieu-Daudé wrote:
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>> tcg/ppc/tcg-target.c.inc | 294 ++++++++++++++++++---------------------
>> 1 file changed, 138 insertions(+), 156 deletions(-)
> ...
>
>> @@ -2818,10 +2805,9 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc,
>> const TCGArg *args,
>> case INDEX_op_bswap32_i32:
>> case INDEX_op_bswap32_i64:
>> /* Stolen from gcc's builtin_bswap32 */
>> - a1 = args[1];
>> - a0 = args[0] == a1 ? TCG_REG_R0 : args[0];
>> + a0 = a0 == a1 ? TCG_REG_R0 : a0;
>
> Oops... Here is probably the regression reported by Miroslav,
> I shouldn't have changed this line, simply remove the a1
Oops^2, wrong hunk =) Following one...
>
>>
>> - /* a1 = args[1] # abcd */
>> + /* a1 = a1 # abcd */
>> /* a0 = rotate_left (a1, 8) # bcda */
>> tcg_out_rlw(s, RLWINM, a0, a1, 8, 0, 31);
>> /* a0 = (a0 & ~0xff000000) | ((a1 r<< 24) & 0xff000000) # dcda */
@@ -2830,12 +2816,12 @@ static void tcg_out_op(TCGContext *s, TCGOpcode
opc, const TCGArg *args,
tcg_out_rlw(s, RLWIMI, a0, a1, 24, 16, 23);
Here, is the line I shouldn't have changed:
if (a0 == TCG_REG_R0) {
- tcg_out_mov(s, TCG_TYPE_REG, args[0], a0);
+ tcg_out_mov(s, TCG_TYPE_REG, a0, a0);
}
break;
(multiple occurrences).
- [PATCH 0/5] tcg: Restrict tcg_out_op() to arrays of TCG_MAX_OP_ARGS elements, Philippe Mathieu-Daudé, 2021/01/11
- [PATCH 2/5] tcg/ppc: Hoist common argument loads in tcg_out_op(), Philippe Mathieu-Daudé, 2021/01/11
- [PATCH 1/5] tcg/arm: Hoist common argument loads in tcg_out_op(), Philippe Mathieu-Daudé, 2021/01/11
- [PATCH 3/5] tcg/s390: Hoist common argument loads in tcg_out_op(), Philippe Mathieu-Daudé, 2021/01/11
- [RFC PATCH 4/5] tcg: Restrict tcg_out_op() to arrays of TCG_MAX_OP_ARGS elements, Philippe Mathieu-Daudé, 2021/01/11
- [RFC PATCH 5/5] tcg: Restrict tcg_out_vec_op() to arrays of TCG_MAX_OP_ARGS elements, Philippe Mathieu-Daudé, 2021/01/11
- Re: [PATCH 0/5] tcg: Restrict tcg_out_op() to arrays of TCG_MAX_OP_ARGS elements, Richard Henderson, 2021/01/11