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
This commit is contained in:
Uros Bizjak 2012-03-07 16:44:52 +01:00
parent cccff71a90
commit 397c0dc8b3
3 changed files with 78 additions and 55 deletions

View File

@ -1,3 +1,22 @@
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>
* config/i386/i386.c (function_value_64): Return pointers in
@ -10,8 +29,7 @@
(get_gcov_unsigned_t): Likewise.
* expr.c (store_constructor): Use type_for_mode.
(try_casesi): Likewise.
* tree-ssa-loop-ivopts.c (add_standard_iv_candidates_for_size):
Remove.
* tree-ssa-loop-ivopts.c (add_standard_iv_candidates_for_size): Remove.
(add_standard_iv_candidates): Use standard type trees.
* dojump.c (do_jump): Remove dead code.
@ -48,13 +66,13 @@
all callers to pass NULL except ...
(reset_sched_cycles_in_current_ebb): ... here, save the value
in new variable 'empty'. Increase issue_rate only for
non-empty insns.
non-empty insns.
2012-03-07 Ralf Corsépius <ralf.corsepius@rtems.org>
PR target/51417
* Makefile.in: Let install-gcc-ar depend on installdirs, gcc-ar$(exeext),
gcc-nm$(exeext), gcc-ranlib$(exeext).
* Makefile.in: Let install-gcc-ar depend on installdirs,
gcc-ar$(exeext), gcc-nm$(exeext), gcc-ranlib$(exeext).
Don't double canonicalize if cross-compiling.
2012-03-07 Georg-Johann Lay <avr@gjlay.de>
@ -129,8 +147,7 @@
(vector_ltgt<mode>): Likewise.
(vector_ordered<mode>): Likewise.
(vector_unordered<mode>): Likewise.
* config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner):
Likewise.
* config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise.
2012-03-06 Aldy Hernandez <aldyh@redhat.com>
@ -151,8 +168,7 @@
2012-03-06 Tristan Gingold <gingold@adacore.com>
* config/vms/vms-c.c (vms_pragma_nomember_alignment): Handle
octaword.
* config/vms/vms-c.c (vms_pragma_nomember_alignment): Handle octaword.
(external_model_kind): Improve documentation.
(vms_pragma_extern_model): Handle relaxed_redef.
(vms_c_register_pragma): Allow expansion for nomember_alignment.
@ -288,8 +304,7 @@
* genautomata.c (parse_automata_opt): New static function.
(initiate_automaton_gen): Remove all option handling code. Remove
argc argument. All callers changed.
(main): Call init_rtx_reader_args_cb with the new function as
argument.
(main): Call init_rtx_reader_args_cb with the new function as argument.
2012-03-05 Richard Guenther <rguenther@suse.de>

View File

@ -13743,6 +13743,7 @@ get_some_local_dynamic_name (void)
; -- 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 addr32 prefix if TARGET_64BIT and Pmode != word_mode
*/
void
@ -14248,6 +14249,11 @@ ix86_print_operand (FILE *file, rtx x, int code)
putc (TARGET_AVX2 ? 'i' : 'f', file);
return;
case '^':
if (TARGET_64BIT && Pmode != word_mode)
fputs ("addr32 ", file);
return;
default:
output_operand_lossage ("invalid operand code '%c'", code);
}
@ -14387,8 +14393,8 @@ ix86_print_operand (FILE *file, rtx x, int code)
static bool
ix86_print_operand_punct_valid_p (unsigned char code)
{
return (code == '@' || code == '*' || code == '+'
|| code == '&' || code == ';' || code == '~');
return (code == '@' || code == '*' || code == '+' || code == '&'
|| code == ';' || code == '~' || code == '^');
}
/* Print a memory operand whose address is ADDR. */

View File

