From: Richard Stallman Date: Wed, 30 Dec 1992 07:28:37 +0000 (+0000) Subject: (push_reload): Move the NO_REGS abort after the error check for asms, to avoid crashi... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5488078fdc7570059875dda453fae8da8c802aa7;p=gcc.git (push_reload): Move the NO_REGS abort after the error check for asms, to avoid crashing for asms. (push_reload): Move the NO_REGS abort after the error check for asms, to avoid crashing for asms. Fix inmode and outmode too, if they are VOID for an asm. From-SVN: r2989 --- diff --git a/gcc/reload.c b/gcc/reload.c index f9b0a0ce3c3..7757dd7f045 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -695,9 +695,6 @@ push_reload (in, out, inloc, outloc, class, class = LIMIT_RELOAD_CLASS (GET_MODE (SUBREG_REG (out)), class); #endif - if (class == NO_REGS) - abort (); - /* Verify that this class is at least possible for the mode that is specified. */ if (this_insn_is_asm) @@ -707,6 +704,15 @@ push_reload (in, out, inloc, outloc, class, mode = inmode; else mode = outmode; + if (mode == VOIDmode) + { + error_for_asm (this_insn, "cannot reload integer constant operand in `asm'"); + mode = word_mode; + if (in != 0) + inmode = word_mode; + if (out != 0) + outmode = word_mode; + } for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) if (HARD_REGNO_MODE_OK (i, mode) && TEST_HARD_REG_BIT (reg_class_contents[(int) class], i)) @@ -727,6 +733,9 @@ push_reload (in, out, inloc, outloc, class, } } + if (class == NO_REGS) + abort (); + /* We can use an existing reload if the class is right and at least one of IN and OUT is a match and the other is at worst neutral.