i386.md (FIST_ROUNDING): New int iterator.

* config/i386/i386.md (FIST_ROUNDING): New int iterator.
	(rounding): Handle UNSPEC_FIST_{FLOOR,CEIL}.
	(ROUNDING): Ditto.
	(*fist<mode>2_<rounding>_1): Macroize insn from
	*fist<mode>2_{floor,ceil}_1 using FIST_ROUNDING int iterator.
	(fistdi2_<rounding>): Macroize insn from
	fistdi2_{floor,ceil} using FIST_ROUNDING int iterator.
	(fistdi2_<rounding>_with_temp and splitters): Macroize insn and
	corresponding splitters from fistdi2_{floor,ceil} and corresponding
	splitters using FIST_ROUNDING int iterator.
	(fist<mode>2_<rounding>): Macroize insn from
	fist<mode>2_{floor,ceil} using FIST_ROUNDING int iterator.
	(fist<mode>2_<rounding>_with_temp and splitters): Macroize insn and
	corresponding splitters from fist<mode>2_{floor,ceil} and corresponding
	splitters using FIST_ROUNDING int iterator.
	(l<rounding>xf<mode>2): Macroize expander from l{floor,ceil}xf<mode>2
	using FIST_ROUNDING int iterator.

From-SVN: r188789
This commit is contained in:
Uros Bizjak 2012-06-19 20:24:26 +02:00 committed by Uros Bizjak
parent 3a6a2759a6
commit e42d5b2d0e
2 changed files with 208 additions and 334 deletions

View File

@ -1,3 +1,23 @@
2012-06-19 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (FIST_ROUNDING): New int iterator.
(rounding): Handle UNSPEC_FIST_{FLOOR,CEIL}.
(ROUNDING): Ditto.
(*fist<mode>2_<rounding>_1): Macroize insn from
*fist<mode>2_{floor,ceil}_1 using FIST_ROUNDING int iterator.
(fistdi2_<rounding>): Macroize insn from
fistdi2_{floor,ceil} using FIST_ROUNDING int iterator.
(fistdi2_<rounding>_with_temp and splitters): Macroize insn and
corresponding splitters from fistdi2_{floor,ceil} and corresponding
splitters using FIST_ROUNDING int iterator.
(fist<mode>2_<rounding>): Macroize insn from
fist<mode>2_{floor,ceil} using FIST_ROUNDING int iterator.
(fist<mode>2_<rounding>_with_temp and splitters): Macroize insn and
corresponding splitters from fist<mode>2_{floor,ceil} and corresponding
splitters using FIST_ROUNDING int iterator.
(l<rounding>xf<mode>2): Macroize expander from l{floor,ceil}xf<mode>2
using FIST_ROUNDING int iterator.
2012-06-19 Richard Henderson <rth@redhat.com>
* config/i386/i386-protos.h (ix86_expand_sse2_mulv4si3): Declare.

View File

