Message ID | 1330720069.2929.227.camel@yam-132-YW-E178-FTW |
---|---|
State | New |
Headers | show |
On 03/02/2012 12:27 PM, Oleg Endo wrote: > + This value is used by optabs.c atomic op expansion code as well as in > + sync.md. It must be defined as signed char here or else the movqi > + pattern will refuse to load it as a QImode constant. */ > +#undef TARGET_ATOMIC_TEST_AND_SET_TRUEVAL > +#define TARGET_ATOMIC_TEST_AND_SET_TRUEVAL ((signed char)0x80) The fix to use gen_mode_int obviates the need for the (signed char) hack. r~
On Fri, 2012-03-02 at 12:34 -0800, Richard Henderson wrote: > On 03/02/2012 12:27 PM, Oleg Endo wrote: > > + This value is used by optabs.c atomic op expansion code as well as in > > + sync.md. It must be defined as signed char here or else the movqi > > + pattern will refuse to load it as a QImode constant. */ > > +#undef TARGET_ATOMIC_TEST_AND_SET_TRUEVAL > > +#define TARGET_ATOMIC_TEST_AND_SET_TRUEVAL ((signed char)0x80) > > The fix to use gen_mode_int obviates the need for the (signed char) hack. > Ah right, sorry again. Then I'll rather wait with the whole tas.b patch until the optabs changes are in. Cheers, Oleg
Index: gcc/config/sh/sh.h =================================================================== --- gcc/config/sh/sh.h (revision 184669) +++ gcc/config/sh/sh.h (working copy) @@ -2475,4 +2475,11 @@ /* FIXME: middle-end support for highpart optimizations is missing. */ #define high_life_started reload_in_progress +/* The tas.b instruction sets the 7th bit in the byte, i.e. 0x80. + This value is used by optabs.c atomic op expansion code as well as in + sync.md. It must be defined as signed char here or else the movqi + pattern will refuse to load it as a QImode constant. */ +#undef TARGET_ATOMIC_TEST_AND_SET_TRUEVAL +#define TARGET_ATOMIC_TEST_AND_SET_TRUEVAL ((signed char)0x80) + #endif /* ! GCC_SH_H */