diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2011-07-20 14:58:28 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2011-07-20 14:58:28 +0200 |
commit | 5e27a6d4ff8a07b33550095c5c2d848a5eef7394 (patch) | |
tree | 6b28364ed1389c1736ddfe62eddb340973aee9fb | |
parent | 74d8fa44465f96c843fbf4e470b2483c8c5e8988 (diff) | |
download | gcc-5e27a6d4ff8a07b33550095c5c2d848a5eef7394.zip gcc-5e27a6d4ff8a07b33550095c5c2d848a5eef7394.tar.gz gcc-5e27a6d4ff8a07b33550095c5c2d848a5eef7394.tar.bz2 |
re PR target/49780 ([x32] internal compiler error: in create_mem_ref, at tree-ssa-address.c:806)
PR target/49780
* config/i386/predicates.md (no_seg_addres_operand): No more special.
* config/i386/i386.c (ix86_decompose_address): Allow only subregs
of DImode hard registers in base.
(ix86_legitimate_address_p): Allow SImode and DImode base and index
registers.
From-SVN: r176506
-rw-r--r-- | gcc/ChangeLog | 16 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 16 | ||||
-rw-r--r-- | gcc/config/i386/predicates.md | 2 |
3 files changed, 24 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3ee9bfb..4f8934a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,7 +1,15 @@ +2011-07-20 Uros Bizjak <ubizjak@gmail.com> + + PR target/49780 + * config/i386/predicates.md (no_seg_addres_operand): No more special. + * config/i386/i386.c (ix86_decompose_address): Allow only subregs + of DImode hard registers in base. + (ix86_legitimate_address_p): Allow SImode and DImode base and index + registers. + 2011-07-20 Richard Guenther <rguenther@suse.de> - * tree-ssa-structalias.c (new_var_info): Allocate oldsolution - lazily. + * tree-ssa-structalias.c (new_var_info): Allocate oldsolution lazily. (unify_nodes): Deal with that. (solve_graph): Likewise. @@ -91,8 +99,8 @@ (GNU_USER_LINK_EMULATION32, GNU_USER_LINK_EMULATION64) (GNU_USER_LINK_EMULATIONN32): New macros. - * config.gcc (mips64*-*-linux* | mipsisa64*-*-linux* | - mips-*-linux*): Use the new headers. + * config.gcc (mips64*-*-linux* | mipsisa64*-*-linux* | mips-*-linux*): + Use the new headers. 2011-07-19 Richard Sandiford <rdsandiford@googlemail.com> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 814250f..22f756b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -11085,8 +11085,16 @@ ix86_decompose_address (rtx addr, struct ix86_address *out) int retval = 1; enum ix86_address_seg seg = SEG_DEFAULT; - if (REG_P (addr) || GET_CODE (addr) == SUBREG) + if (REG_P (addr)) base = addr; + else if (GET_CODE (addr) == SUBREG) + { + /* Allow only subregs of DImode hard regs. */ + if (register_no_elim_operand (SUBREG_REG (addr), DImode)) + base = addr; + else + return 0; + } else if (GET_CODE (addr) == PLUS) { rtx addends[4], op; @@ -11643,8 +11651,7 @@ ix86_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED, /* Base is not a register. */ return false; - if (GET_MODE (base) != Pmode) - /* Base is not in Pmode. */ + if (GET_MODE (base) != SImode && GET_MODE (base) != DImode) return false; if ((strict && ! REG_OK_FOR_BASE_STRICT_P (reg)) @@ -11672,8 +11679,7 @@ ix86_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED, /* Index is not a register. */ return false; - if (GET_MODE (index) != Pmode) - /* Index is not in Pmode. */ + if (GET_MODE (index) != SImode && GET_MODE (index) != DImode) return false; if ((strict && ! REG_OK_FOR_INDEX_STRICT_P (reg)) diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index 2c75147..fd93505 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -796,7 +796,7 @@ ;; Return true if op if a valid address, and does not contain ;; a segment override. -(define_special_predicate "no_seg_address_operand" +(define_predicate "no_seg_address_operand" (match_operand 0 "address_operand") { struct ix86_address parts; |