[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 32/42] target/arm: Extract HA and HD in aa64_va_parameters
From: |
Peter Maydell |
Subject: |
Re: [PATCH v3 32/42] target/arm: Extract HA and HD in aa64_va_parameters |
Date: |
Fri, 7 Oct 2022 17:23:33 +0100 |
On Fri, 7 Oct 2022 at 17:13, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 10/7/22 09:11, Peter Maydell wrote:
> > On Fri, 7 Oct 2022 at 16:37, Richard Henderson
> > <richard.henderson@linaro.org> wrote:
> >>
> >> On 10/7/22 02:24, Peter Maydell wrote:
> >>>> + .ha = ha,
> >>>> + .hd = ha & hd,
> >>>
> >>> This is a bitwise operation on two bools, should be && ?
> >>
> >> Bitwise works fine, but I can use boolean if you like.
> >>
> >> I'd be surprised (and filing a missed optimization bug) if the compiler
> >> treated these two
> >> operations differently in this case (simple bool operands with no side
> >> effects).
> >
> > The different treatment I would expect would be that in the '&'
> > case it warns you about using a bitwise operation on a boolean :-)
>
> Oh, well, no compiler should ever do that, because bool implicitly converts
> to int for any
> arithmetic, just like char.
Yeah, but -Wbool-operation is there to catch bugs where the bitwise
operation was unintended and the wrong behaviour.
-- PMM
- Re: [PATCH v3 28/42] target/arm: Split out get_phys_addr_twostage, (continued)
[PATCH v3 33/42] target/arm: Split out S1TranslateResult type, Richard Henderson, 2022/10/01
[PATCH v3 34/42] target/arm: Move be test for regime into S1TranslateResult, Richard Henderson, 2022/10/01
[PATCH v3 35/42] target/arm: Move S1_ptw_translate outside arm_ld[lq]_ptw, Richard Henderson, 2022/10/01
[PATCH v3 30/42] target/arm: Add ptw_idx argument to S1_ptw_translate, Richard Henderson, 2022/10/01
[PATCH v3 36/42] target/arm: Add ARMFault_UnsuppAtomicUpdate, Richard Henderson, 2022/10/01