From 914c4f2cee63e7ba33c7781618e16f8ded2006b4 Mon Sep 17 00:00:00 2001 From: kazu Date: Sun, 17 Feb 2002 12:41:46 +0000 Subject: [PATCH] * config/h8300/h8300.h (CONDITIONAL_REGISTER_USAGE): Replace a hard coded register number with an appropriate macro. (HARD_REGNO_MODE_OK): Likewise. (ARG_POINTER_REGNUM): Likewise. (STATIC_CHAIN_REGNUM): Likewise. (RETURN_ADDRESS_POINTER_REGNUM): Likewise. * config/h8300/h8300.md (define_constants): Define more register numbers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49819 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 11 +++++++++++ gcc/config/h8300/h8300.h | 16 ++++++++-------- gcc/config/h8300/h8300.md | 8 ++++++-- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8fa20794750..456615b97a6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2002-02-17 Kazu Hirata + + * config/h8300/h8300.h (CONDITIONAL_REGISTER_USAGE): Replace a + hard coded register number with an appropriate macro. + (HARD_REGNO_MODE_OK): Likewise. + (ARG_POINTER_REGNUM): Likewise. + (STATIC_CHAIN_REGNUM): Likewise. + (RETURN_ADDRESS_POINTER_REGNUM): Likewise. + * config/h8300/h8300.md (define_constants): Define more + register numbers. + 2002-02-17 Philipp Thomas * config/i386/i386.h: Don't mark empty strings for translation. diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h index 21ef1bf5025..a082cde9b21 100644 --- a/gcc/config/h8300/h8300.h +++ b/gcc/config/h8300/h8300.h @@ -294,10 +294,10 @@ extern int target_flags; #define REG_ALLOC_ORDER \ { 2, 3, 0, 1, 4, 5, 6, 8, 7, 9, 10} -#define CONDITIONAL_REGISTER_USAGE \ -{ \ - if (!TARGET_MAC) \ - fixed_regs[8] = call_used_regs[8] = 1; \ +#define CONDITIONAL_REGISTER_USAGE \ +{ \ + if (!TARGET_MAC) \ + fixed_regs[MAC_REG] = call_used_regs[MAC_REG] = 1; \ } /* Return number of consecutive hard regs needed starting at reg REGNO @@ -322,7 +322,7 @@ extern int target_flags; #define HARD_REGNO_MODE_OK(REGNO, MODE) \ (TARGET_H8300 \ ? ((((REGNO) & 1) == 0) || ((MODE) == HImode) || ((MODE) == QImode)) \ - : (REGNO) == 8 ? (MODE) == SImode : 1) + : (REGNO) == MAC_REG ? (MODE) == SImode : 1) /* Value is 1 if it is a good idea to tie two pseudo registers when one has mode MODE1 and one has mode MODE2. @@ -355,14 +355,14 @@ extern int target_flags; #define FRAME_POINTER_REQUIRED 0 /* Base register for access to arguments of the function. */ -#define ARG_POINTER_REGNUM 9 +#define ARG_POINTER_REGNUM AP_REG /* Register in which static-chain is passed to a function. */ -#define STATIC_CHAIN_REGNUM 3 +#define STATIC_CHAIN_REGNUM SC_REG /* Fake register that holds the address on the stack of the current function's return address. */ -#define RETURN_ADDRESS_POINTER_REGNUM 10 +#define RETURN_ADDRESS_POINTER_REGNUM RAP_REG /* A C expression whose value is RTL representing the value of the return address for the frame COUNT steps up from the current frame. diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 883abd5c89e..4d85dd12066 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -51,8 +51,12 @@ ;; ---------------------------------------------------------------------- (define_constants - [(FP_REG 6) - (SP_REG 7)]) + [(SC_REG 3) + (FP_REG 6) + (SP_REG 7) + (MAC_REG 8) + (AP_REG 9) + (RAP_REG 10)]) ;; ---------------------------------------------------------------------- ;; ATTRIBUTES -- 2.11.4.GIT