diff options
author | Stan Cox <coxs@gnu.org> | 1996-05-03 17:47:15 +0000 |
---|---|---|
committer | Stan Cox <coxs@gnu.org> | 1996-05-03 17:47:15 +0000 |
commit | 07d4d67db4846a081c61afa56d8ccdfda486a47e (patch) | |
tree | fa2d39de1e92763e72a0be2a8bad7c3a9ccd205c | |
parent | 926b3fae1f983da70ab3756d690148e4854b866c (diff) | |
download | gcc-07d4d67db4846a081c61afa56d8ccdfda486a47e.zip gcc-07d4d67db4846a081c61afa56d8ccdfda486a47e.tar.gz gcc-07d4d67db4846a081c61afa56d8ccdfda486a47e.tar.bz2 |
(ASM_OUTPUT_MI_THUNK): Define.
From-SVN: r11918
-rw-r--r-- | gcc/config/i386/att.h | 12 | ||||
-rw-r--r-- | gcc/config/i386/bsd.h | 12 | ||||
-rw-r--r-- | gcc/config/i386/sun386.h | 11 |
3 files changed, 35 insertions, 0 deletions
diff --git a/gcc/config/i386/att.h b/gcc/config/i386/att.h index b234ea1..3612cd2 100644 --- a/gcc/config/i386/att.h +++ b/gcc/config/i386/att.h @@ -92,3 +92,15 @@ do \ #undef ASM_OUTPUT_LABELREF #define ASM_OUTPUT_LABELREF(FILE,NAME) \ fprintf (FILE, "%s", NAME) + +/* Output code to add DELTA to the first argument, and then jump to FUNCTION. + Used for C++ multiple inheritance. */ + +#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ +do { \ + fprintf (FILE, "\taddl $%d,%s\n\tjmp ", DELTA, \ + i386_regparm > 0 ? "%eax" : "4(%esp)"); \ + assemble_name (FILE, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION))); \ + fprintf (FILE, "\n"); \ +} while (0) + diff --git a/gcc/config/i386/bsd.h b/gcc/config/i386/bsd.h index 6bf7399..4f8bdfe 100644 --- a/gcc/config/i386/bsd.h +++ b/gcc/config/i386/bsd.h @@ -123,6 +123,18 @@ Boston, MA 02111-1307, USA. */ #define ASM_OUTPUT_LABELREF(FILE,NAME) fprintf (FILE, "_%s", NAME) #endif /* not NO_UNDERSCORES */ +/* Output code to add DELTA to the first argument, and then jump to FUNCTION. + Used for C++ multiple inheritance. */ + +#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ +do { \ + fprintf (FILE, "\taddl $%d,%s\n\tjmp ", DELTA, \ + i386_regparm > 0 ? "%eax" : "4(%esp)"); \ + assemble_name (FILE, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION))); \ + fprintf (FILE, "\n"); \ +} while (0) + + /* Sequent has some changes in the format of DBX symbols. */ #define DBX_NO_XREFS 1 diff --git a/gcc/config/i386/sun386.h b/gcc/config/i386/sun386.h index 6e26807..0046e74 100644 --- a/gcc/config/i386/sun386.h +++ b/gcc/config/i386/sun386.h @@ -141,3 +141,14 @@ do \ #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ fprintf (FILE, ".%s%d:\n", PREFIX, NUM) + +/* Output code to add DELTA to the first argument, and then jump to FUNCTION. + Used for C++ multiple inheritance. */ + +#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ +do { \ + fprintf (FILE, "\taddl $%d,%s\n\tjmp ", DELTA, \ + i386_regparm > 0 ? "%eax" : "4(%esp)"); \ + assemble_name (FILE, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION))); \ + fprintf (FILE, "\n"); \ +} while (0) |