@ -60,7 +60,9 @@
;; Y -- print condition for XOP pcom* instruction.
;; + -- print a branch hint as 'cs' or 'ds' prefix
;; ; -- 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 addr32 prefix if TARGET_64BIT and Pmode != word_mode
(define_c_enum "unspec" [
;; Relocation specifiers
@ -15678,17 +15680,17 @@
"ix86_current_function_needs_cld = 1;")
(define_insn "*strmovdi_rex_1"
[(set (mem:DI (match_operand:DI 2 "register_operand" "0"))
(mem:DI (match_operand:DI 3 "register_operand" "1")))
(set (match_operand:DI 0 "register_operand" "=D")
(plus:DI (match_dup 2)
(const_int 8)))
(set (match_operand:DI 1 "register_operand" "=S")
(plus:DI (match_dup 3)
(const_int 8)))]
[(set (mem:DI (match_operand:P 2 "register_operand" "0"))
(mem:DI (match_operand:P 3 "register_operand" "1")))
(set (match_operand:P 0 "register_operand" "=D")
(plus:P (match_dup 2)
(const_int 8)))
(set (match_operand:P 1 "register_operand" "=S")
(plus:P (match_dup 3)
(const_int 8)))]
"TARGET_64BIT
&& !(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"movsq"
"%^movsq"
[(set_attr "type" "str")
(set_attr "memory" "both")
(set_attr "mode" "DI")])
@ -15703,7 +15705,7 @@
(plus:P (match_dup 3)
(const_int 4)))]
"!(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"movs{l|d}"
"%^movs{l|d}"
[(set_attr "type" "str")
(set_attr "memory" "both")
(set_attr "mode" "SI")])
@ -15718,7 +15720,7 @@
(plus:P (match_dup 3)
(const_int 2)))]
"!(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"movsw"
"%^movsw"
[(set_attr "type" "str")
(set_attr "memory" "both")
(set_attr "mode" "HI")])
@ -15733,7 +15735,7 @@
(plus:P (match_dup 3)
(const_int 1)))]
"!(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"movsb"
"%^movsb"
[(set_attr "type" "str")
(set_attr "memory" "both")
(set (attr "prefix_rex")
@ -15756,20 +15758,20 @@
"ix86_current_function_needs_cld = 1;")
(define_insn "*rep_movdi_rex64"
[(set (match_operand:DI 2 "register_operand" "=c") (const_int 0))
(set (match_operand:DI 0 "register_operand" "=D")
(plus:DI (ashift:DI (match_operand:DI 5 "register_operand" "2")
(const_int 3))
(match_operand:DI 3 "register_operand" "0")))
(set (match_operand:DI 1 "register_operand" "=S")
(plus:DI (ashift:DI (match_dup 5) (const_int 3))
(match_operand:DI 4 "register_operand" "1")))
[(set (match_operand:P 2 "register_operand" "=c") (const_int 0))
(set (match_operand:P 0 "register_operand" "=D")
(plus:P (ashift:P (match_operand:P 5 "register_operand" "2")
(const_int 3))
(match_operand:P 3 "register_operand" "0")))
(set (match_operand:P 1 "register_operand" "=S")
(plus:P (ashift:P (match_dup 5) (const_int 3))
(match_operand:P 4 "register_operand" "1")))
(set (mem:BLK (match_dup 3))
(mem:BLK (match_dup 4)))
(use (match_dup 5))]
"TARGET_64BIT
&& !(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"rep{%;} movsq"
"%^rep{%;} movsq"
[(set_attr "type" "str")
(set_attr "prefix_rep" "1")
(set_attr "memory" "both")
@ -15788,7 +15790,7 @@
(mem:BLK (match_dup 4)))
(use (match_dup 5))]
"!(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 "prefix_rep" "1")
(set_attr "memory" "both")
@ -15805,7 +15807,7 @@
(mem:BLK (match_dup 4)))
(use (match_dup 5))]
"!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"rep{%;} movsb"
"%^rep{%;} movsb"
[(set_attr "type" "str")
(set_attr "prefix_rep" "1")
(set_attr "memory" "both")
@ -15866,14 +15868,14 @@
"ix86_current_function_needs_cld = 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"))
(set (match_operand:DI 0 "register_operand" "=D")
(plus:DI (match_dup 1)
(const_int 8)))]
(set (match_operand:P 0 "register_operand" "=D")
(plus:P (match_dup 1)
(const_int 8)))]
"TARGET_64BIT
&& !(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
"stosq"
"%^stosq"
[(set_attr "type" "str")
(set_attr "memory" "store")
(set_attr "mode" "DI")])
@ -15885,7 +15887,7 @@
(plus:P (match_dup 1)
(const_int 4)))]
"!(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
"stos{l|d}"
"%^stos{l|d}"
[(set_attr "type" "str")
(set_attr "memory" "store")
(set_attr "mode" "SI")])
@ -15897,7 +15899,7 @@
(plus:P (match_dup 1)
(const_int 2)))]
"!(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
"stosw"
"%^stosw"
[(set_attr "type" "str")
(set_attr "memory" "store")
(set_attr "mode" "HI")])
@ -15909,7 +15911,7 @@
(plus:P (match_dup 1)
(const_int 1)))]
"!(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
"stosb"
"%^stosb"
[(set_attr "type" "str")
(set_attr "memory" "store")
(set (attr "prefix_rex")
@ -15930,18 +15932,18 @@
"ix86_current_function_needs_cld = 1;")
(define_insn "*rep_stosdi_rex64"
[(set (match_operand:DI 1 "register_operand" "=c") (const_int 0))
(set (match_operand:DI 0 "register_operand" "=D")
(plus:DI (ashift:DI (match_operand:DI 4 "register_operand" "1")
(const_int 3))
(match_operand:DI 3 "register_operand" "0")))
[(set (match_operand:P 1 "register_operand" "=c") (const_int 0))
(set (match_operand:P 0 "register_operand" "=D")
(plus:P (ashift:P (match_operand:P 4 "register_operand" "1")
(const_int 3))
(match_operand:P 3 "register_operand" "0")))
(set (mem:BLK (match_dup 3))
(const_int 0))
(use (match_operand:DI 2 "register_operand" "a"))
(use (match_dup 4))]
"TARGET_64BIT
&& !(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
"rep{%;} stosq"
"%^rep{%;} stosq"
[(set_attr "type" "str")
(set_attr "prefix_rep" "1")
(set_attr "memory" "store")
@ -15958,7 +15960,7 @@
(use (match_operand:SI 2 "register_operand" "a"))
(use (match_dup 4))]
"!(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 "prefix_rep" "1")
(set_attr "memory" "store")
@ -15974,7 +15976,7 @@
(use (match_operand:QI 2 "register_operand" "a"))
(use (match_dup 4))]
"!(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
"rep{%;} stosb"
"%^rep{%;} stosb"
[(set_attr "type" "str")
(set_attr "prefix_rep" "1")
(set_attr "memory" "store")
@ -16095,7 +16097,7 @@
(clobber (match_operand:P 1 "register_operand" "=D"))
(clobber (match_operand:P 2 "register_operand" "=c"))]
"!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"repz{%;} cmpsb"
"%^repz{%;} cmpsb"
[(set_attr "type" "str")
(set_attr "mode" "QI")
(set (attr "prefix_rex")
@ -16135,7 +16137,7 @@
(clobber (match_operand:P 1 "register_operand" "=D"))
(clobber (match_operand:P 2 "register_operand" "=c"))]
"!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
"repz{%;} cmpsb"
"%^repz{%;} cmpsb"
[(set_attr "type" "str")
(set_attr "mode" "QI")
(set (attr "prefix_rex")
@ -16176,7 +16178,7 @@
(clobber (match_operand:P 1 "register_operand" "=D"))
(clobber (reg:CC FLAGS_REG))]
"!(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
"repnz{%;} scasb"
"%^repnz{%;} scasb"
[(set_attr "type" "str")
(set_attr "mode" "QI")
(set (attr "prefix_rex")