Add definition of TRAMPOLINE_ENTRY_POINT which removes alignment
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Wed, 12 Feb 1992 15:32:51 +0000 (15:32 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Wed, 12 Feb 1992 15:32:51 +0000 (15:32 +0000)
restrictions on make_trampoline.

Add full table of compiler ports.

v7/src/microcode/cmpintmd/hppa.h
v7/src/microcode/cmpintmd/i386.h
v7/src/microcode/cmpintmd/mips.h
v8/src/microcode/cmpintmd/hppa.h

index 88eef59379514005b92af63a23f1a7a696807bbb..73ae5878323675b65a6ab7347821e6040a0a762f 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/hppa.h,v 1.31 1992/02/05 01:45:48 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/hppa.h,v 1.32 1992/02/12 15:32:51 jinx Exp $
 
-Copyright (c) 1989-92 Massachusetts Institute of Technology
+Copyright (c) 1989-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -49,6 +49,12 @@ MIT in each case. */
 #define COMPILER_VAX_TYPE                      2
 #define COMPILER_SPECTRUM_TYPE                 3
 #define COMPILER_MIPS_TYPE                     4
+#define COMPILER_MC68040_TYPE                  5
+#define COMPILER_SPARC_TYPE                    6
+#define COMPILER_RS6000_TYPE                   7
+#define COMPILER_MC88K_TYPE                    8
+#define COMPILER_I386_TYPE                     9
+#define COMPILER_ALPHA_TYPE                    10
 \f
 /* Machine parameters to be set by the user. */
 
@@ -516,13 +522,10 @@ procedures and continuations differ from closures) */
    register, jump to "scheme_to_interface" and leave the address of
    the storage following the code in a standard location.
 
-   TRAMPOLINE_BLOCK_TO_ENTRY is the number of longwords from the start
-   of a trampoline to the first instruction.  Note that this aligns
-   the first instruction to a longword boundary.
-
-   WARNING: make_trampoline in cmpint.c will need to be changed if
-   machine instructions must be aligned more strictly than just on
-   longword boundaries (e.g. quad word alignment for instructions).
+   TRAMPOLINE_ENTRY_POINT returns the address of the entry point of a
+   trampoline when given the address of the word containing
+   the manifest vector header.  According to the above picture,
+   it would add 12 bytes to its argument.
 
    TRAMPOLINE_STORAGE takes the address of the first instruction in a
    trampoline (not the start of the trampoline block) and returns the
@@ -538,10 +541,14 @@ procedures and continuations differ from closures) */
 */
 
 #define TRAMPOLINE_ENTRY_SIZE          3
