function.c (assign_stack_local_1): Truncate constant added to frame_pointer_rtx or...
authorAlexandre Oliva <aoliva@redhat.com>
Wed, 26 Feb 2003 23:06:34 +0000 (23:06 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Wed, 26 Feb 2003 23:06:34 +0000 (23:06 +0000)
* function.c (assign_stack_local_1): Truncate constant added to
frame_pointer_rtx or virtual_stack_vars_rtx for Pmode.

From-SVN: r63488

gcc/ChangeLog
gcc/function.c

index b0e86c8b71a6a2ad02daa20f40268e2e679f22cc..79c335915a885eb6abb46dd928ba7526669e9018 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-26  Alexandre Oliva  <aoliva@redhat.com>
+
+       * function.c (assign_stack_local_1): Truncate constant added to
+       frame_pointer_rtx or virtual_stack_vars_rtx for Pmode.
+
 2003-02-26  David Edelsohn  <edelsohn@gnu.org>
 
        * config.gcc: Add power4 to PowerPC with_cpu list.
index 86a20178dcc29b7c280c628aea1a6dd0d164f2d3..a47ab3eac0dadf7de3932c532a5b6d5565539984 100644 (file)
@@ -1,6 +1,6 @@
 /* Expands front end tree to back end RTL for GNU C-Compiler
    Copyright (C) 1987, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -586,11 +586,14 @@ assign_stack_local_1 (mode, size, align, function)
      address relative to the frame pointer.  */
   if (function == cfun && virtuals_instantiated)
     addr = plus_constant (frame_pointer_rtx,
+                         trunc_int_for_mode
                          (frame_offset + bigend_correction
-                          + STARTING_FRAME_OFFSET));
+                          + STARTING_FRAME_OFFSET, Pmode));
   else
     addr = plus_constant (virtual_stack_vars_rtx,
-                         function->x_frame_offset + bigend_correction);
+                         trunc_int_for_mode
+                         (function->x_frame_offset + bigend_correction,
+                          Pmode));
 
 #ifndef FRAME_GROWS_DOWNWARD
   function->x_frame_offset += size;