summaryrefslogtreecommitdiff
path: root/gcc/config/i386
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2011-11-11 15:56:00 +0100
committerUros Bizjak <uros@gcc.gnu.org>2011-11-11 15:56:00 +0100
commit5da6a3837f88a9913e8b77656f34988f173b16af (patch)
treeeab0833103d2b1d12fbc3d3f99f12c0a0db8e10c /gcc/config/i386
parent3fec7f10284ffde68826a66ce9e30abdbcdcc40d (diff)
downloadgcc-5da6a3837f88a9913e8b77656f34988f173b16af.tar.gz
re PR target/50762 (ICE: in extract_insn, at recog.c:2137 (unrecognizable insn))
PR target/50762 * config/i386/constraints.md (j): New address constraint. * config/i386/predicates.md (lea_address_operand): Redefine as special predicate. * config/i386/i386.md (*lea_3_zext): Use "j" constraint for operand 1. (*lea_4_zext): Ditto. From-SVN: r181285
Diffstat (limited to 'gcc/config/i386')
-rw-r--r--gcc/config/i386/constraints.md7
-rw-r--r--gcc/config/i386/i386.md4
-rw-r--r--gcc/config/i386/predicates.md5
3 files changed, 11 insertions, 5 deletions
diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md
index bef5b30b013..941f48aa6e6 100644
--- a/gcc/config/i386/constraints.md
+++ b/gcc/config/i386/constraints.md
@@ -19,7 +19,7 @@
;;; Unused letters:
;;; B H T W
-;;; h jk v
+;;; h k v
;; Integer register constraints.
;; It is not necessary to define 'r' here.
@@ -127,6 +127,11 @@
(and (not (match_test "TARGET_X32"))
(match_operand 0 "memory_operand")))
+(define_address_constraint "j"
+ "@internal Address operand that can be zero extended in LEA instruction."
+ (and (not (match_code "const_int"))
+ (match_operand 0 "address_operand")))
+
;; Integer constant constraints.
(define_constraint "I"
"Integer constant in the range 0 @dots{} 31, for 32-bit shifts."
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 35273d95683..377c78eec51 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -5551,7 +5551,7 @@
(define_insn "*lea_3_zext"
[(set (match_operand:DI 0 "register_operand" "=r")
(zero_extend:DI
- (subreg:SI (match_operand:DI 1 "lea_address_operand" "p") 0)))]
+ (subreg:SI (match_operand:DI 1 "lea_address_operand" "j") 0)))]
"TARGET_64BIT"
"lea{l}\t{%a1, %k0|%k0, %a1}"
[(set_attr "type" "lea")
@@ -5560,7 +5560,7 @@
(define_insn "*lea_4_zext"
[(set (match_operand:DI 0 "register_operand" "=r")
(zero_extend:DI
- (match_operand:SI 1 "lea_address_operand" "p")))]
+ (match_operand:SI 1 "lea_address_operand" "j")))]
"TARGET_64BIT"
"lea{l}\t{%a1, %k0|%k0, %a1}"
[(set_attr "type" "lea")
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index 3745b497c19..1dda585bfde 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -808,8 +808,9 @@
(match_operand 0 "const0_operand")))
;; Return true if op if a valid address for LEA, and does not contain
-;; a segment override.
-(define_predicate "lea_address_operand"
+;; a segment override. Defined as a special predicate to allow
+;; mode-less const_int operands pass to address_operand.
+(define_special_predicate "lea_address_operand"
(match_operand 0 "address_operand")
{
struct ix86_address parts;