Commit 76bbe028 by Zack Weinberg Committed by Zack Weinberg

expr.c (emit_move_insn_1): Abort if MODE argument is invalid.

1999-04-27 08:32 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
	* expr.c (emit_move_insn_1): Abort if MODE argument is invalid.
	(compare): Punt if TREE_OPERAND (exp, 0) is an ERROR_MARK.

From-SVN: r26673
parent d2e0d40a
1999-04-27 08:32 -0400 Zack Weinberg <zack@rabi.columbia.edu>
* expr.c (emit_move_insn_1): Abort if MODE argument is invalid.
(compare): Punt if TREE_OPERAND (exp, 0) is an ERROR_MARK.
Tue Apr 27 01:33:43 1999 Jeffrey A Law (law@cygnus.com) Tue Apr 27 01:33:43 1999 Jeffrey A Law (law@cygnus.com)
* Makefile.in (ORDINARY_FLAGS_TO_PASS): Renmaed from FLAGS_TO_PASS. * Makefile.in (ORDINARY_FLAGS_TO_PASS): Renmaed from FLAGS_TO_PASS.
......
...@@ -2565,6 +2565,9 @@ emit_move_insn_1 (x, y) ...@@ -2565,6 +2565,9 @@ emit_move_insn_1 (x, y)
enum mode_class class = GET_MODE_CLASS (mode); enum mode_class class = GET_MODE_CLASS (mode);
int i; int i;
if (mode >= MAX_MACHINE_MODE)
abort ();
if (mov_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing) if (mov_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing)
return return
emit_insn (GEN_FCN (mov_optab->handlers[(int) mode].insn_code) (x, y)); emit_insn (GEN_FCN (mov_optab->handlers[(int) mode].insn_code) (x, y));
...@@ -11205,14 +11208,22 @@ compare (exp, signed_code, unsigned_code) ...@@ -11205,14 +11208,22 @@ compare (exp, signed_code, unsigned_code)
register tree exp; register tree exp;
enum rtx_code signed_code, unsigned_code; enum rtx_code signed_code, unsigned_code;
{ {
register rtx op0 register rtx op0, op1;
= expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0); register tree type;
register rtx op1 register enum machine_mode mode;
= expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0); int unsignedp;
register tree type = TREE_TYPE (TREE_OPERAND (exp, 0)); enum rtx_code code;
register enum machine_mode mode = TYPE_MODE (type);
int unsignedp = TREE_UNSIGNED (type); /* Don't crash if the comparison was erroneous. */
enum rtx_code code = unsignedp ? unsigned_code : signed_code; op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0);
if (TREE_CODE (TREE_OPERAND (exp, 0)) == ERROR_MARK)
return op0;
op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
type = TREE_TYPE (TREE_OPERAND (exp, 0));
mode = TYPE_MODE (type);
unsignedp = TREE_UNSIGNED (type);
code = unsignedp ? unsigned_code : signed_code;
#ifdef HAVE_canonicalize_funcptr_for_compare #ifdef HAVE_canonicalize_funcptr_for_compare
/* If function pointers need to be "canonicalized" before they can /* If function pointers need to be "canonicalized" before they can
......
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