for (i = 2; i < 6; i++)
operands[i] = gen_reg_rtx (XFmode);
- operands[3] = force_reg (XFmode, CONST1_RTX (XFmode));
+ emit_move_insn (operands[3], CONST1_RTX (XFmode));
})
(define_expand "asin<mode>2"
for (i = 2; i < 6; i++)
operands[i] = gen_reg_rtx (XFmode);
- operands[3] = force_reg (XFmode, CONST1_RTX (XFmode));
+ emit_move_insn (operands[3], CONST1_RTX (XFmode));
})
(define_expand "acos<mode>2"
(set_attr "znver1_decode" "vector")
(set_attr "mode" "XF")])
-(define_insn "fyl2x_extend<mode>xf3_i387"
- [(set (match_operand:XF 0 "register_operand" "=f")
- (unspec:XF [(float_extend:XF
- (match_operand:MODEF 1 "register_operand" "0"))
- (match_operand:XF 2 "register_operand" "u")]
- UNSPEC_FYL2X))
- (clobber (match_scratch:XF 3 "=2"))]
- "TARGET_USE_FANCY_MATH_387
- && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
- || TARGET_MIX_SSE_I387)
- && flag_unsafe_math_optimizations"
- "fyl2x"
- [(set_attr "type" "fpspc")
- (set_attr "znver1_decode" "vector")
- (set_attr "mode" "XF")])
-
(define_expand "logxf2"
[(parallel [(set (match_operand:XF 0 "register_operand")
(unspec:XF [(match_operand:XF 1 "register_operand")
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
{
- operands[2] = gen_reg_rtx (XFmode);
- emit_move_insn (operands[2], standard_80387_constant_rtx (4)); /* fldln2 */
+ operands[2]
+ = force_reg (XFmode, standard_80387_constant_rtx (4)); /* fldln2 */
})
(define_expand "log<mode>2"
[(use (match_operand:MODEF 0 "register_operand"))
- (use (match_operand:MODEF 1 "register_operand"))]
+ (use (match_operand:MODEF 1 "general_operand"))]
"TARGET_USE_FANCY_MATH_387
&& (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
|| TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations"
{
rtx op0 = gen_reg_rtx (XFmode);
+ rtx op1 = gen_reg_rtx (XFmode);
- rtx op2 = gen_reg_rtx (XFmode);
- emit_move_insn (op2, standard_80387_constant_rtx (4)); /* fldln2 */
-
- emit_insn (gen_fyl2x_extend<mode>xf3_i387 (op0, operands[1], op2));
+ emit_insn (gen_extend<mode>xf2 (op1, operands[1]));
+ emit_insn (gen_logxf2 (op0, op1));
emit_insn (gen_truncxf<mode>2 (operands[0], op0));
DONE;
})
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
{
- operands[2] = gen_reg_rtx (XFmode);
- emit_move_insn (operands[2], standard_80387_constant_rtx (3)); /* fldlg2 */
+ operands[2]
+ = force_reg (XFmode, standard_80387_constant_rtx (3)); /* fldlg2 */
})
(define_expand "log10<mode>2"
[(use (match_operand:MODEF 0 "register_operand"))
- (use (match_operand:MODEF 1 "register_operand"))]
+ (use (match_operand:MODEF 1 "general_operand"))]
"TARGET_USE_FANCY_MATH_387
&& (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
|| TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations"
{
rtx op0 = gen_reg_rtx (XFmode);
+ rtx op1 = gen_reg_rtx (XFmode);
- rtx op2 = gen_reg_rtx (XFmode);
- emit_move_insn (op2, standard_80387_constant_rtx (3)); /* fldlg2 */
-
- emit_insn (gen_fyl2x_extend<mode>xf3_i387 (op0, operands[1], op2));
+ emit_insn (gen_extend<mode>xf2 (op1, operands[1]));
+ emit_insn (gen_log10xf2 (op0, op1));
emit_insn (gen_truncxf<mode>2 (operands[0], op0));
DONE;
})
(clobber (match_scratch:XF 3))])]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
-{
- operands[2] = gen_reg_rtx (XFmode);
- emit_move_insn (operands[2], CONST1_RTX (XFmode)); /* fld1 */
-})
+ "operands[2] = force_reg (XFmode, CONST1_RTX (XFmode));")
(define_expand "log2<mode>2"
[(use (match_operand:MODEF 0 "register_operand"))
- (use (match_operand:MODEF 1 "register_operand"))]
+ (use (match_operand:MODEF 1 "general_operand"))]
"TARGET_USE_FANCY_MATH_387
&& (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
|| TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations"
{
rtx op0 = gen_reg_rtx (XFmode);
+ rtx op1 = gen_reg_rtx (XFmode);
- rtx op2 = gen_reg_rtx (XFmode);
- emit_move_insn (op2, CONST1_RTX (XFmode)); /* fld1 */
-
- emit_insn (gen_fyl2x_extend<mode>xf3_i387 (op0, operands[1], op2));
+ emit_insn (gen_extend<mode>xf2 (op1, operands[1]));
+ emit_insn (gen_log2xf2 (op0, op1));
emit_insn (gen_truncxf<mode>2 (operands[0], op0));
DONE;
})
(set_attr "znver1_decode" "vector")
(set_attr "mode" "XF")])
-(define_insn "fyl2xp1_extend<mode>xf3_i387"
- [(set (match_operand:XF 0 "register_operand" "=f")
- (unspec:XF [(float_extend:XF
- (match_operand:MODEF 1 "register_operand" "0"))
- (match_operand:XF 2 "register_operand" "u")]
- UNSPEC_FYL2XP1))
- (clobber (match_scratch:XF 3 "=2"))]
- "TARGET_USE_FANCY_MATH_387
- && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
- || TARGET_MIX_SSE_I387)
- && flag_unsafe_math_optimizations"
- "fyl2xp1"
- [(set_attr "type" "fpspc")
- (set_attr "znver1_decode" "vector")
- (set_attr "mode" "XF")])
-
(define_expand "log1pxf2"
[(use (match_operand:XF 0 "register_operand"))
(use (match_operand:XF 1 "register_operand"))]
(define_expand "log1p<mode>2"
[(use (match_operand:MODEF 0 "register_operand"))
- (use (match_operand:MODEF 1 "register_operand"))]
+ (use (match_operand:MODEF 1 "general_operand"))]
"TARGET_USE_FANCY_MATH_387
&& (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
|| TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations"
{
- rtx op0;
-
- op0 = gen_reg_rtx (XFmode);
-
- operands[1] = gen_rtx_FLOAT_EXTEND (XFmode, operands[1]);
+ rtx op0 = gen_reg_rtx (XFmode);
+ rtx op1 = gen_reg_rtx (XFmode);
- ix86_emit_i387_log1p (op0, operands[1]);
+ emit_insn (gen_extend<mode>xf2 (op1, operands[1]));
+ emit_insn (gen_log1pxf2 (op0, op1));
emit_insn (gen_truncxf<mode>2 (operands[0], op0));
DONE;
})
(set_attr "znver1_decode" "vector")
(set_attr "mode" "XF")])
-(define_insn "fxtract_extend<mode>xf3_i387"
- [(set (match_operand:XF 0 "register_operand" "=f")
- (unspec:XF [(float_extend:XF
- (match_operand:MODEF 2 "register_operand" "0"))]
- UNSPEC_XTRACT_FRACT))
- (set (match_operand:XF 1 "register_operand" "=u")
- (unspec:XF [(float_extend:XF (match_dup 2))] UNSPEC_XTRACT_EXP))]
- "TARGET_USE_FANCY_MATH_387
- && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
- || TARGET_MIX_SSE_I387)
- && flag_unsafe_math_optimizations"
- "fxtract"
- [(set_attr "type" "fpspc")
- (set_attr "znver1_decode" "vector")
- (set_attr "mode" "XF")])
-
(define_expand "logbxf2"
[(parallel [(set (match_dup 2)
(unspec:XF [(match_operand:XF 1 "register_operand")]
(define_expand "logb<mode>2"
[(use (match_operand:MODEF 0 "register_operand"))
- (use (match_operand:MODEF 1 "register_operand"))]
+ (use (match_operand:MODEF 1 "general_operand"))]
"TARGET_USE_FANCY_MATH_387
&& (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
|| TARGET_MIX_SSE_I387)
rtx op0 = gen_reg_rtx (XFmode);
rtx op1 = gen_reg_rtx (XFmode);
- emit_insn (gen_fxtract_extend<mode>xf3_i387 (op0, op1, operands[1]));
+ emit_insn (gen_extend<mode>xf2 (op1, operands[1]));
+ emit_insn (gen_logbxf2 (op0, op1));
emit_insn (gen_truncxf<mode>2 (operands[0], op1));
DONE;
})
(define_expand "ilogb<mode>2"
[(use (match_operand:SI 0 "register_operand"))
- (use (match_operand:MODEF 1 "register_operand"))]
+ (use (match_operand:MODEF 1 "general_operand"))]
"TARGET_USE_FANCY_MATH_387
&& (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
|| TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations"
{
- rtx op0, op1;
+ rtx op0, op1, op2;
if (optimize_insn_for_size_p ())
FAIL;
op0 = gen_reg_rtx (XFmode);
op1 = gen_reg_rtx (XFmode);
+ op2 = gen_reg_rtx (XFmode);
- emit_insn (gen_fxtract_extend<mode>xf3_i387 (op0, op1, operands[1]));
+ emit_insn (gen_extend<mode>xf2 (op2, operands[1]));
+ emit_insn (gen_fxtractxf3_i387 (op0, op1, op2));
emit_insn (gen_fix_truncxfsi2 (operands[0], op1));
DONE;
})
for (i = 3; i < 10; i++)
operands[i] = gen_reg_rtx (XFmode);
- emit_move_insn (operands[7], CONST1_RTX (XFmode)); /* fld1 */
+ emit_move_insn (operands[7], CONST1_RTX (XFmode));
})
(define_expand "expxf2"
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
{
- rtx op2;
-
- op2 = gen_reg_rtx (XFmode);
- emit_move_insn (op2, standard_80387_constant_rtx (5)); /* fldl2e */
+ rtx op2 = force_reg (XFmode, standard_80387_constant_rtx (5)); /* fldl2e */
emit_insn (gen_expNcorexf3 (operands[0], operands[1], op2));
DONE;
|| TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations"
{
- rtx op0, op1;
-
- op0 = gen_reg_rtx (XFmode);
- op1 = gen_reg_rtx (XFmode);
+ rtx op0 = gen_reg_rtx (XFmode);
+ rtx op1 = gen_reg_rtx (XFmode);
emit_insn (gen_extend<mode>xf2 (op1, operands[1]));
emit_insn (gen_expxf2 (op0, op1));
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
{
- rtx op2;
-
- op2 = gen_reg_rtx (XFmode);
- emit_move_insn (op2, standard_80387_constant_rtx (6)); /* fldl2t */
+ rtx op2 = force_reg (XFmode, standard_80387_constant_rtx (6)); /* fldl2t */
emit_insn (gen_expNcorexf3 (operands[0], operands[1], op2));
DONE;
|| TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations"
{
- rtx op0, op1;
-
- op0 = gen_reg_rtx (XFmode);
- op1 = gen_reg_rtx (XFmode);
+ rtx op0 = gen_reg_rtx (XFmode);
+ rtx op1 = gen_reg_rtx (XFmode);
emit_insn (gen_extend<mode>xf2 (op1, operands[1]));
emit_insn (gen_exp10xf2 (op0, op1));
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
{
- rtx op2;
-
- op2 = gen_reg_rtx (XFmode);
- emit_move_insn (op2, CONST1_RTX (XFmode)); /* fld1 */
+ rtx op2 = force_reg (XFmode, CONST1_RTX (XFmode));
emit_insn (gen_expNcorexf3 (operands[0], operands[1], op2));
DONE;
|| TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations"
{
- rtx op0, op1;
-
- op0 = gen_reg_rtx (XFmode);
- op1 = gen_reg_rtx (XFmode);
+ rtx op0 = gen_reg_rtx (XFmode);
+ rtx op1 = gen_reg_rtx (XFmode);
emit_insn (gen_extend<mode>xf2 (op1, operands[1]));
emit_insn (gen_exp2xf2 (op0, op1));
(match_dup 2)))
(set (match_dup 4) (unspec:XF [(match_dup 3)] UNSPEC_FRNDINT))
(set (match_dup 5) (minus:XF (match_dup 3) (match_dup 4)))
- (set (match_dup 9) (float_extend:XF (match_dup 13)))
(set (match_dup 6) (unspec:XF [(match_dup 5)] UNSPEC_F2XM1))
(parallel [(set (match_dup 7)
(unspec:XF [(match_dup 6) (match_dup 4)]
(set (match_dup 11)
(unspec:XF [(match_dup 9) (match_dup 8)]
UNSPEC_FSCALE_EXP))])
- (set (match_dup 12) (minus:XF (match_dup 10)
- (float_extend:XF (match_dup 13))))
+ (set (match_dup 12) (minus:XF (match_dup 10) (match_dup 9)))
(set (match_operand:XF 0 "register_operand")
(plus:XF (match_dup 12) (match_dup 7)))]
"TARGET_USE_FANCY_MATH_387
for (i = 2; i < 13; i++)
operands[i] = gen_reg_rtx (XFmode);
- operands[13]
- = validize_mem (force_const_mem (SFmode, CONST1_RTX (SFmode))); /* fld1 */
-
emit_move_insn (operands[2], standard_80387_constant_rtx (5)); /* fldl2e */
+ emit_move_insn (operands[9], CONST1_RTX (XFmode));
})
(define_expand "expm1<mode>2"
|| TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations"
{
- rtx op0, op1;
-
- op0 = gen_reg_rtx (XFmode);
- op1 = gen_reg_rtx (XFmode);
+ rtx op0 = gen_reg_rtx (XFmode);
+ rtx op1 = gen_reg_rtx (XFmode);
emit_insn (gen_extend<mode>xf2 (op1, operands[1]));
emit_insn (gen_expm1xf2 (op0, op1));
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
{
- rtx tmp1, tmp2;
-
- tmp1 = gen_reg_rtx (XFmode);
- tmp2 = gen_reg_rtx (XFmode);
+ rtx tmp1 = gen_reg_rtx (XFmode);
+ rtx tmp2 = gen_reg_rtx (XFmode);
emit_insn (gen_floatsixf2 (tmp1, operands[2]));
emit_insn (gen_fscalexf4_i387 (operands[0], tmp2,
|| TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations"
{
- rtx op0, op1;
-
- op0 = gen_reg_rtx (XFmode);
- op1 = gen_reg_rtx (XFmode);
+ rtx op0 = gen_reg_rtx (XFmode);
+ rtx op1 = gen_reg_rtx (XFmode);
emit_insn (gen_extend<mode>xf2 (op1, operands[1]));
emit_insn (gen_ldexpxf3 (op0, op1, operands[2]));
UNSPEC_FSCALE_EXP))])]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
-{
- operands[3] = gen_reg_rtx (XFmode);
-})
+ "operands[3] = gen_reg_rtx (XFmode);")
(define_expand "scalb<mode>3"
[(use (match_operand:MODEF 0 "register_operand"))
|| TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations"
{
- rtx op0, op1, op2;
-
- op0 = gen_reg_rtx (XFmode);
- op1 = gen_reg_rtx (XFmode);
- op2 = gen_reg_rtx (XFmode);
+ rtx op0 = gen_reg_rtx (XFmode);
+ rtx op1 = gen_reg_rtx (XFmode);
+ rtx op2 = gen_reg_rtx (XFmode);
emit_insn (gen_extend<mode>xf2 (op1, operands[1]));
emit_insn (gen_extend<mode>xf2 (op2, operands[2]));
(define_expand "significand<mode>2"
[(use (match_operand:MODEF 0 "register_operand"))
- (use (match_operand:MODEF 1 "register_operand"))]
+ (use (match_operand:MODEF 1 "general_operand"))]
"TARGET_USE_FANCY_MATH_387
&& (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
|| TARGET_MIX_SSE_I387)
rtx op0 = gen_reg_rtx (XFmode);
rtx op1 = gen_reg_rtx (XFmode);
- emit_insn (gen_fxtract_extend<mode>xf3_i387 (op0, op1, operands[1]));
+ emit_insn (gen_extend<mode>xf2 (op1, operands[1]));
+ emit_insn (gen_significandxf2 (op0, op1));
emit_insn (gen_truncxf<mode>2 (operands[0], op0));
DONE;
})