aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-03-30 01:47:51 +0000
committerRichard Stallman <rms@gnu.org>1992-03-30 01:47:51 +0000
commit0007bde5b532215e685d791edf9b5bd06ba75fdd (patch)
tree85d450a55ca661daa2e878d01280228057ca0a8d
parentb91c37569d6a5c3b32eec90c0617d311d3fbac6a (diff)
downloadgcc-0007bde5b532215e685d791edf9b5bd06ba75fdd.zip
gcc-0007bde5b532215e685d791edf9b5bd06ba75fdd.tar.gz
gcc-0007bde5b532215e685d791edf9b5bd06ba75fdd.tar.bz2
entered into RCS
From-SVN: r629
-rw-r--r--gcc/config/vax/vms.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/config/vax/vms.h b/gcc/config/vax/vms.h
index 8b86974..8d46331 100644
--- a/gcc/config/vax/vms.h
+++ b/gcc/config/vax/vms.h
@@ -32,6 +32,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef TARGET_DEFAULT
#undef CALL_USED_REGISTERS
#undef MAYBE_VMS_FUNCTION_PROLOGUE
+#undef FUNCTION_PROLOGUE
+#undef STARTING_FRAME_OFFSET
/* Predefine this in CPP because VMS limits the size of command options
and GNU CPP is not used on VMS except with GNU C. */
@@ -59,6 +61,26 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define CALL_USED_REGISTERS {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1}
+/* We redefine this because there is a hidden variable on the stack
+ that VAXC$ESTABLISH uses. We just need to add four bytes to whatever
+ gcc thinks that we need. Similarily, we need to move all local variables
+ down 4 bytes in the stack. */
+
+#define STARTING_FRAME_OFFSET -4
+
+#define FUNCTION_PROLOGUE(FILE, SIZE) \
+{ register int regno; \
+ register int mask = 0; \
+ register int newsize = SIZE + 4; \
+ extern char call_used_regs[]; \
+ for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) \
+ if (regs_ever_live[regno] && !call_used_regs[regno]) \
+ mask |= 1 << regno; \
+ fprintf (FILE, "\t.word 0x%x\n", mask); \
+ MAYBE_VMS_FUNCTION_PROLOGUE(FILE) \
+ if (newsize >= 64) fprintf (FILE, "\tmovab %d(sp),sp\n", -newsize);\
+ else fprintf (FILE, "\tsubl2 $%d,sp\n", newsize); }
+
#define __MAIN_NAME " main ("
/*
* The MAYBE_VMS_FUNCTION_PROLOGUE macro works for both gcc and g++. It