diff options
Diffstat (limited to 'contrib/gcc/reload.c')
-rw-r--r-- | contrib/gcc/reload.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/contrib/gcc/reload.c b/contrib/gcc/reload.c index 4b331f0..bbb1f94 100644 --- a/contrib/gcc/reload.c +++ b/contrib/gcc/reload.c @@ -1287,12 +1287,17 @@ push_reload (in, out, inloc, outloc, class, So add an additional reload. */ #ifdef SECONDARY_MEMORY_NEEDED - /* If a memory location is needed for the copy, make one. */ - if (in != 0 && GET_CODE (in) == REG - && REGNO (in) < FIRST_PSEUDO_REGISTER - && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (REGNO (in)), - class, inmode)) - get_secondary_mem (in, inmode, opnum, type); + { + int regnum; + + /* If a memory location is needed for the copy, make one. */ + if (in != 0 + && ((regnum = true_regnum (in)) >= 0) + && regnum < FIRST_PSEUDO_REGISTER + && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (regnum), + class, inmode)) + get_secondary_mem (in, inmode, opnum, type); + } #endif i = n_reloads; @@ -1318,11 +1323,16 @@ push_reload (in, out, inloc, outloc, class, n_reloads++; #ifdef SECONDARY_MEMORY_NEEDED - if (out != 0 && GET_CODE (out) == REG - && REGNO (out) < FIRST_PSEUDO_REGISTER - && SECONDARY_MEMORY_NEEDED (class, REGNO_REG_CLASS (REGNO (out)), - outmode)) - get_secondary_mem (out, outmode, opnum, type); + { + int regnum; + + if (out != 0 + && ((regnum = true_regnum (out)) >= 0) + && regnum < FIRST_PSEUDO_REGISTER + && SECONDARY_MEMORY_NEEDED (class, REGNO_REG_CLASS (regnum), + outmode)) + get_secondary_mem (out, outmode, opnum, type); + } #endif } else |