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]

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


Hello!

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.

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?

Uros.

Attachment: i386-sync.diff
Description: Binary data

Attachment: sync-2.c
Description: Text document


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