Commit 397c0dc8 by Uros Bizjak

i386.c (ix86_print_operand_punct_valid_p): Add '^'.

	* config/i386/i386.c (ix86_print_operand_punct_valid_p): Add '^'.
	(ix86_print_operand): Handle '^'.
	* config/i386/i386.md (*strmovdi_rex_1): Macroize memory operands
	using P mode iterator.  Add %^ to asm template to conditionally emit
	addr32 prefix.
	(*rep_movdi_rex64): Ditto.
	(*strsetdi_rex_1): Ditto.
	(*rep_stosdi_rex64): Ditto.
	(*strmov{si,hi,qi}_1): Add %^ to asm template to
	conditionally emit addr32 prefix.
	(*rep_mov{si,qi}): Ditto.
	(*strset{si,hi,qi}): Ditto.
	(*rep_stos{si,qi}): Ditto.
	(*cmpstrnqi_nz_1): Ditto.
	(*cmpstrnqi_1): Ditto.
	(*strlenqi_1): Ditto.

From-SVN: r185058
parent cccff71a
2012-03-07 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_print_operand_punct_valid_p): Add '^'.
(ix86_print_operand): Handle '^'.
* config/i386/i386.md (*strmovdi_rex_1): Macroize memory operands
using P mode iterator. Add %^ to asm template to conditionally emit
addr32 prefix.
(*rep_movdi_rex64): Ditto.
(*strsetdi_rex_1): Ditto.
(*rep_stosdi_rex64): Ditto.
(*strmov{si,hi,qi}_1): Add %^ to asm template to
conditionally emit addr32 prefix.
(*rep_mov{si,qi}): Ditto.
(*strset{si,hi,qi}): Ditto.
(*rep_stos{si,qi}): Ditto.
(*cmpstrnqi_nz_1): Ditto.
(*cmpstrnqi_1): Ditto.
(*strlenqi_1): Ditto.
2012-03-07 H.J. Lu <hongjiu.lu@intel.com> 2012-03-07 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (function_value_64): Return pointers in * config/i386/i386.c (function_value_64): Return pointers in
...@@ -10,8 +29,7 @@ ...@@ -10,8 +29,7 @@
(get_gcov_unsigned_t): Likewise. (get_gcov_unsigned_t): Likewise.
* expr.c (store_constructor): Use type_for_mode. * expr.c (store_constructor): Use type_for_mode.
(try_casesi): Likewise. (try_casesi): Likewise.
* tree-ssa-loop-ivopts.c (add_standard_iv_candidates_for_size): * tree-ssa-loop-ivopts.c (add_standard_iv_candidates_for_size): Remove.
Remove.
(add_standard_iv_candidates): Use standard type trees. (add_standard_iv_candidates): Use standard type trees.
* dojump.c (do_jump): Remove dead code. * dojump.c (do_jump): Remove dead code.
...@@ -53,8 +71,8 @@ ...@@ -53,8 +71,8 @@
2012-03-07 Ralf Corsépius <ralf.corsepius@rtems.org> 2012-03-07 Ralf Corsépius <ralf.corsepius@rtems.org>
PR target/51417 PR target/51417
* Makefile.in: Let install-gcc-ar depend on installdirs, gcc-ar$(exeext), * Makefile.in: Let install-gcc-ar depend on installdirs,
gcc-nm$(exeext), gcc-ranlib$(exeext). gcc-ar$(exeext), gcc-nm$(exeext), gcc-ranlib$(exeext).
Don't double canonicalize if cross-compiling. Don't double canonicalize if cross-compiling.
2012-03-07 Georg-Johann Lay <avr@gjlay.de> 2012-03-07 Georg-Johann Lay <avr@gjlay.de>
...@@ -129,8 +147,7 @@ ...@@ -129,8 +147,7 @@
(vector_ltgt<mode>): Likewise. (vector_ltgt<mode>): Likewise.
(vector_ordered<mode>): Likewise. (vector_ordered<mode>): Likewise.
(vector_unordered<mode>): Likewise. (vector_unordered<mode>): Likewise.
* config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise.
Likewise.
2012-03-06 Aldy Hernandez <aldyh@redhat.com> 2012-03-06 Aldy Hernandez <aldyh@redhat.com>
...@@ -151,8 +168,7 @@ ...@@ -151,8 +168,7 @@
2012-03-06 Tristan Gingold <gingold@adacore.com> 2012-03-06 Tristan Gingold <gingold@adacore.com>
* config/vms/vms-c.c (vms_pragma_nomember_alignment): Handle * config/vms/vms-c.c (vms_pragma_nomember_alignment): Handle octaword.
octaword.
(external_model_kind): Improve documentation. (external_model_kind): Improve documentation.
(vms_pragma_extern_model): Handle relaxed_redef. (vms_pragma_extern_model): Handle relaxed_redef.
(vms_c_register_pragma): Allow expansion for nomember_alignment. (vms_c_register_pragma): Allow expansion for nomember_alignment.
...@@ -288,8 +304,7 @@ ...@@ -288,8 +304,7 @@
* genautomata.c (parse_automata_opt): New static function. * genautomata.c (parse_automata_opt): New static function.
(initiate_automaton_gen): Remove all option handling code. Remove (initiate_automaton_gen): Remove all option handling code. Remove
argc argument. All callers changed. argc argument. All callers changed.
(main): Call init_rtx_reader_args_cb with the new function as (main): Call init_rtx_reader_args_cb with the new function as argument.
argument.
2012-03-05 Richard Guenther <rguenther@suse.de> 2012-03-05 Richard Guenther <rguenther@suse.de>
......
...@@ -13743,6 +13743,7 @@ get_some_local_dynamic_name (void) ...@@ -13743,6 +13743,7 @@ get_some_local_dynamic_name (void)
; -- print a semicolon (after prefixes due to bug in older gas). ; -- print a semicolon (after prefixes due to bug in older gas).
~ -- print "i" if TARGET_AVX2, "f" otherwise. ~ -- print "i" if TARGET_AVX2, "f" otherwise.
@ -- print a segment register of thread base pointer load @ -- print a segment register of thread base pointer load
^ -- print addr32 prefix if TARGET_64BIT and Pmode != word_mode
*/ */
void void
...@@ -14248,6 +14249,11 @@ ix86_print_operand (FILE *file, rtx x, int code) ...@@ -14248,6 +14249,11 @@ ix86_print_operand (FILE *file, rtx x, int code)
putc (TARGET_AVX2 ? 'i' : 'f', file); putc (TARGET_AVX2 ? 'i' : 'f', file);
return; return;
case '^':
if (TARGET_64BIT && Pmode != word_mode)
fputs ("addr32 ", file);
return;
default: default:
output_operand_lossage ("invalid operand code '%c'", code); output_operand_lossage ("invalid operand code '%c'", code);
} }
...@@ -14387,8 +14393,8 @@ ix86_print_operand (FILE *file, rtx x, int code) ...@@ -14387,8 +14393,8 @@ ix86_print_operand (FILE *file, rtx x, int code)
static bool static bool
ix86_print_operand_punct_valid_p (unsigned char code) ix86_print_operand_punct_valid_p (unsigned char code)
{ {
return (code == '@' || code == '*' || code == '+' return (code == '@' || code == '*' || code == '+' || code == '&'
|| code == '&' || code == ';' || code == '~'); || code == ';' || code == '~' || code == '^');
} }
/* Print a memory operand whose address is ADDR. */ /* Print a memory operand whose address is ADDR. */
...@@ -60,7 +60,9 @@ ...@@ -60,7 +60,9 @@
;; Y -- print condition for XOP pcom* instruction. ;; Y -- print condition for XOP pcom* instruction.
;; + -- print a branch hint as 'cs' or 'ds' prefix ;; + -- print a branch hint as 'cs' or 'ds' prefix
;; ; -- print a semicolon (after prefixes due to bug in older gas). ;; ; -- print a semicolon (after prefixes due to bug in older gas).
;; ~ -- print "i" if TARGET_AVX2, "f" otherwise.
;; @ -- print a segment register of thread base pointer load ;; @ -- print a segment register of thread base pointer load
;; ^ -- print addr32 prefix if TARGET_64BIT and Pmode != word_mode
(define_c_enum "unspec" [ (define_c_enum "unspec" [
;; Relocation specifiers ;; Relocation specifiers
...@@ -15678,17 +15680,17 @@ ...@@ -15678,17 +15680,17 @@
"ix86_current_function_needs_cld = 1;") "ix86_current_function_needs_cld = 1;")
(define_insn "*strmovdi_rex_1" (define_insn "*strmovdi_rex_1"
[(set (mem:DI (match_operand:DI 2 "register_operand" "0")) [(set (mem:DI (match_operand:P 2 "register_operand" "0"))
(mem:DI (match_operand:DI 3 "register_operand" "1"))) (mem:DI (match_operand:P 3 "register_operand" "1")))
(set (match_operand:DI 0 "register_operand" "=D") (set (match_operand:P 0 "register_operand" "=D")
(plus:DI (match_dup 2) (plus:P (match_dup 2)
(const_int 8))) (const_int 8)))
(set (match_operand:DI 1 "register_operand" "=S") (set (match_operand:P 1 "register_operand" "=S")
(plus:DI (match_dup 3) (plus:P (match_dup 3)
(const_int 8)))] (const_int 8)))]
"TARGET_64BIT "TARGET_64BIT
&& !(fixed_regs[SI_REG] || fixed_regs[DI_REG])" && !(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"movsq" "%^movsq"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "memory" "both") (set_attr "memory" "both")
(set_attr "mode" "DI")]) (set_attr "mode" "DI")])
...@@ -15703,7 +15705,7 @@ ...@@ -15703,7 +15705,7 @@
(plus:P (match_dup 3) (plus:P (match_dup 3)
(const_int 4)))] (const_int 4)))]
"!(fixed_regs[SI_REG] || fixed_regs[DI_REG])" "!(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"movs{l|d}" "%^movs{l|d}"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "memory" "both") (set_attr "memory" "both")
(set_attr "mode" "SI")]) (set_attr "mode" "SI")])
...@@ -15718,7 +15720,7 @@ ...@@ -15718,7 +15720,7 @@
(plus:P (match_dup 3) (plus:P (match_dup 3)
(const_int 2)))] (const_int 2)))]
"!(fixed_regs[SI_REG] || fixed_regs[DI_REG])" "!(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"movsw" "%^movsw"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "memory" "both") (set_attr "memory" "both")
(set_attr "mode" "HI")]) (set_attr "mode" "HI")])
...@@ -15733,7 +15735,7 @@ ...@@ -15733,7 +15735,7 @@
(plus:P (match_dup 3) (plus:P (match_dup 3)
(const_int 1)))] (const_int 1)))]
"!(fixed_regs[SI_REG] || fixed_regs[DI_REG])" "!(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"movsb" "%^movsb"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "memory" "both") (set_attr "memory" "both")
(set (attr "prefix_rex") (set (attr "prefix_rex")
...@@ -15756,20 +15758,20 @@ ...@@ -15756,20 +15758,20 @@
"ix86_current_function_needs_cld = 1;") "ix86_current_function_needs_cld = 1;")
(define_insn "*rep_movdi_rex64" (define_insn "*rep_movdi_rex64"
[(set (match_operand:DI 2 "register_operand" "=c") (const_int 0)) [(set (match_operand:P 2 "register_operand" "=c") (const_int 0))
(set (match_operand:DI 0 "register_operand" "=D") (set (match_operand:P 0 "register_operand" "=D")
(plus:DI (ashift:DI (match_operand:DI 5 "register_operand" "2") (plus:P (ashift:P (match_operand:P 5 "register_operand" "2")
(const_int 3)) (const_int 3))
(match_operand:DI 3 "register_operand" "0"))) (match_operand:P 3 "register_operand" "0")))
(set (match_operand:DI 1 "register_operand" "=S") (set (match_operand:P 1 "register_operand" "=S")
(plus:DI (ashift:DI (match_dup 5) (const_int 3)) (plus:P (ashift:P (match_dup 5) (const_int 3))
(match_operand:DI 4 "register_operand" "1"))) (match_operand:P 4 "register_operand" "1")))
(set (mem:BLK (match_dup 3)) (set (mem:BLK (match_dup 3))
(mem:BLK (match_dup 4))) (mem:BLK (match_dup 4)))
(use (match_dup 5))] (use (match_dup 5))]
"TARGET_64BIT "TARGET_64BIT
&& !(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])" && !(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"rep{%;} movsq" "%^rep{%;} movsq"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "prefix_rep" "1") (set_attr "prefix_rep" "1")
(set_attr "memory" "both") (set_attr "memory" "both")
...@@ -15788,7 +15790,7 @@ ...@@ -15788,7 +15790,7 @@
(mem:BLK (match_dup 4))) (mem:BLK (match_dup 4)))
(use (match_dup 5))] (use (match_dup 5))]
"!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])" "!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"rep{%;} movs{l|d}" "%^rep{%;} movs{l|d}"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "prefix_rep" "1") (set_attr "prefix_rep" "1")
(set_attr "memory" "both") (set_attr "memory" "both")
...@@ -15805,7 +15807,7 @@ ...@@ -15805,7 +15807,7 @@
(mem:BLK (match_dup 4))) (mem:BLK (match_dup 4)))
(use (match_dup 5))] (use (match_dup 5))]
"!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])" "!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"rep{%;} movsb" "%^rep{%;} movsb"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "prefix_rep" "1") (set_attr "prefix_rep" "1")
(set_attr "memory" "both") (set_attr "memory" "both")
...@@ -15866,14 +15868,14 @@ ...@@ -15866,14 +15868,14 @@
"ix86_current_function_needs_cld = 1;") "ix86_current_function_needs_cld = 1;")
(define_insn "*strsetdi_rex_1" (define_insn "*strsetdi_rex_1"
[(set (mem:DI (match_operand:DI 1 "register_operand" "0")) [(set (mem:DI (match_operand:P 1 "register_operand" "0"))
(match_operand:DI 2 "register_operand" "a")) (match_operand:DI 2 "register_operand" "a"))
(set (match_operand:DI 0 "register_operand" "=D") (set (match_operand:P 0 "register_operand" "=D")
(plus:DI (match_dup 1) (plus:P (match_dup 1)
(const_int 8)))] (const_int 8)))]
"TARGET_64BIT "TARGET_64BIT
&& !(fixed_regs[AX_REG] || fixed_regs[DI_REG])" && !(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
"stosq" "%^stosq"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "memory" "store") (set_attr "memory" "store")
(set_attr "mode" "DI")]) (set_attr "mode" "DI")])
...@@ -15885,7 +15887,7 @@ ...@@ -15885,7 +15887,7 @@
(plus:P (match_dup 1) (plus:P (match_dup 1)
(const_int 4)))] (const_int 4)))]
"!(fixed_regs[AX_REG] || fixed_regs[DI_REG])" "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
"stos{l|d}" "%^stos{l|d}"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "memory" "store") (set_attr "memory" "store")
(set_attr "mode" "SI")]) (set_attr "mode" "SI")])
...@@ -15897,7 +15899,7 @@ ...@@ -15897,7 +15899,7 @@
(plus:P (match_dup 1) (plus:P (match_dup 1)
(const_int 2)))] (const_int 2)))]
"!(fixed_regs[AX_REG] || fixed_regs[DI_REG])" "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
"stosw" "%^stosw"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "memory" "store") (set_attr "memory" "store")
(set_attr "mode" "HI")]) (set_attr "mode" "HI")])
...@@ -15909,7 +15911,7 @@ ...@@ -15909,7 +15911,7 @@
(plus:P (match_dup 1) (plus:P (match_dup 1)
(const_int 1)))] (const_int 1)))]
"!(fixed_regs[AX_REG] || fixed_regs[DI_REG])" "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
"stosb" "%^stosb"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "memory" "store") (set_attr "memory" "store")
(set (attr "prefix_rex") (set (attr "prefix_rex")
...@@ -15930,18 +15932,18 @@ ...@@ -15930,18 +15932,18 @@
"ix86_current_function_needs_cld = 1;") "ix86_current_function_needs_cld = 1;")
(define_insn "*rep_stosdi_rex64" (define_insn "*rep_stosdi_rex64"
[(set (match_operand:DI 1 "register_operand" "=c") (const_int 0)) [(set (match_operand:P 1 "register_operand" "=c") (const_int 0))
(set (match_operand:DI 0 "register_operand" "=D") (set (match_operand:P 0 "register_operand" "=D")
(plus:DI (ashift:DI (match_operand:DI 4 "register_operand" "1") (plus:P (ashift:P (match_operand:P 4 "register_operand" "1")
(const_int 3)) (const_int 3))
(match_operand:DI 3 "register_operand" "0"))) (match_operand:P 3 "register_operand" "0")))
(set (mem:BLK (match_dup 3)) (set (mem:BLK (match_dup 3))
(const_int 0)) (const_int 0))
(use (match_operand:DI 2 "register_operand" "a")) (use (match_operand:DI 2 "register_operand" "a"))
(use (match_dup 4))] (use (match_dup 4))]
"TARGET_64BIT "TARGET_64BIT
&& !(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])" && !(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
"rep{%;} stosq" "%^rep{%;} stosq"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "prefix_rep" "1") (set_attr "prefix_rep" "1")
(set_attr "memory" "store") (set_attr "memory" "store")
...@@ -15958,7 +15960,7 @@ ...@@ -15958,7 +15960,7 @@
(use (match_operand:SI 2 "register_operand" "a")) (use (match_operand:SI 2 "register_operand" "a"))
(use (match_dup 4))] (use (match_dup 4))]
"!(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])" "!(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
"rep{%;} stos{l|d}" "%^rep{%;} stos{l|d}"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "prefix_rep" "1") (set_attr "prefix_rep" "1")
(set_attr "memory" "store") (set_attr "memory" "store")
...@@ -15974,7 +15976,7 @@ ...@@ -15974,7 +15976,7 @@
(use (match_operand:QI 2 "register_operand" "a")) (use (match_operand:QI 2 "register_operand" "a"))
(use (match_dup 4))] (use (match_dup 4))]
"!(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])" "!(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
"rep{%;} stosb" "%^rep{%;} stosb"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "prefix_rep" "1") (set_attr "prefix_rep" "1")
(set_attr "memory" "store") (set_attr "memory" "store")
...@@ -16095,7 +16097,7 @@ ...@@ -16095,7 +16097,7 @@
(clobber (match_operand:P 1 "register_operand" "=D")) (clobber (match_operand:P 1 "register_operand" "=D"))
(clobber (match_operand:P 2 "register_operand" "=c"))] (clobber (match_operand:P 2 "register_operand" "=c"))]
"!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])" "!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"repz{%;} cmpsb" "%^repz{%;} cmpsb"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "mode" "QI") (set_attr "mode" "QI")
(set (attr "prefix_rex") (set (attr "prefix_rex")
...@@ -16135,7 +16137,7 @@ ...@@ -16135,7 +16137,7 @@
(clobber (match_operand:P 1 "register_operand" "=D")) (clobber (match_operand:P 1 "register_operand" "=D"))
(clobber (match_operand:P 2 "register_operand" "=c"))] (clobber (match_operand:P 2 "register_operand" "=c"))]
"!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])" "!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"repz{%;} cmpsb" "%^repz{%;} cmpsb"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "mode" "QI") (set_attr "mode" "QI")
(set (attr "prefix_rex") (set (attr "prefix_rex")
...@@ -16176,7 +16178,7 @@ ...@@ -16176,7 +16178,7 @@
(clobber (match_operand:P 1 "register_operand" "=D")) (clobber (match_operand:P 1 "register_operand" "=D"))
(clobber (reg:CC FLAGS_REG))] (clobber (reg:CC FLAGS_REG))]
"!(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])" "!(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
"repnz{%;} scasb" "%^repnz{%;} scasb"
[(set_attr "type" "str") [(set_attr "type" "str")
(set_attr "mode" "QI") (set_attr "mode" "QI")
(set (attr "prefix_rex") (set (attr "prefix_rex")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment