expr.c (expand_builtin): Use copy_to_mode_reg; don't force constants into a register.
authorRichard Henderson <rth@cygnus.com>
Wed, 7 Apr 1999 02:14:06 +0000 (19:14 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 7 Apr 1999 02:14:06 +0000 (19:14 -0700)
        * expr.c (expand_builtin) [BUILT_IN_RETURN_ADDRESS]: Use
        copy_to_mode_reg; don't force constants into a register.

From-SVN: r26231

gcc/ChangeLog
gcc/expr.c

index b538be51f2fcf38206805fe550109180146ceedd..ef262741d52f333f9e8c2a339572531161cb3792 100644 (file)
@@ -1,3 +1,8 @@
+Wed Apr  7 02:11:55 1999  Richard Henderson  <rth@cygnus.com>
+
+       * expr.c (expand_builtin) [BUILT_IN_RETURN_ADDRESS]: Use
+       copy_to_mode_reg; don't force constants into a register.
+
 Tue Apr  6 22:55:25 1999  Richard Henderson  <rth@cygnus.com>
 
        * toplev.c (compile_file): Typo flow_dump -> flow2_dump.
index 8d5fa10b4cb5221babbaada1fb8c34234a75733a..d7f87c5743f52adbfde1210b41a071cc4541b30c 100644 (file)
@@ -9131,8 +9131,9 @@ expand_builtin (exp, target, subtarget, mode, ignore)
          if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_FRAME_ADDRESS)
            return tem;
 
-         if (GET_CODE (tem) != REG)
-           tem = copy_to_reg (tem);
+         if (GET_CODE (tem) != REG
+             && ! CONSTANT_P (tem))
+           tem = copy_to_mode_reg (Pmode, tem);
          return tem;
        }