[PATCH] Fix asm X constraint (PR inline-asm/59155)

Bernd Edlinger bernd.edlinger@hotmail.de
Wed May 25 13:45:00 GMT 2016


Hi!

This restricts the X constraint in asm statements, which
can be easily folded by combine in something completely
invalid.

It is necessary to allow scratch here, because on i386
the md_asm_adjust hook inserts them.

The second test case fails because lra does not
allow all register for anything_ok operands (aka X)
and later it fails to match the two X constraints
in case '0': if (curr_alt[m] == NO_REGS) break.

There is also an identical bug in the reload pass,
but I do not know how to fix that, as it is almost
used nowhere today.


Boot-strapped and regression-tested on x86_64-pc-linux-gnu.
OK for trunk?


Thanks
Bernd.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: changelog-pr59155.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160525/414368c5/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-pr59155.diff
Type: text/x-patch
Size: 2398 bytes
Desc: patch-pr59155.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160525/414368c5/attachment.bin>


More information about the Gcc-patches mailing list