@ -15104,15 +15104,23 @@
UNSPEC_FRNDINT_CEIL
UNSPEC_FRNDINT_TRUNC])
(define_int_iterator FIST_ROUNDING
[UNSPEC_FIST_FLOOR
UNSPEC_FIST_CEIL])
(define_int_attr rounding
[(UNSPEC_FRNDINT_FLOOR "floor")
(UNSPEC_FRNDINT_CEIL "ceil")
(UNSPEC_FRNDINT_TRUNC "trunc")])
(UNSPEC_FRNDINT_TRUNC "trunc")
(UNSPEC_FIST_FLOOR "floor")
(UNSPEC_FIST_CEIL "ceil")])
(define_int_attr ROUNDING
[(UNSPEC_FRNDINT_FLOOR "FLOOR")
(UNSPEC_FRNDINT_CEIL "CEIL")
(UNSPEC_FRNDINT_TRUNC "TRUNC")])
(UNSPEC_FRNDINT_TRUNC "TRUNC")
(UNSPEC_FIST_FLOOR "FLOOR")
(UNSPEC_FIST_CEIL "CEIL")])
;; Rounding mode control word calculation could clobber FLAGS_REG.
(define_insn_and_split "frndintxf2_<rounding>"
@ -15205,173 +15213,6 @@
DONE;
})
(define_insn_and_split "*fist<mode>2_floor_1"
[(set (match_operand:SWI248x 0 "nonimmediate_operand")
(unspec:SWI248x [(match_operand:XF 1 "register_operand")]
UNSPEC_FIST_FLOOR))
(clobber (reg:CC FLAGS_REG))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations
&& can_create_pseudo_p ()"
"#"
"&& 1"
[(const_int 0)]
{
ix86_optimize_mode_switching[I387_FLOOR] = 1;
operands[2] = assign_386_stack_local (HImode, SLOT_CW_STORED);
operands[3] = assign_386_stack_local (HImode, SLOT_CW_FLOOR);
if (memory_operand (operands[0], VOIDmode))
emit_insn (gen_fist<mode>2_floor (operands[0], operands[1],
operands[2], operands[3]));
else
{
operands[4] = assign_386_stack_local (<MODE>mode, SLOT_TEMP);
emit_insn (gen_fist<mode>2_floor_with_temp (operands[0], operands[1],
operands[2], operands[3],
operands[4]));
}
DONE;
}
[(set_attr "type" "fistp")
(set_attr "i387_cw" "floor")
(set_attr "mode" "<MODE>")])
(define_insn "fistdi2_floor"
[(set (match_operand:DI 0 "memory_operand" "=m")
(unspec:DI [(match_operand:XF 1 "register_operand" "f")]
UNSPEC_FIST_FLOOR))
(use (match_operand:HI 2 "memory_operand" "m"))
(use (match_operand:HI 3 "memory_operand" "m"))
(clobber (match_scratch:XF 4 "=&1f"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
"* return output_fix_trunc (insn, operands, false);"
[(set_attr "type" "fistp")
(set_attr "i387_cw" "floor")
(set_attr "mode" "DI")])
(define_insn "fistdi2_floor_with_temp"
[(set (match_operand:DI 0 "nonimmediate_operand" "=m,?r")
(unspec:DI [(match_operand:XF 1 "register_operand" "f,f")]
UNSPEC_FIST_FLOOR))
(use (match_operand:HI 2 "memory_operand" "m,m"))
(use (match_operand:HI 3 "memory_operand" "m,m"))
(clobber (match_operand:DI 4 "memory_operand" "=X,m"))
(clobber (match_scratch:XF 5 "=&1f,&1f"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
"#"
[(set_attr "type" "fistp")
(set_attr "i387_cw" "floor")
(set_attr "mode" "DI")])
(define_split
[(set (match_operand:DI 0 "register_operand")
(unspec:DI [(match_operand:XF 1 "register_operand")]
UNSPEC_FIST_FLOOR))
(use (match_operand:HI 2 "memory_operand"))
(use (match_operand:HI 3 "memory_operand"))
(clobber (match_operand:DI 4 "memory_operand"))
(clobber (match_scratch 5))]
"reload_completed"
[(parallel [(set (match_dup 4)
(unspec:DI [(match_dup 1)] UNSPEC_FIST_FLOOR))
(use (match_dup 2))
(use (match_dup 3))
(clobber (match_dup 5))])
(set (match_dup 0) (match_dup 4))])
(define_split
[(set (match_operand:DI 0 "memory_operand")
(unspec:DI [(match_operand:XF 1 "register_operand")]
UNSPEC_FIST_FLOOR))
(use (match_operand:HI 2 "memory_operand"))
(use (match_operand:HI 3 "memory_operand"))
(clobber (match_operand:DI 4 "memory_operand"))
(clobber (match_scratch 5))]
"reload_completed"
[(parallel [(set (match_dup 0)
(unspec:DI [(match_dup 1)] UNSPEC_FIST_FLOOR))
(use (match_dup 2))
(use (match_dup 3))
(clobber (match_dup 5))])])
(define_insn "fist<mode>2_floor"
[(set (match_operand:SWI24 0 "memory_operand" "=m")
(unspec:SWI24 [(match_operand:XF 1 "register_operand" "f")]
UNSPEC_FIST_FLOOR))
(use (match_operand:HI 2 "memory_operand" "m"))
(use (match_operand:HI 3 "memory_operand" "m"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
"* return output_fix_trunc (insn, operands, false);"
[(set_attr "type" "fistp")
(set_attr "i387_cw" "floor")
(set_attr "mode" "<MODE>")])
(define_insn "fist<mode>2_floor_with_temp"
[(set (match_operand:SWI24 0 "nonimmediate_operand" "=m,?r")
(unspec:SWI24 [(match_operand:XF 1 "register_operand" "f,f")]
UNSPEC_FIST_FLOOR))
(use (match_operand:HI 2 "memory_operand" "m,m"))
(use (match_operand:HI 3 "memory_operand" "m,m"))
(clobber (match_operand:SWI24 4 "memory_operand" "=X,m"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
"#"
[(set_attr "type" "fistp")
(set_attr "i387_cw" "floor")
(set_attr "mode" "<MODE>")])
(define_split
[(set (match_operand:SWI24 0 "register_operand")
(unspec:SWI24 [(match_operand:XF 1 "register_operand")]
UNSPEC_FIST_FLOOR))
(use (match_operand:HI 2 "memory_operand"))
(use (match_operand:HI 3 "memory_operand"))
(clobber (match_operand:SWI24 4 "memory_operand"))]
"reload_completed"
[(parallel [(set (match_dup 4)
(unspec:SWI24 [(match_dup 1)] UNSPEC_FIST_FLOOR))
(use (match_dup 2))
(use (match_dup 3))])
(set (match_dup 0) (match_dup 4))])
(define_split
[(set (match_operand:SWI24 0 "memory_operand")
(unspec:SWI24 [(match_operand:XF 1 "register_operand")]
UNSPEC_FIST_FLOOR))
(use (match_operand:HI 2 "memory_operand"))
(use (match_operand:HI 3 "memory_operand"))
(clobber (match_operand:SWI24 4 "memory_operand"))]
"reload_completed"
[(parallel [(set (match_dup 0)
(unspec:SWI24 [(match_dup 1)] UNSPEC_FIST_FLOOR))
(use (match_dup 2))
(use (match_dup 3))])])
(define_expand "lfloorxf<mode>2"
[(parallel [(set (match_operand:SWI248x 0 "nonimmediate_operand")
(unspec:SWI248x [(match_operand:XF 1 "register_operand")]
UNSPEC_FIST_FLOOR))
(clobber (reg:CC FLAGS_REG))])]
"TARGET_USE_FANCY_MATH_387
&& (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations")
(define_expand "lfloor<MODEF:mode><SWI48:mode>2"
[(match_operand:SWI48 0 "nonimmediate_operand")
(match_operand:MODEF 1 "register_operand")]
"SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH
&& !flag_trapping_math"
{
if (TARGET_64BIT && optimize_insn_for_size_p ())
FAIL;
ix86_expand_lfloorceil (operands[0], operands[1], true);
DONE;
})
(define_expand "ceilxf2"
[(use (match_operand:XF 0 "register_operand"))
(use (match_operand:XF 1 "register_operand"))]
@ -15424,171 +15265,6 @@
DONE;
})
(define_insn_and_split "*fist<mode>2_ceil_1"
[(set (match_operand:SWI248x 0 "nonimmediate_operand")
(unspec:SWI248x [(match_operand:XF 1 "register_operand")]
UNSPEC_FIST_CEIL))
(clobber (reg:CC FLAGS_REG))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations
&& can_create_pseudo_p ()"
"#"
"&& 1"
[(const_int 0)]
{
ix86_optimize_mode_switching[I387_CEIL] = 1;
operands[2] = assign_386_stack_local (HImode, SLOT_CW_STORED);
operands[3] = assign_386_stack_local (HImode, SLOT_CW_CEIL);
if (memory_operand (operands[0], VOIDmode))
emit_insn (gen_fist<mode>2_ceil (operands[0], operands[1],
operands[2], operands[3]));
else
{
operands[4] = assign_386_stack_local (<MODE>mode, SLOT_TEMP);
emit_insn (gen_fist<mode>2_ceil_with_temp (operands[0], operands[1],
operands[2], operands[3],
operands[4]));
}
DONE;
}
[(set_attr "type" "fistp")
(set_attr "i387_cw" "ceil")
(set_attr "mode" "<MODE>")])
(define_insn "fistdi2_ceil"
[(set (match_operand:DI 0 "memory_operand" "=m")
(unspec:DI [(match_operand:XF 1 "register_operand" "f")]
UNSPEC_FIST_CEIL))
(use (match_operand:HI 2 "memory_operand" "m"))
(use (match_operand:HI 3 "memory_operand" "m"))
(clobber (match_scratch:XF 4 "=&1f"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
"* return output_fix_trunc (insn, operands, false);"
[(set_attr "type" "fistp")
(set_attr "i387_cw" "ceil")
(set_attr "mode" "DI")])
(define_insn "fistdi2_ceil_with_temp"
[(set (match_operand:DI 0 "nonimmediate_operand" "=m,?r")
(unspec:DI [(match_operand:XF 1 "register_operand" "f,f")]
UNSPEC_FIST_CEIL))
(use (match_operand:HI 2 "memory_operand" "m,m"))
(use (match_operand:HI 3 "memory_operand" "m,m"))
(clobber (match_operand:DI 4 "memory_operand" "=X,m"))
(clobber (match_scratch:XF 5 "=&1f,&1f"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
"#"
[(set_attr "type" "fistp")
(set_attr "i387_cw" "ceil")
(set_attr "mode" "DI")])
(define_split
[(set (match_operand:DI 0 "register_operand")
(unspec:DI [(match_operand:XF 1 "register_operand")]
UNSPEC_FIST_CEIL))
(use (match_operand:HI 2 "memory_operand"))
(use (match_operand:HI 3 "memory_operand"))
(clobber (match_operand:DI 4 "memory_operand"))
(clobber (match_scratch 5))]
"reload_completed"
[(parallel [(set (match_dup 4)
(unspec:DI [(match_dup 1)] UNSPEC_FIST_CEIL))
(use (match_dup 2))
(use (match_dup 3))
(clobber (match_dup 5))])
(set (match_dup 0) (match_dup 4))])
(define_split
[(set (match_operand:DI 0 "memory_operand")
(unspec:DI [(match_operand:XF 1 "register_operand")]
UNSPEC_FIST_CEIL))
(use (match_operand:HI 2 "memory_operand"))
(use (match_operand:HI 3 "memory_operand"))
(clobber (match_operand:DI 4 "memory_operand"))
(clobber (match_scratch 5))]
"reload_completed"
[(parallel [(set (match_dup 0)
(unspec:DI [(match_dup 1)] UNSPEC_FIST_CEIL))
(use (match_dup 2))
(use (match_dup 3))
(clobber (match_dup 5))])])
(define_insn "fist<mode>2_ceil"
[(set (match_operand:SWI24 0 "memory_operand" "=m")
(unspec:SWI24 [(match_operand:XF 1 "register_operand" "f")]
UNSPEC_FIST_CEIL))
(use (match_operand:HI 2 "memory_operand" "m"))
(use (match_operand:HI 3 "memory_operand" "m"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
"* return output_fix_trunc (insn, operands, false);"
[(set_attr "type" "fistp")
(set_attr "i387_cw" "ceil")
(set_attr "mode" "<MODE>")])
(define_insn "fist<mode>2_ceil_with_temp"
[(set (match_operand:SWI24 0 "nonimmediate_operand" "=m,?r")
(unspec:SWI24 [(match_operand:XF 1 "register_operand" "f,f")]
UNSPEC_FIST_CEIL))
(use (match_operand:HI 2 "memory_operand" "m,m"))
(use (match_operand:HI 3 "memory_operand" "m,m"))
(clobber (match_operand:SWI24 4 "memory_operand" "=X,m"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
"#"
[(set_attr "type" "fistp")
(set_attr "i387_cw" "ceil")
(set_attr "mode" "<MODE>")])
(define_split
[(set (match_operand:SWI24 0 "register_operand")
(unspec:SWI24 [(match_operand:XF 1 "register_operand")]
UNSPEC_FIST_CEIL))
(use (match_operand:HI 2 "memory_operand"))
(use (match_operand:HI 3 "memory_operand"))
(clobber (match_operand:SWI24 4 "memory_operand"))]
"reload_completed"
[(parallel [(set (match_dup 4)
(unspec:SWI24 [(match_dup 1)] UNSPEC_FIST_CEIL))
(use (match_dup 2))
(use (match_dup 3))])
(set (match_dup 0) (match_dup 4))])
(define_split
[(set (match_operand:SWI24 0 "memory_operand")
(unspec:SWI24 [(match_operand:XF 1 "register_operand")]
UNSPEC_FIST_CEIL))
(use (match_operand:HI 2 "memory_operand"))
(use (match_operand:HI 3 "memory_operand"))
(clobber (match_operand:SWI24 4 "memory_operand"))]
"reload_completed"
[(parallel [(set (match_dup 0)
(unspec:SWI24 [(match_dup 1)] UNSPEC_FIST_CEIL))
(use (match_dup 2))
(use (match_dup 3))])])
(define_expand "lceilxf<mode>2"
[(parallel [(set (match_operand:SWI248x 0 "nonimmediate_operand")
(unspec:SWI248x [(match_operand:XF 1 "register_operand")]
UNSPEC_FIST_CEIL))
(clobber (reg:CC FLAGS_REG))])]
"TARGET_USE_FANCY_MATH_387
&& (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations")
(define_expand "lceil<MODEF:mode><SWI48:mode>2"
[(match_operand:SWI48 0 "nonimmediate_operand")
(match_operand:MODEF 1 "register_operand")]
"SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH
&& !flag_trapping_math"
{
ix86_expand_lfloorceil (operands[0], operands[1], false);
DONE;
})
(define_expand "btruncxf2"
[(use (match_operand:XF 0 "register_operand"))
(use (match_operand:XF 1 "register_operand"))]
@ -15708,6 +15384,184 @@
DONE;
})
;; Rounding mode control word calculation could clobber FLAGS_REG.
(define_insn_and_split "*fist<mode>2_<rounding>_1"
[(set (match_operand:SWI248x 0 "nonimmediate_operand")
(unspec:SWI248x [(match_operand:XF 1 "register_operand")]
FIST_ROUNDING))
(clobber (reg:CC FLAGS_REG))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations
&& can_create_pseudo_p ()"
"#"
"&& 1"
[(const_int 0)]
{
ix86_optimize_mode_switching[I387_<ROUNDING>] = 1;
operands[2] = assign_386_stack_local (HImode, SLOT_CW_STORED);
operands[3] = assign_386_stack_local (HImode, SLOT_CW_<ROUNDING>);
if (memory_operand (operands[0], VOIDmode))
emit_insn (gen_fist<mode>2_<rounding> (operands[0], operands[1],
operands[2], operands[3]));
else
{
operands[4] = assign_386_stack_local (<MODE>mode, SLOT_TEMP);
emit_insn (gen_fist<mode>2_<rounding>_with_temp
(operands[0], operands[1], operands[2],
operands[3], operands[4]));
}
DONE;
}
[(set_attr "type" "fistp")
(set_attr "i387_cw" "<rounding>")
(set_attr "mode" "<MODE>")])
(define_insn "fistdi2_<rounding>"
[(set (match_operand:DI 0 "memory_operand" "=m")
(unspec:DI [(match_operand:XF 1 "register_operand" "f")]
FIST_ROUNDING))
(use (match_operand:HI 2 "memory_operand" "m"))
(use (match_operand:HI 3 "memory_operand" "m"))
(clobber (match_scratch:XF 4 "=&1f"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
"* return output_fix_trunc (insn, operands, false);"
[(set_attr "type" "fistp")
(set_attr "i387_cw" "<rounding>")
(set_attr "mode" "DI")])
(define_insn "fistdi2_<rounding>_with_temp"
[(set (match_operand:DI 0 "nonimmediate_operand" "=m,?r")
(unspec:DI [(match_operand:XF 1 "register_operand" "f,f")]
FIST_ROUNDING))
(use (match_operand:HI 2 "memory_operand" "m,m"))
(use (match_operand:HI 3 "memory_operand" "m,m"))
(clobber (match_operand:DI 4 "memory_operand" "=X,m"))
(clobber (match_scratch:XF 5 "=&1f,&1f"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
"#"
[(set_attr "type" "fistp")
(set_attr "i387_cw" "<rounding>")
(set_attr "mode" "DI")])
(define_split
[(set (match_operand:DI 0 "register_operand")
(unspec:DI [(match_operand:XF 1 "register_operand")]
FIST_ROUNDING))
(use (match_operand:HI 2 "memory_operand"))
(use (match_operand:HI 3 "memory_operand"))
(clobber (match_operand:DI 4 "memory_operand"))
(clobber (match_scratch 5))]
"reload_completed"
[(parallel [(set (match_dup 4)
(unspec:DI [(match_dup 1)] FIST_ROUNDING))
(use (match_dup 2))
(use (match_dup 3))
(clobber (match_dup 5))])
(set (match_dup 0) (match_dup 4))])
(define_split
[(set (match_operand:DI 0 "memory_operand")
(unspec:DI [(match_operand:XF 1 "register_operand")]
FIST_ROUNDING))
(use (match_operand:HI 2 "memory_operand"))
(use (match_operand:HI 3 "memory_operand"))
(clobber (match_operand:DI 4 "memory_operand"))
(clobber (match_scratch 5))]
"reload_completed"
[(parallel [(set (match_dup 0)
(unspec:DI [(match_dup 1)] FIST_ROUNDING))
(use (match_dup 2))
(use (match_dup 3))
(clobber (match_dup 5))])])
(define_insn "fist<mode>2_<rounding>"
[(set (match_operand:SWI24 0 "memory_operand" "=m")
(unspec:SWI24 [(match_operand:XF 1 "register_operand" "f")]
FIST_ROUNDING))
(use (match_operand:HI 2 "memory_operand" "m"))
(use (match_operand:HI 3 "memory_operand" "m"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
"* return output_fix_trunc (insn, operands, false);"
[(set_attr "type" "fistp")
(set_attr "i387_cw" "<rounding>")
(set_attr "mode" "<MODE>")])
(define_insn "fist<mode>2_<rounding>_with_temp"
[(set (match_operand:SWI24 0 "nonimmediate_operand" "=m,?r")
(unspec:SWI24 [(match_operand:XF 1 "register_operand" "f,f")]
FIST_ROUNDING))
(use (match_operand:HI 2 "memory_operand" "m,m"))
(use (match_operand:HI 3 "memory_operand" "m,m"))
(clobber (match_operand:SWI24 4 "memory_operand" "=X,m"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
"#"
[(set_attr "type" "fistp")
(set_attr "i387_cw" "<rounding>")
(set_attr "mode" "<MODE>")])
(define_split
[(set (match_operand:SWI24 0 "register_operand")
(unspec:SWI24 [(match_operand:XF 1 "register_operand")]
FIST_ROUNDING))
(use (match_operand:HI 2 "memory_operand"))
(use (match_operand:HI 3 "memory_operand"))
(clobber (match_operand:SWI24 4 "memory_operand"))]
"reload_completed"
[(parallel [(set (match_dup 4)
(unspec:SWI24 [(match_dup 1)] FIST_ROUNDING))
(use (match_dup 2))
(use (match_dup 3))])
(set (match_dup 0) (match_dup 4))])
(define_split
[(set (match_operand:SWI24 0 "memory_operand")
(unspec:SWI24 [(match_operand:XF 1 "register_operand")]
FIST_ROUNDING))
(use (match_operand:HI 2 "memory_operand"))
(use (match_operand:HI 3 "memory_operand"))
(clobber (match_operand:SWI24 4 "memory_operand"))]
"reload_completed"
[(parallel [(set (match_dup 0)
(unspec:SWI24 [(match_dup 1)] FIST_ROUNDING))
(use (match_dup 2))
(use (match_dup 3))])])
(define_expand "l<rounding>xf<mode>2"
[(parallel [(set (match_operand:SWI248x 0 "nonimmediate_operand")
(unspec:SWI248x [(match_operand:XF 1 "register_operand")]
FIST_ROUNDING))
(clobber (reg:CC FLAGS_REG))])]
"TARGET_USE_FANCY_MATH_387
&& (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations")
(define_expand "lfloor<MODEF:mode><SWI48:mode>2"
[(match_operand:SWI48 0 "nonimmediate_operand")
(match_operand:MODEF 1 "register_operand")]
"SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH
&& !flag_trapping_math"
{
if (TARGET_64BIT && optimize_insn_for_size_p ())
FAIL;
ix86_expand_lfloorceil (operands[0], operands[1], true);
DONE;
})
(define_expand "lceil<MODEF:mode><SWI48:mode>2"
[(match_operand:SWI48 0 "nonimmediate_operand")
(match_operand:MODEF 1 "register_operand")]
"SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH
&& !flag_trapping_math"
{
ix86_expand_lfloorceil (operands[0], operands[1], false);
DONE;
})
(define_insn "fxam<mode>2_i387"
[(set (match_operand:HI 0 "register_operand" "=a")
(unspec:HI