diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2012-03-13 20:07:33 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2012-03-13 20:07:33 +0100 |
commit | 6e5c8423e88f6795a2be0b76de4b5c96d9919d24 (patch) | |
tree | 27cead3f859ce332360e786e86ee5daa2b822fb3 /gcc | |
parent | f155bc649660e4ca1dce2f1237fecef68e662e3b (diff) | |
download | gcc-6e5c8423e88f6795a2be0b76de4b5c96d9919d24.tar.gz |
predicates.md (constant_call_address_operand): Declare as special predicate.
* config/i386/predicates.md (constant_call_address_operand): Declare
as special predicate. Update all uses.
* config/i386/i386.md: Remove mode from constant_call_address_operand
predicates.
* config/i386/i386.c (ix86_output_call_insn): Call
constant_call_address_operand with VOIDmode.
From-SVN: r185350
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 2 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 24 | ||||
-rw-r--r-- | gcc/config/i386/predicates.md | 8 |
4 files changed, 25 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9280a31f311..2c10e360a5b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2012-03-13 Uros Bizjak <ubizjak@gmail.com> + * config/i386/predicates.md (constant_call_address_operand): Declare + as special predicate. Update all uses. + * config/i386/i386.md: Remove mode from constant_call_address_operand + predicates. + * config/i386/i386.c (ix86_output_call_insn): Call + constant_call_address_operand with VOIDmode. + +2012-03-13 Uros Bizjak <ubizjak@gmail.com> + * config/i386/i386.c (ix86_decompose_address): Handle subregs of AND zero extended address correctly. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 24f51fb20cb..6eddebba3da 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -23121,7 +23121,7 @@ ix86_split_call_vzeroupper (rtx insn, rtx vzeroupper) const char * ix86_output_call_insn (rtx insn, rtx call_op) { - bool direct_p = constant_call_address_operand (call_op, Pmode); + bool direct_p = constant_call_address_operand (call_op, VOIDmode); bool seh_nop_p = false; const char *xasm; diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 199f5fc65d4..a755574150e 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -11376,7 +11376,7 @@ (define_insn_and_split "*call_pop_vzeroupper" [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lzm")) - (match_operand:SI 1 "" "")) + (match_operand 1 "" "")) (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (match_operand:SI 2 "immediate_operand" "i"))) @@ -12592,7 +12592,7 @@ (unspec:SI [(match_operand:SI 1 "register_operand" "b") (match_operand 2 "tls_symbolic_operand" "") - (match_operand:SI 3 "constant_call_address_operand" "z")] + (match_operand 3 "constant_call_address_operand" "z")] UNSPEC_TLS_GD)) (clobber (match_scratch:SI 4 "=d")) (clobber (match_scratch:SI 5 "=c")) @@ -12617,7 +12617,7 @@ [(set (match_operand:SI 0 "register_operand" "") (unspec:SI [(match_operand:SI 2 "register_operand" "") (match_operand 1 "tls_symbolic_operand" "") - (match_operand:SI 3 "constant_call_address_operand" "")] + (match_operand 3 "constant_call_address_operand" "")] UNSPEC_TLS_GD)) (clobber (match_scratch:SI 4 "")) (clobber (match_scratch:SI 5 "")) @@ -12626,8 +12626,8 @@ (define_insn "*tls_global_dynamic_64_<mode>" [(set (match_operand:P 0 "register_operand" "=a") (call:P - (mem:QI (match_operand:P 2 "constant_call_address_operand" "z")) - (match_operand:P 3 "" ""))) + (mem:QI (match_operand 2 "constant_call_address_operand" "z")) + (match_operand 3 "" ""))) (unspec:P [(match_operand 1 "tls_symbolic_operand" "")] UNSPEC_TLS_GD)] "TARGET_64BIT" @@ -12650,7 +12650,7 @@ [(parallel [(set (match_operand:P 0 "register_operand" "") (call:P - (mem:QI (match_operand:P 2 "constant_call_address_operand" "")) + (mem:QI (match_operand 2 "constant_call_address_operand" "")) (const_int 0))) (unspec:P [(match_operand 1 "tls_symbolic_operand" "")] UNSPEC_TLS_GD)])] @@ -12660,7 +12660,7 @@ [(set (match_operand:SI 0 "register_operand" "=a") (unspec:SI [(match_operand:SI 1 "register_operand" "b") - (match_operand:SI 2 "constant_call_address_operand" "z")] + (match_operand 2 "constant_call_address_operand" "z")] UNSPEC_TLS_LD_BASE)) (clobber (match_scratch:SI 3 "=d")) (clobber (match_scratch:SI 4 "=c")) @@ -12685,7 +12685,7 @@ [(set (match_operand:SI 0 "register_operand" "") (unspec:SI [(match_operand:SI 1 "register_operand" "") - (match_operand:SI 2 "constant_call_address_operand" "")] + (match_operand 2 "constant_call_address_operand" "")] UNSPEC_TLS_LD_BASE)) (clobber (match_scratch:SI 3 "")) (clobber (match_scratch:SI 4 "")) @@ -12694,8 +12694,8 @@ (define_insn "*tls_local_dynamic_base_64_<mode>" [(set (match_operand:P 0 "register_operand" "=a") (call:P - (mem:QI (match_operand:P 1 "constant_call_address_operand" "z")) - (match_operand:P 2 "" ""))) + (mem:QI (match_operand 1 "constant_call_address_operand" "z")) + (match_operand 2 "" ""))) (unspec:P [(const_int 0)] UNSPEC_TLS_LD_BASE)] "TARGET_64BIT" { @@ -12712,7 +12712,7 @@ [(parallel [(set (match_operand:P 0 "register_operand" "") (call:P - (mem:QI (match_operand:P 1 "constant_call_address_operand" "")) + (mem:QI (match_operand 1 "constant_call_address_operand" "")) (const_int 0))) (unspec:P [(const_int 0)] UNSPEC_TLS_LD_BASE)])] "TARGET_64BIT") @@ -12724,7 +12724,7 @@ [(set (match_operand:SI 0 "register_operand" "=a") (plus:SI (unspec:SI [(match_operand:SI 1 "register_operand" "b") - (match_operand:SI 2 "constant_call_address_operand" "z")] + (match_operand 2 "constant_call_address_operand" "z")] UNSPEC_TLS_LD_BASE) (const:SI (unspec:SI [(match_operand 3 "tls_symbolic_operand" "")] diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index 4c766484ecf..e53eb568f55 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -500,7 +500,7 @@ (match_test "op == ix86_tls_module_base ()"))) ;; Test for a pc-relative call operand -(define_predicate "constant_call_address_operand" +(define_special_predicate "constant_call_address_operand" (match_code "symbol_ref") { if (ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC) @@ -573,16 +573,14 @@ ;; Test for a valid operand for a call instruction. ;; Allow constant call address operands in Pmode only. (define_special_predicate "call_insn_operand" - (ior (match_test "constant_call_address_operand - (op, mode == VOIDmode ? mode : Pmode)") + (ior (match_operand 0 "constant_call_address_operand") (match_operand 0 "call_register_no_elim_operand") (and (not (match_test "TARGET_X32")) (match_operand 0 "memory_operand")))) ;; Similarly, but for tail calls, in which we cannot allow memory references. (define_special_predicate "sibcall_insn_operand" - (ior (match_test "constant_call_address_operand - (op, mode == VOIDmode ? mode : Pmode)") + (ior (match_operand 0 "constant_call_address_operand") (match_operand 0 "register_no_elim_operand"))) ;; Match exactly zero. |