This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386]: Prevent %sil and %dil in i386 sync builtins


On Thu, Oct 05, 2006 at 01:37:43PM +0200, Uros Bizjak wrote:
> i386 sync builtins sometimes generate invalid %dil and %sil registers.
> Attached trivial patch fixes this oversight in "sync_(add, sub, and,
> ior, xor)_<mode>" instruction definitions.
> 
> Patch was botstrapped on i686-pc-linux-gnu, regression tested for c,
> c++ and fortran.
> 
> I'll wait for a green light before comitting this patch, althought the
> patch itself is trivial and obvious.

I think you should just use here the obvious rule and apply.

> 2006-10-05  Uros Bizjak  <uros@kss-loka.si>
> 
> 	* config/i386/sync.md ("sync_add<mode>", "sync_sub<mode>",
> 	"sync_ior<mode>", "sync_and<mode>", "sync_xor<mode>"):
> 	Use <modeconstraint> instead of "r" as operand 1 constraint.
> 
> testsuite/ChangeLog:
> 
> 2006-10-05  Uros Bizjak  <uros@kss-loka.si>
> 
> 	* gcc.c-torture/compile/sync-2.c: New test.
> 
> BTW: A testcase is attached to this message, however this testcase
> will compile only for -march=i386. For other -march flags, it will
> crash at compile time because of PR target/28924. Should this test
> also be committed?

But guess the test will need to wait for 4.3, as PR28924 fix
wasn't approved for 4.2.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]