diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-04 17:05:38 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-04 17:05:38 +0000 |
commit | 7c679c653ac0445cb6a8ecee1b481840f74630df (patch) | |
tree | a50ac1e9c87f293121ff982b05433d7b518a7269 /gcc/reload.c | |
parent | 8e224d28cc918111953d89df4c5a1f837720acf5 (diff) | |
download | gcc-7c679c653ac0445cb6a8ecee1b481840f74630df.tar.gz |
PR target/26655
PR target/28270
* reload.c (push_reload): Patch out the mismathcing instruction; return early.
(find_reload): Bail out if the instruction was patched out.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115928 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index 616a73726a1..c8c48b1dc78 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -1254,7 +1254,19 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc, { error_for_asm (this_insn, "impossible register constraint " "in %<asm%>"); - class = ALL_REGS; + /* Avoid further trouble with this insn. */ + PATTERN (this_insn) = gen_rtx_USE (VOIDmode, const0_rtx); + /* We used to continue here setting class to ALL_REGS, but it triggers + sanity check on i386 for: + void foo(long double d) + { + asm("" :: "a" (d)); + } + Returning zero here ought to be safe as we take care in + find_reloads to not process the reloads when instruction was + replaced by USE. */ + + return 0; } } @@ -4133,6 +4145,12 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known, } #endif + /* If we detected error and replaced asm instruction by USE, forget about the + reloads. */ + if (GET_CODE (PATTERN (insn)) == USE + && GET_CODE (XEXP (PATTERN (insn), 0)) == CONST_INT) + n_reloads = 0; + /* Perhaps an output reload can be combined with another to reduce needs by one. */ if (!goal_earlyclobber) |