qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 05/14] tcg/ppc: Use ADDPCIS in tcg_out_tb_start


From: Richard Henderson
Subject: Re: [PATCH v3 05/14] tcg/ppc: Use ADDPCIS in tcg_out_tb_start
Date: Wed, 23 Aug 2023 10:10:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 8/23/23 02:39, Jordan Niethe wrote:
    +static void tcg_out_addpcis(TCGContext *s, TCGReg dst, intptr_t imm)
    +{
    +    int d0, d1, d2;
    +
    +    tcg_debug_assert((imm & 0xffff) == 0);
    +    tcg_debug_assert(imm == (int32_t)imm);
    +


I think you need imm >>= 16 here.
Without that the next patch in the series crashes.

    +    d2 = imm & 1;
    +    d1 = (imm >> 1) & 0x1f;
    +    d0 = (imm >> 6) & 0x3ff;

Yes indeed.  Silly error.  I wonder what went wrong in my testing...


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]