summaryrefslogtreecommitdiff
path: root/gcc/config/mips
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/mips')
-rw-r--r--gcc/config/mips/driver-native.c2
-rw-r--r--gcc/config/mips/frame-header-opt.c2
-rw-r--r--gcc/config/mips/mips.c18
-rw-r--r--gcc/config/mips/mips.h8
4 files changed, 18 insertions, 12 deletions
diff --git a/gcc/config/mips/driver-native.c b/gcc/config/mips/driver-native.c
index 18fab958398..48952160bed 100644
--- a/gcc/config/mips/driver-native.c
+++ b/gcc/config/mips/driver-native.c
@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#define TARGET_C_FILE 1
+#define IN_TARGET_CODE 1
#include "config.h"
#include "system.h"
diff --git a/gcc/config/mips/frame-header-opt.c b/gcc/config/mips/frame-header-opt.c
index f0f867d4409..dba96db051e 100644
--- a/gcc/config/mips/frame-header-opt.c
+++ b/gcc/config/mips/frame-header-opt.c
@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#define TARGET_C_FILE 1
+#define IN_TARGET_CODE 1
#include "config.h"
#include "system.h"
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index dc6ddec5d10..fd2beee36ff 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -21,7 +21,7 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#define TARGET_C_FILE 1
+#define IN_TARGET_CODE 1
#include "config.h"
#include "system.h"
@@ -10957,7 +10957,7 @@ mips_compute_frame_info (void)
if we know that none of the called functions will use this space.
But if the target-independent frame size is nonzero, we have already
- committed to allocating these in STARTING_FRAME_OFFSET for
+ committed to allocating these in TARGET_STARTING_FRAME_OFFSET for
!FRAME_GROWS_DOWNWARD. */
if ((size == 0 || FRAME_GROWS_DOWNWARD)
@@ -22337,6 +22337,17 @@ mips_constant_alignment (const_tree exp, HOST_WIDE_INT align)
return MAX (align, BITS_PER_WORD);
return align;
}
+
+/* Implement TARGET_STARTING_FRAME_OFFSET. See mips_compute_frame_info
+ for details about the frame layout. */
+
+static HOST_WIDE_INT
+mips_starting_frame_offset (void)
+{
+ if (FRAME_GROWS_DOWNWARD)
+ return 0;
+ return crtl->outgoing_args_size + MIPS_GP_SAVE_AREA_SIZE;
+}
/* Initialize the GCC target structure. */
#undef TARGET_ASM_ALIGNED_HI_OP
@@ -22638,6 +22649,9 @@ mips_constant_alignment (const_tree exp, HOST_WIDE_INT align)
#undef TARGET_CONSTANT_ALIGNMENT
#define TARGET_CONSTANT_ALIGNMENT mips_constant_alignment
+#undef TARGET_STARTING_FRAME_OFFSET
+#define TARGET_STARTING_FRAME_OFFSET mips_starting_frame_offset
+
struct gcc_target targetm = TARGET_INITIALIZER;
#include "gt-mips.h"
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index a2d8c7c1350..550d283158e 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2298,14 +2298,6 @@ enum reg_class
#define MIPS_GP_SAVE_AREA_SIZE \
(TARGET_CALL_CLOBBERED_GP ? MIPS_STACK_ALIGN (UNITS_PER_WORD) : 0)
-/* The offset of the first local variable from the frame pointer. See
- mips_compute_frame_info for details about the frame layout. */
-
-#define STARTING_FRAME_OFFSET \
- (FRAME_GROWS_DOWNWARD \
- ? 0 \
- : crtl->outgoing_args_size + MIPS_GP_SAVE_AREA_SIZE)
-
#define RETURN_ADDR_RTX mips_return_addr
/* Mask off the MIPS16 ISA bit in unwind addresses.