[PATCH, i386]: Prevent %sil and %dil in i386 sync builtins
Jakub Jelinek
jakub@redhat.com
Fri Oct 6 10:35:00 GMT 2006
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
More information about the Gcc-patches
mailing list