-#define TRAMPOLINE_BLOCK_TO_ENTRY      3
-#define TRAMPOLINE_STORAGE(tramp)                                      \
-((((SCHEME_OBJECT *) tramp) - TRAMPOLINE_BLOCK_TO_ENTRY) +             \
- (2 + TRAMPOLINE_ENTRY_SIZE)) 
+#define TRAMPOLINE_BLOCK_TO_ENTRY      3 /* longwords from MNV to BLE */
+
+#define TRAMPOLINE_ENTRY_POINT(tramp_block)                            \
+  (((SCHEME_OBJECT *) (tramp_block)) + TRAMPOLINE_BLOCK_TO_ENTRY)
+
+#define TRAMPOLINE_STORAGE(tramp_entry)                                        \
+  ((((SCHEME_OBJECT *) (tramp_entry)) - TRAMPOLINE_BLOCK_TO_ENTRY) +   \
+   (2 + TRAMPOLINE_ENTRY_SIZE)) 
 
 #define STORE_TRAMPOLINE_ENTRY(entry_address, index) do                        \
 {                                                                      \
index b4339c6d9787ec4ca70fd3fae393eb5e81bf78f3..504f7ccb64d9a08e1054fd21cfd7b682bb0776eb 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/i386.h,v 1.6 1992/02/05 16:56:12 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/i386.h,v 1.7 1992/02/12 15:29:26 jinx Exp $
 
 Copyright (c) 1992 Massachusetts Institute of Technology
 
@@ -54,6 +54,7 @@ MIT in each case. */
 #define COMPILER_RS6000_TYPE                   7
 #define COMPILER_MC88K_TYPE                    8
 #define COMPILER_I386_TYPE                     9
+#define COMPILER_ALPHA_TYPE                    10
 \f
 /*
 
@@ -295,7 +296,7 @@ extern long pc_displacement_relocation;
 } while (0)
 
 #define TRAMPOLINE_ENTRY_SIZE                  3
-#define TRAMPOLINE_BLOCK_TO_ENTRY              3
+#define TRAMPOLINE_BLOCK_TO_ENTRY              3 /* MNV to MOV instr. */
 
 #define STORE_TRAMPOLINE_ENTRY(entry_address, index) do                        \
 {                                                                      \
@@ -308,9 +309,12 @@ extern long pc_displacement_relocation;
   (* ((unsigned long *) PC)) = ESI_TRAMPOLINE_TO_INTERFACE_OFFSET;     \
 } while (0)
 
-#define TRAMPOLINE_STORAGE(tramp)                                      \
-((((SCHEME_OBJECT *) tramp) - TRAMPOLINE_BLOCK_TO_ENTRY) +             \
- (2 + TRAMPOLINE_ENTRY_SIZE)) 
+#define TRAMPOLINE_ENTRY_POINT(tramp_block)                            \
+  (((SCHEME_OBJECT *) (tramp_block)) + TRAMPOLINE_BLOCK_TO_ENTRY)
+
+#define TRAMPOLINE_STORAGE(tramp_entry)                                        \
+  ((((SCHEME_OBJECT *) (tramp_entry)) - TRAMPOLINE_BLOCK_TO_ENTRY) +   \
+   (2 + TRAMPOLINE_ENTRY_SIZE)) 
 \f
 #define COMPILER_REGBLOCK_N_FIXED              16
 
index da32c9d1e1af97c427c05ba78b956db2a1fd977d..d770d1ce0e8afebb35e9ecdfeb41b068206d23e5 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/mips.h,v 1.10 1991/11/25 13:35:42 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/mips.h,v 1.11 1992/02/12 15:31:02 jinx Exp $
 
-Copyright (c) 1989-91 Massachusetts Institute of Technology
+Copyright (c) 1989-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -84,6 +84,12 @@ extern void syscall();
 #define COMPILER_VAX_TYPE                      2
 #define COMPILER_SPECTRUM_TYPE                 3
 #define COMPILER_MIPS_TYPE                     4
+#define COMPILER_MC68040_TYPE                  5
+#define COMPILER_SPARC_TYPE                    6
+#define COMPILER_RS6000_TYPE                   7
+#define COMPILER_MC88K_TYPE                    8
+#define COMPILER_I386_TYPE                     9
+#define COMPILER_ALPHA_TYPE                    10
 \f
 /* Machine parameters to be set by the user. */
 
@@ -275,13 +281,10 @@ do {                                                                      \
    register, jump to "scheme_to_interface" and leave the address of
    the storage following the code in a standard location.
 
-   TRAMPOLINE_BLOCK_TO_ENTRY is the number of longwords from the start
-   of a trampoline to the first instruction.  Note that this aligns
-   the first instruction to a longword boundary.
-
-   WARNING: make_trampoline in cmpint.c will need to be changed if
-   machine instructions must be aligned more strictly than just on
-   longword boundaries (e.g. quad word alignment for instructions).
+   TRAMPOLINE_ENTRY_POINT returns the address of the entry point of a
+   trampoline when given the address of the word containing
+   the manifest vector header.  According to the above picture,
+   it would add 12 bytes to its argument.
 
    TRAMPOLINE_STORAGE takes the address of the first instruction in a
    trampoline (not the start of the trampoline block) and returns the
@@ -294,9 +297,13 @@ do {                                                                       \
 
 #define TRAMPOLINE_ENTRY_SIZE          4
 #define TRAMPOLINE_BLOCK_TO_ENTRY      3
-#define TRAMPOLINE_STORAGE(tramp)                                      \
-((((SCHEME_OBJECT *) tramp) - TRAMPOLINE_BLOCK_TO_ENTRY) +             \
- (2 + TRAMPOLINE_ENTRY_SIZE)) 
+
+#define TRAMPOLINE_ENTRY_POINT(tramp_block)                            \
+  (((SCHEME_OBJECT *) (tramp_block)) + TRAMPOLINE_BLOCK_TO_ENTRY)
+
+#define TRAMPOLINE_STORAGE(tramp_entry)                                        \
+  ((((SCHEME_OBJECT *) (tramp_entry)) - TRAMPOLINE_BLOCK_TO_ENTRY) +   \
+   (2 + TRAMPOLINE_ENTRY_SIZE)) 
 
 #define SPECIAL_OPCODE 000
 #define ADDI_OPCODE    010
index ce9d5e291a8bd79c26b5fc9ba1c37aa0ba44e483..0d4c17d949a3af05c3952c67ccd9b98a0ffd7e57 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/cmpintmd/hppa.h,v 1.31 1992/02/05 01:45:48 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/cmpintmd/hppa.h,v 1.32 1992/02/12 15:32:51 jinx Exp $
 
-Copyright (c) 1989-92 Massachusetts Institute of Technology
+Copyright (c) 1989-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -49,6 +49,12 @@ MIT in each case. */
 #define COMPILER_VAX_TYPE                      2
 #define COMPILER_SPECTRUM_TYPE                 3
 #define COMPILER_MIPS_TYPE                     4
+#define COMPILER_MC68040_TYPE                  5
+#define COMPILER_SPARC_TYPE                    6
+#define COMPILER_RS6000_TYPE                   7
+#define COMPILER_MC88K_TYPE                    8
+#define COMPILER_I386_TYPE                     9
+#define COMPILER_ALPHA_TYPE                    10
 \f
 /* Machine parameters to be set by the user. */
 
@@ -516,13 +522,10 @@ procedures and continuations differ from closures) */
    register, jump to "scheme_to_interface" and leave the address of
    the storage following the code in a standard location.
 
-   TRAMPOLINE_BLOCK_TO_ENTRY is the number of longwords from the start
-   of a trampoline to the first instruction.  Note that this aligns
-   the first instruction to a longword boundary.
-
-   WARNING: make_trampoline in cmpint.c will need to be changed if
-   machine instructions must be aligned more strictly than just on
-   longword boundaries (e.g. quad word alignment for instructions).
+   TRAMPOLINE_ENTRY_POINT returns the address of the entry point of a
+   trampoline when given the address of the word containing
+   the manifest vector header.  According to the above picture,
+   it would add 12 bytes to its argument.
 
    TRAMPOLINE_STORAGE takes the address of the first instruction in a
    trampoline (not the start of the trampoline block) and returns the
@@ -538,10 +541,14 @@ procedures and continuations differ from closures) */
 */
 
 #define TRAMPOLINE_ENTRY_SIZE          3
-#define TRAMPOLINE_BLOCK_TO_ENTRY      3
-#define TRAMPOLINE_STORAGE(tramp)                                      \
-((((SCHEME_OBJECT *) tramp) - TRAMPOLINE_BLOCK_TO_ENTRY) +             \
- (2 + TRAMPOLINE_ENTRY_SIZE)) 
+#define TRAMPOLINE_BLOCK_TO_ENTRY      3 /* longwords from MNV to BLE */
+
+#define TRAMPOLINE_ENTRY_POINT(tramp_block)                            \
+  (((SCHEME_OBJECT *) (tramp_block)) + TRAMPOLINE_BLOCK_TO_ENTRY)
+
+#define TRAMPOLINE_STORAGE(tramp_entry)                                        \
+  ((((SCHEME_OBJECT *) (tramp_entry)) - TRAMPOLINE_BLOCK_TO_ENTRY) +   \
+   (2 + TRAMPOLINE_ENTRY_SIZE)) 
 
 #define STORE_TRAMPOLINE_ENTRY(entry_address, index) do                        \
 {                                                                      \