Re: [PATCH] mips: avoid signed overflow in LUI_OPERAND [PR104842]

2022-03-09 Thread Xi Ruoyao via Gcc-patches
On Tue, 2022-03-08 at 18:20 +, Richard Sandiford wrote: > Xi Ruoyao writes: > > I think this one obvious.  Ok for trunk? > OK, thanks. Committed r12-7555. /* snip */ > >  #define LUI_OPERAND(VALUE) \ > >    (((VALUE) | 0x7fff) == 0x7fff  

Re: [PATCH] mips: avoid signed overflow in LUI_OPERAND [PR104842]

2022-03-08 Thread Richard Sandiford via Gcc-patches
Xi Ruoyao writes: > I think this one obvious. Ok for trunk? OK, thanks. Richard > > gcc/ > > PR target/104842 > * config/mips/mips.h (LUI_OPERAND): Cast the input to an unsigned > value before adding an offset. > --- > gcc/config/mips/mips.h | 2 +- > 1 file changed, 1 inser