i386.c (ix86_expand_builtin): Generate reg for readflags built-in when optimizing.
* config/i386/i386.c (ix86_expand_builtin): Generate reg for readflags built-in when optimizing. * config/i386/i386.md (*pushfl<mode>): Rename to ... (pushfl<mode>2): This. Fix iterator. (*popfl<mode>): Rename to ... (*popfl<mode>1): This. Fix iterator. From-SVN: r205707
This commit is contained in:
parent
9e36c9ed20
commit
1c0f1f4652
|
@ -1,6 +1,15 @@
|
|||
2013-12-05 Kirill Yukhin <kirill.yukhin@intel.com>
|
||||
|
||||
* config/i386/i386.c(IX86_BUILTIN_READ_FLAGS): New.
|
||||
* config/i386/i386.c (ix86_expand_builtin): Generate
|
||||
reg for readflags built-in when optimizing.
|
||||
* config/i386/i386.md (*pushfl<mode>): Rename to ...
|
||||
(pushfl<mode>2): This. Fix iterator.
|
||||
(*popfl<mode>): Rename to ...
|
||||
(*popfl<mode>1): This. Fix iterator.
|
||||
|
||||
2013-12-05 Kirill Yukhin <kirill.yukhin@intel.com>
|
||||
|
||||
* config/i386/i386.c (IX86_BUILTIN_READ_FLAGS): New.
|
||||
(IX86_BUILTIN_WRITE_FLAGS): Ditto.
|
||||
(ix86_init_mmx_sse_builtins): Define
|
||||
__builtin_ia32_writeeflags_u32, __builtin_ia32_writeeflags_u64,
|
||||
|
|
|
@ -33457,8 +33457,9 @@ addcarryx:
|
|||
case IX86_BUILTIN_READ_FLAGS:
|
||||
emit_insn (gen_push (gen_rtx_REG (word_mode, FLAGS_REG)));
|
||||
|
||||
if (target == NULL_RTX
|
||||
|| !register_operand (target, word_mode)
|
||||
if (optimize
|
||||
|| target == NULL_RTX
|
||||
|| !nonimmediate_operand (target, word_mode)
|
||||
|| GET_MODE (target) != word_mode)
|
||||
target = gen_reg_rtx (word_mode);
|
||||
|
||||
|
|
|
@ -1722,17 +1722,17 @@
|
|||
[(set_attr "type" "pop")
|
||||
(set_attr "mode" "<MODE>")])
|
||||
|
||||
(define_insn "*pushfl<mode>"
|
||||
[(set (match_operand:DWIH 0 "push_operand" "=<")
|
||||
(match_operand:DWIH 1 "flags_reg_operand"))]
|
||||
(define_insn "*pushfl<mode>2"
|
||||
[(set (match_operand:W 0 "push_operand" "=<")
|
||||
(match_operand:W 1 "flags_reg_operand"))]
|
||||
""
|
||||
"pushf{<imodesuffix>}"
|
||||
[(set_attr "type" "push")
|
||||
(set_attr "mode" "<MODE>")])
|
||||
|
||||
(define_insn "*popfl<mode>"
|
||||
[(set (match_operand:DWIH 0 "flags_reg_operand")
|
||||
(match_operand:DWIH 1 "pop_operand" ">"))]
|
||||
(define_insn "*popfl<mode>1"
|
||||
[(set (match_operand:W 0 "flags_reg_operand")
|
||||
(match_operand:W 1 "pop_operand" ">"))]
|
||||
""
|
||||
"popf{<imodesuffix>}"
|
||||
[(set_attr "type" "pop")
|
||||
|
|
Loading…
Reference in New Issue