]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
vax.md: define_constant VAXens AP...
authorJan-Benedict Glaw <jbglaw@lug-owl.de>
Sat, 14 May 2005 17:55:33 +0000 (17:55 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sat, 14 May 2005 17:55:33 +0000 (17:55 +0000)
* config/vax/vax.md: define_constant VAXens AP, FP, SP and PC
registers and use them (specifically the stack pointer).
* config/vax/vax.h: Use above defines right here.

From-SVN: r99702

gcc/ChangeLog
gcc/config/vax/vax.h
gcc/config/vax/vax.md

index e0aba2775c704540d6cddde25f25625afa9c47f0..91408182ce0d4f2b78a797b185026cc0874f47f8 100644 (file)
@@ -1,5 +1,9 @@
 2005-05-14  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
 
+       * config/vax/vax.md: define_constant VAXens AP, FP, SP and PC
+       registers and use them (specifically the stack pointer).
+       * config/vax/vax.h: Use above defines right here.
+
        * config/vax/vax.c: (override_options) Remove 'register' keyword.
        (split_quadword_operands) Likewise. (rev_cond_name) Likewise.
        (vax_float_literal) Likewise. (vax_rtx_costs) Remove trailing
index 3fed80b0f5356b0c38f1c0a49d72b9ff950fa849..86259880e801e68b9e597d71b55d1dbd350d4091 100644 (file)
@@ -167,13 +167,13 @@ Boston, MA 02111-1307, USA.  */
    The values of these macros are register numbers.  */
 
 /* VAX pc is overloaded on a register.  */
-#define PC_REGNUM 15
+#define PC_REGNUM VAX_PC_REGNUM
 
 /* Register to use for pushing function arguments.  */
-#define STACK_POINTER_REGNUM 14
+#define STACK_POINTER_REGNUM VAX_SP_REGNUM
 
 /* Base register for access to local variables of the function.  */
-#define FRAME_POINTER_REGNUM 13
+#define FRAME_POINTER_REGNUM VAX_FP_REGNUM
 
 /* Value should be nonzero if functions must have frame pointers.
    Zero means the frame pointer need not be set up (and parms
@@ -182,7 +182,7 @@ Boston, MA 02111-1307, USA.  */
 #define FRAME_POINTER_REQUIRED 1
 
 /* Base register for access to arguments of the function.  */
-#define ARG_POINTER_REGNUM 12
+#define ARG_POINTER_REGNUM VAX_AP_REGNUM
 
 /* Register in which static-chain is passed to a function.  */
 #define STATIC_CHAIN_REGNUM 0
index 78aa140a0e5d89439706b1d38ddc821d7a186195..a77f8412965b9b28719abe31d3524a99b4640bc8 100644 (file)
 ;; UNSPEC_VOLATILE usage:
 
 (define_constants
-  [(VUNSPEC_BLOCKAGE 0)     ; `blockage' insn to prevent scheduling across an
-                           ;   insn in the code.
+  [(VUNSPEC_BLOCKAGE 0)            ; `blockage' insn to prevent scheduling across an
+                           ; insn in the code.
    (VUNSPEC_SYNC_ISTREAM 1) ; sequence of insns to sync the I-stream
+   (VAX_AP_REGNUM 12)      ; Register 12 contains the argument pointer
+   (VAX_FP_REGNUM 13)      ; Register 13 contains the frame pointer
+   (VAX_SP_REGNUM 14)      ; Register 14 contains the stack pointer
+   (VAX_PC_REGNUM 15)      ; Register 15 contains the program counter
   ]
 )
 
 (define_expand "call_pop"
   [(parallel [(call (match_operand:QI 0 "memory_operand" "")
                    (match_operand:SI 1 "const_int_operand" ""))
-             (set (reg:SI 14)
-                  (plus:SI (reg:SI 14)
+             (set (reg:SI VAX_SP_REGNUM)
+                  (plus:SI (reg:SI VAX_SP_REGNUM)
                            (match_operand:SI 3 "immediate_operand" "")))])]
   ""
 {
 (define_insn "*call_pop"
   [(call (match_operand:QI 0 "memory_operand" "m")
         (match_operand:SI 1 "const_int_operand" "n"))
-   (set (reg:SI 14) (plus:SI (reg:SI 14)
-                            (match_operand:SI 2 "immediate_operand" "i")))]
+   (set (reg:SI VAX_SP_REGNUM) (plus:SI (reg:SI VAX_SP_REGNUM)
+                                       (match_operand:SI 2 "immediate_operand" "i")))]
   ""
 {
   operands[1] = GEN_INT ((INTVAL (operands[1]) - 4) / 4);
   [(parallel [(set (match_operand 0 "" "")
                   (call (match_operand:QI 1 "memory_operand" "")
                         (match_operand:SI 2 "const_int_operand" "")))
-             (set (reg:SI 14)
-                  (plus:SI (reg:SI 14)
+             (set (reg:SI VAX_SP_REGNUM)
+                  (plus:SI (reg:SI VAX_SP_REGNUM)
                            (match_operand:SI 4 "immediate_operand" "")))])]
   ""
 {
   [(set (match_operand 0 "" "")
        (call (match_operand:QI 1 "memory_operand" "m")
              (match_operand:SI 2 "const_int_operand" "n")))
-   (set (reg:SI 14) (plus:SI (reg:SI 14)
-                            (match_operand:SI 3 "immediate_operand" "i")))]
+   (set (reg:SI VAX_SP_REGNUM) (plus:SI (reg:SI VAX_SP_REGNUM)
+                                       (match_operand:SI 3 "immediate_operand" "i")))]
   ""
   "*
 {