Commit 1192c651 by Tom Wood

(tcnd_divide_by_zero...

(tcnd_divide_by_zero, divsi3, udivsi3): Allow the
	explicit trap for divide by zero to resume execution along the
	expected path.

From-SVN: r2706
parent f95fd40e
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
(define_expand "m88k_sccs_id" (define_expand "m88k_sccs_id"
[(match_operand:SI 0 "" "")] [(match_operand:SI 0 "" "")]
"" ""
"{ static char sccs_id[] = \"@(#)m88k.md 2.2.13.5 10/19/92 10:13:13\"; "{ static char sccs_id[] = \"@(#)m88k.md 2.3.2.2 11/05/92 09:03:51\";
FAIL; }") FAIL; }")
;; Attribute specifications ;; Attribute specifications
...@@ -2377,7 +2377,6 @@ ...@@ -2377,7 +2377,6 @@
emit_insn (gen_cmpsi (operands[0], const0_rtx)); emit_insn (gen_cmpsi (operands[0], const0_rtx));
emit_jump_insn (gen_bne (operands[1])); emit_jump_insn (gen_bne (operands[1]));
emit_insn (gen_trap_divide_by_zero ()); emit_insn (gen_trap_divide_by_zero ());
emit_barrier ();
DONE; DONE;
}") }")
...@@ -2406,7 +2405,6 @@ ...@@ -2406,7 +2405,6 @@
if (op2 == const0_rtx) if (op2 == const0_rtx)
{ {
emit_insn (gen_trap_divide_by_zero ()); emit_insn (gen_trap_divide_by_zero ());
emit_barrier ();
emit_insn (gen_dummy (op0)); emit_insn (gen_dummy (op0));
DONE; DONE;
} }
...@@ -2448,11 +2446,8 @@ ...@@ -2448,11 +2446,8 @@
if (TARGET_CHECK_ZERO_DIV) if (TARGET_CHECK_ZERO_DIV)
emit_insn (gen_tcnd_divide_by_zero (op2, join_label)); emit_insn (gen_tcnd_divide_by_zero (op2, join_label));
else emit_jump_insn (gen_jump (join_label));
{ emit_barrier ();
emit_jump_insn (gen_jump (join_label));
emit_barrier ();
}
emit_label (label1); /* constant / positive */ emit_label (label1); /* constant / positive */
emit_move_insn (op0, gen_rtx (UDIV, SImode, op1, op2)); emit_move_insn (op0, gen_rtx (UDIV, SImode, op1, op2));
...@@ -2517,13 +2512,9 @@ ...@@ -2517,13 +2512,9 @@
emit_jump_insn (gen_bne (join_label)); emit_jump_insn (gen_bne (join_label));
emit_label (label4); emit_label (label4);
emit_insn (gen_trap_divide_by_zero ()); emit_insn (gen_trap_divide_by_zero ());
emit_barrier ();
}
else
{
emit_jump_insn (gen_jump (join_label));
emit_barrier ();
} }
emit_jump_insn (gen_jump (join_label));
emit_barrier ();
emit_label (label2); /* pos.-or-0 / neg.-or-0 */ emit_label (label2); /* pos.-or-0 / neg.-or-0 */
emit_move_insn (op0, gen_rtx (UDIV, SImode, op1, neg_op2)); emit_move_insn (op0, gen_rtx (UDIV, SImode, op1, neg_op2));
...@@ -2578,7 +2569,6 @@ ...@@ -2578,7 +2569,6 @@
if (op2 == const0_rtx) if (op2 == const0_rtx)
{ {
emit_insn (gen_trap_divide_by_zero ()); emit_insn (gen_trap_divide_by_zero ());
emit_barrier ();
emit_insn (gen_dummy (operands[0])); emit_insn (gen_dummy (operands[0]));
DONE; DONE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment