[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL v2 05/13] target/rx: CPU definitions
From: |
Peter Maydell |
Subject: |
Re: [PULL v2 05/13] target/rx: CPU definitions |
Date: |
Fri, 20 Mar 2020 16:21:37 +0000 |
On Fri, 20 Mar 2020 at 16:19, Richard Henderson
<address@hidden> wrote:
>
> On 3/20/20 9:04 AM, Philippe Mathieu-Daudé wrote:
> > Not related to this patch, but this line generates a warning with Clang:
> >
> > CC rx-softmmu/target/rx/cpu.o
> > target/rx/cpu.c:158:33: warning: The result of the left shift is undefined
> > because the left operand is negative
> > address = physical = addr & TARGET_PAGE_MASK;
> > ^~~~~~~~~~~~~~~~
> > include/exec/cpu-all.h:234:45: note: expanded from macro 'TARGET_PAGE_MASK'
> > #define TARGET_PAGE_MASK ((target_long)-1 << TARGET_PAGE_BITS)
> > ~~~~~~~~~~~~~~~ ^
> > 1 warning generated.
>
> >From configure:
>
> > # We use -fwrapv to tell the compiler that we require a C dialect where
> > # left shift of signed integers is well defined and has the expected
> > # 2s-complement style results. (Both clang and gcc agree that it
> > # provides these semantics.)
>
> Clang is *supposed* to be not generating those warnings.
I do have clang in my build tests, so at least some versions of
clang do indeed correctly handle -fwrapv. What version are
you using, Philippe ?
thanks
-- PMM
- [PULL v2 00/13] target: Add the Renesas RX architecture, Philippe Mathieu-Daudé, 2020/03/20
- [PULL v2 05/13] target/rx: CPU definitions, Philippe Mathieu-Daudé, 2020/03/20
- Re: [PULL v2 05/13] target/rx: CPU definitions, Philippe Mathieu-Daudé, 2020/03/20
- Re: [PULL v2 05/13] target/rx: CPU definitions, Richard Henderson, 2020/03/20
- Re: [PULL v2 05/13] target/rx: CPU definitions,
Peter Maydell <=
- Re: [PULL v2 05/13] target/rx: CPU definitions, Philippe Mathieu-Daudé, 2020/03/20
- Re: [PULL v2 05/13] target/rx: CPU definitions, Peter Maydell, 2020/03/20
- Re: [PULL v2 05/13] target/rx: CPU definitions, Philippe Mathieu-Daudé, 2020/03/21
- Re: [PULL v2 05/13] target/rx: CPU definitions, Philippe Mathieu-Daudé, 2020/03/21
Re: [PULL v2 00/13] target: Add the Renesas RX architecture, Peter Maydell, 2020/03/20