OSDN Git Service

Added fixup for __STDC__ == 0 and __STDC__ == 1
[pf3gnuchains/gcc-fork.git] / gcc / reload1.c
index b08a383..c7ea46f 100644 (file)
@@ -2869,7 +2869,7 @@ eliminate_regs (x, mem_mode, insn)
          if (GET_CODE (new) == MEM
              && (GET_MODE_SIZE (GET_MODE (x))
                  <= GET_MODE_SIZE (GET_MODE (new)))
-#if defined(BYTES_LOADS_ZERO_EXTEND) || defined(BYTE_LOADS_SIGN_EXTEND)
+#if defined(BYTE_LOADS_ZERO_EXTEND) || defined(BYTE_LOADS_SIGN_EXTEND)
              /* On these machines we will be reloading what is
                 inside the SUBREG if it originally was a pseudo and
                 the inner and outer modes are both a word or
@@ -5516,10 +5516,13 @@ emit_reload_insns (insn)
            oldequiv_reg = SUBREG_REG (oldequiv);
 
          /* Encapsulate both RELOADREG and OLDEQUIV into that mode,
-            then load RELOADREG from OLDEQUIV.  */
+            then load RELOADREG from OLDEQUIV.  Note that we cannot use
+            gen_lowpart_common since it can do the wrong thing when
+            RELOADREG has a multi-word mode.  Note that RELOADREG
+            must always be a REG here.  */
 
          if (GET_MODE (reloadreg) != mode)
-           reloadreg = gen_lowpart_common (mode, reloadreg);
+           reloadreg = gen_rtx (REG, mode, REGNO (reloadreg));
          while (GET_CODE (oldequiv) == SUBREG && GET_MODE (oldequiv) != mode)
            oldequiv = SUBREG_REG (oldequiv);
          if (GET_MODE (oldequiv) != VOIDmode
@@ -5981,7 +5984,7 @@ emit_reload_insns (insn)
            }
 
          if (GET_MODE (reloadreg) != mode)
-           reloadreg = gen_lowpart_common (mode, reloadreg);
+           reloadreg = gen_rtx (REG, mode, REGNO (reloadreg));
 
 #ifdef SECONDARY_OUTPUT_RELOAD_CLASS