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] |
Hello! ix86_decompose_address is called from many places in i386.c, also to calculate various attributes of the insn (length, etc). The testcase failed since addsi_1 pattern was declared as TYPE_LEA and its pattern (involving subregs of SFmode) was passed to length attribute calculation as memory operand. The failure was in ix86_address_subreg_operand that rejected non-integer subregs. ix86_decompose_address should fail only if the *structure* of address is totaly wrong, and should not bother too much about its operands. Operand checks should be done in ix86_legitimate_address_p. The patch moves a couple of check to ix86_legitimate_address_p. The prevention of non-integer registers in address was already there, so the check in ix86_address_subreg_operand was not needed anyway. The check for invalid x86_64 constant address was also already present in ix86_legitimate_address_p, so corresponding x32 check was also moved there. 2013-11-17 Uros Bizjak <ubizjak@gmail.com> PR target/59153 * config/i386/i386.c (ix86_address_subreg_operand): Do not reject non-integer subregs. (ix86_decompose_address): Do not reject invalid CONST_INT RTXes. Move check for invalid x32 constant addresses ... (ix86_legitimate_address_p): ... here. testsuite/ChangeLog: 2013-11-17 Uros Bizjak <ubizjak@gmail.com> PR target/59153 * gcc.target/i386/pr59153.c: New test. Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32} and committed to mainline. The patch will be backported to other release branches after a couple of days without problems in mainline. Uros.
Attachment:
p.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |