]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* config/i386/predicates.md (ext_register_operand): Check that
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Sep 2010 10:36:10 +0000 (10:36 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Sep 2010 10:36:10 +0000 (10:36 +0000)
SUBREG_REG is really a register before looking for REGNO.
(reg_not_xmm0_operand): Handle SUBREGs correctly.
(nonimm_not_xmm0_operand): Call reg_not_xmm0_operand.

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

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

index b815a39d993fec43221080eb81edcfca09bf8beb..c50575b40cea278f416ad73b553e78524a0b320a 100644 (file)
@@ -1,3 +1,10 @@
+2010-09-09  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/predicates.md (ext_register_operand): Check that
+       SUBREG_REG is really a register before looking for REGNO.
+       (reg_not_xmm0_operand): Handle SUBREGs correctly.
+       (nonimm_not_xmm0_operand): Call reg_not_xmm0_operand.
+
 2010-09-09  Jakub Jelinek  <jakub@redhat.com>
 
        * rtl.def (DEBUG_IMPLICIT_PTR): New rtl code.
index 8fe0f345ef79b5cb4a108c964c90bf8294f0e708..56a92bd5f3e98cdf55d44c626c3d62af0dbd3dcd 100644 (file)
@@ -68,7 +68,8 @@
     op = SUBREG_REG (op);
 
   /* Be careful to accept only registers having upper parts.  */
-  return REGNO (op) > LAST_VIRTUAL_REGISTER || REGNO (op) <= BX_REG;
+  return (REG_P (op)
+         && (REGNO (op) > LAST_VIRTUAL_REGISTER || REGNO (op) <= BX_REG));
 })
 
 ;; Return true if op is the AX register.
 
 ;; Return true if op is not xmm0 register.
 (define_predicate "reg_not_xmm0_operand"
-   (and (match_operand 0 "register_operand")
-       (match_test "REGNO (op) != FIRST_SSE_REG")))
+  (match_operand 0 "register_operand")
+{
+  if (GET_CODE (op) == SUBREG)
+    op = SUBREG_REG (op);
+
+  return !REG_P (op) || REGNO (op) != FIRST_SSE_REG;
+})
 
 ;; As above, but allow nonimmediate operands.
 (define_predicate "nonimm_not_xmm0_operand"
-   (ior (match_operand 0 "memory_operand")
-       (match_operand 0 "reg_not_xmm0_operand")))
+  (ior (match_operand 0 "memory_operand")
+       (match_operand 0 "reg_not_xmm0_operand")))
 
 ;; Return true if VALUE can be stored in a sign extended immediate field.
 (define_predicate "x86_64_immediate_operand"