aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2018-10-18 18:49:20 +0200
committerUros Bizjak <uros@gcc.gnu.org>2018-10-18 18:49:20 +0200
commitb75dff03b70fc3df8bd2a75d0006b96e1304c4c0 (patch)
tree8865cfe1bcf546b86aa56c0c55ac559b229ac9bb /gcc/config
parent23abcf78747564ca01e1a56a177e21f9169682da (diff)
downloadgcc-b75dff03b70fc3df8bd2a75d0006b96e1304c4c0.zip
gcc-b75dff03b70fc3df8bd2a75d0006b96e1304c4c0.tar.gz
gcc-b75dff03b70fc3df8bd2a75d0006b96e1304c4c0.tar.bz2
i386.c (ix86_emit_fp_unordered_jump): Set JUMP_LABEL to the jump insn.
* config/i386/i386.c (ix86_emit_fp_unordered_jump): Set JUMP_LABEL to the jump insn. (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch. Predict emitted jump and add label to jump insn. From-SVN: r265274
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.c46
1 files changed, 28 insertions, 18 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 03324c0..e47603e 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -43866,6 +43866,7 @@ void
ix86_emit_fp_unordered_jump (rtx label)
{
rtx reg = gen_reg_rtx (HImode);
+ rtx_insn *insn;
rtx temp;
emit_insn (gen_x86_fnstsw_1 (reg));
@@ -43888,10 +43889,9 @@ ix86_emit_fp_unordered_jump (rtx label)
temp = gen_rtx_IF_THEN_ELSE (VOIDmode, temp,
gen_rtx_LABEL_REF (VOIDmode, label),
pc_rtx);
- temp = gen_rtx_SET (pc_rtx, temp);
-
- emit_jump_insn (temp);
+ insn = emit_jump_insn (gen_rtx_SET (pc_rtx, temp));
predict_jump (REG_BR_PROB_BASE * 10 / 100);
+ JUMP_LABEL (insn) = label;
}
/* Output code to perform a log1p XFmode calculation. */
@@ -43902,27 +43902,36 @@ void ix86_emit_i387_log1p (rtx op0, rtx op1)
rtx_code_label *label2 = gen_label_rtx ();
rtx tmp = gen_reg_rtx (XFmode);
- rtx tmp2 = gen_reg_rtx (XFmode);
- rtx test;
+ rtx res = gen_reg_rtx (XFmode);
+ rtx cst, cstln2, cst1;
+ rtx_insn *insn;
+
+ cst = const_double_from_real_value
+ (REAL_VALUE_ATOF ("0.29289321881345247561810596348408353", XFmode), XFmode);
+ cstln2 = force_reg (XFmode, standard_80387_constant_rtx (4)); /* fldln2 */
emit_insn (gen_absxf2 (tmp, op1));
- emit_move_insn (tmp2, standard_80387_constant_rtx (4)); /* fldln2 */
- test = gen_rtx_GE (VOIDmode, tmp,
- const_double_from_real_value (
- REAL_VALUE_ATOF ("0.29289321881345247561810596348408353", XFmode),
- XFmode));
- emit_jump_insn
- (gen_cbranchxf4 (test, XEXP (test, 0), XEXP (test, 1), label1));
-
- emit_insn (gen_fyl2xp1xf3_i387 (op0, op1, tmp2));
+
+ cst = force_reg (XFmode, cst);
+ ix86_expand_branch (GE, tmp, cst, label1);
+ predict_jump (REG_BR_PROB_BASE * 10 / 100);
+ insn = get_last_insn ();
+ JUMP_LABEL (insn) = label1;
+
+ emit_insn (gen_fyl2xp1xf3_i387 (res, op1, cstln2));
emit_jump (label2);
emit_label (label1);
- emit_move_insn (tmp, CONST1_RTX (XFmode));
- emit_insn (gen_addxf3 (tmp, op1, tmp));
- emit_insn (gen_fyl2xxf3_i387 (op0, tmp, tmp2));
+ LABEL_NUSES (label1) = 1;
+
+ cst1 = force_reg (XFmode, CONST1_RTX (XFmode));
+ emit_insn (gen_rtx_SET (tmp, gen_rtx_PLUS (XFmode, op1, cst1)));
+ emit_insn (gen_fyl2xxf3_i387 (res, tmp, cstln2));
emit_label (label2);
+ LABEL_NUSES (label2) = 1;
+
+ emit_move_insn (op0, res);
}
/* Emit code for round calculation. */
@@ -43939,7 +43948,8 @@ void ix86_emit_i387_round (rtx op0, rtx op1)
rtx_code_label *jump_label = gen_label_rtx ();
rtx (*floor_insn) (rtx, rtx);
rtx (*neg_insn) (rtx, rtx);
- rtx insn, tmp;
+ rtx_insn *insn;
+ rtx tmp;
switch (inmode)
{