OSDN Git Service

* config/h8300/h8300.h (CONDITIONAL_REGISTER_USAGE): Replace a
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 17 Feb 2002 12:41:46 +0000 (12:41 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 17 Feb 2002 12:41:46 +0000 (12:41 +0000)
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
gcc/config/h8300/h8300.h
gcc/config/h8300/h8300.md

index 8fa2079..456615b 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-17  Kazu Hirata  <kazu@hxi.com>
+
+       * 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  <pthomas@suse.de>
 
        * config/i386/i386.h: Don't mark empty strings for translation.
 2002-02-17  Philipp Thomas  <pthomas@suse.de>
 
        * config/i386/i386.h: Don't mark empty strings for translation.
index 21ef1bf..a082cde 100644 (file)
@@ -294,10 +294,10 @@ extern int target_flags;
 #define REG_ALLOC_ORDER \
   { 2, 3, 0, 1, 4, 5, 6, 8, 7, 9, 10}
 
 #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
 }
 
 /* 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))        \
 #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.
 
 /* 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 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.  */
 
 /* 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.  */
 
 /* 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.
 
 /* A C expression whose value is RTL representing the value of the return
    address for the frame COUNT steps up from the current frame.
index 883abd5..4d85dd1 100644 (file)
 ;; ----------------------------------------------------------------------
 
 (define_constants
 ;; ----------------------------------------------------------------------
 
 (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
 
 ;; ----------------------------------------------------------------------
 ;; ATTRIBUTES