OSDN Git Service

PR target/49780
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Jul 2011 12:58:28 +0000 (12:58 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Jul 2011 12:58:28 +0000 (12:58 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176506 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/predicates.md

index 3ee9bfb..4f8934a 100644 (file)
@@ -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>
 
index 814250f..22f756b 100644 (file)
@@ -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))
index 2c75147..fd93505 100644 (file)
 
 ;; 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;