--- gcc/config/m68k/m68k.h 2018/04/24 18:10:24 1.1 +++ gcc/config/m68k/m68k.h 2018/04/24 18:44:17 1.1.1.5 @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler. Sun 68000/68020 version. - Copyright (C) 1987, 1988, 1993 Free Software Foundation, Inc. + Copyright (C) 1987, 1988, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. @@ -15,7 +15,8 @@ GNU General Public License for more deta You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ /* Note that some other tm.h files include this one and then override @@ -121,9 +122,19 @@ extern int target_flags; { "68030", -01400}, \ { "68030", 5}, \ { "68040", 01007}, \ + { "68851", 0}, /* Affects *_SPEC and/or GAS. */ \ + { "no-68851", 0}, /* Affects *_SPEC and/or GAS. */ \ + { "68302", 0}, /* Affects *_SPEC and/or GAS. */ \ + { "no-68302", 0}, /* Affects *_SPEC and/or GAS. */ \ + { "68332", 0}, /* Affects *_SPEC and/or GAS. */ \ + { "no-68332", 0}, /* Affects *_SPEC and/or GAS. */ \ + SUBTARGET_SWITCHES \ { "", TARGET_DEFAULT}} /* TARGET_DEFAULT is defined in sun*.h and isi.h, etc. */ +/* This is meant to be redefined in the host dependent files */ +#define SUBTARGET_SWITCHES + #ifdef SUPPORT_SUN_FPA /* Blow away 68881 flag silently on TARGET_FPA (since we can't clear any bits in TARGET_SWITCHES above) */ @@ -132,14 +143,19 @@ extern int target_flags; if (TARGET_FPA) target_flags &= ~2; \ if (! TARGET_68020 && flag_pic == 2) \ error("-fPIC is not currently supported on the 68000 or 68010\n"); \ + SUBTARGET_OVERRIDE_OPTIONS; \ } #else #define OVERRIDE_OPTIONS \ { \ if (! TARGET_68020 && flag_pic == 2) \ error("-fPIC is not currently supported on the 68000 or 68010\n"); \ + SUBTARGET_OVERRIDE_OPTIONS; \ } #endif /* defined SUPPORT_SUN_FPA */ + +/* This is meant to be redefined in the host dependent files */ +#define SUBTARGET_OVERRIDE_OPTIONS /* target machine storage layout */ @@ -329,21 +345,9 @@ extern int target_flags; compiler's mitts completely off it. We don't bother to zero it out of register classes. If neither TARGET_FPA or TARGET_68881 is set, the compiler won't touch since no instructions that use these - registers will be valid. - - Reserve PIC_OFFSET_TABLE_REGNUM (a5) for doing PIC relocation if - position independent code is being generated by making it a - fixed register */ - -#ifndef SUPPORT_SUN_FPA - -#define CONDITIONAL_REGISTER_USAGE \ -{ \ - if (flag_pic) \ - fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ -} + registers will be valid. */ -#else /* defined SUPPORT_SUN_FPA */ +#ifdef SUPPORT_SUN_FPA #define CONDITIONAL_REGISTER_USAGE \ { \ @@ -363,8 +367,6 @@ extern int target_flags; if (TEST_HARD_REG_BIT (x, i)) \ fixed_regs[i] = call_used_regs[i] = 1; \ } \ - if (flag_pic) \ - fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ } #endif /* defined SUPPORT_SUN_FPA */ @@ -389,7 +391,8 @@ extern int target_flags; if 68881 use is disabled. */ #define HARD_REGNO_MODE_OK(REGNO, MODE) \ - (((REGNO) < 16) \ + (((REGNO) < 16 \ + && !((REGNO) < 8 && (REGNO) + GET_MODE_SIZE ((MODE)) / 4 > 8)) \ || ((REGNO) < 24 \ && TARGET_68881 \ && (GET_MODE_CLASS (MODE) == MODE_FLOAT \ @@ -662,8 +665,9 @@ extern enum reg_class regno_reg_class[]; On the 68000 series, use a data reg if possible when the value is a constant in the range where moveq could be used and we ensure that QImodes are reloaded into data regs. - Also, if a floating constant needs reloading, put it in memory - if possible. */ + Also, if a floating constant needs reloading, put it in memory. + Don't do this for !G constants, since all patterns in the md file + expect them to be loaded into a register via fpmovecr. See above. */ #define PREFERRED_RELOAD_CLASS(X,CLASS) \ ((GET_CODE (X) == CONST_INT \ @@ -674,7 +678,9 @@ extern enum reg_class regno_reg_class[]; ? DATA_REGS \ : (GET_CODE (X) == CONST_DOUBLE \ && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT) \ - ? NO_REGS \ + ? (! CONST_DOUBLE_OK_FOR_LETTER_P (X, 'G') \ + && (CLASS == FP_REGS || CLASS == DATA_OR_FP_REGS) \ + ? FP_REGS : NO_REGS) \ : (CLASS)) /* Return the maximum number of consecutive registers @@ -743,6 +749,7 @@ extern enum reg_class regno_reg_class[]; /* Value is the number of byte of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), FUNTYPE is the data type of the function (as a tree), or for a library call it is an identifier node for the subroutine name. SIZE is the number of bytes of arguments passed on the stack. @@ -756,7 +763,7 @@ extern enum reg_class regno_reg_class[]; standard Unix calling sequences. If the option is not selected, the caller must always pop the args. */ -#define RETURN_POPS_ARGS(FUNTYPE,SIZE) \ +#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ ((TARGET_RTD && TREE_CODE (FUNTYPE) != IDENTIFIER_NODE \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \ @@ -928,41 +935,36 @@ extern enum reg_class regno_reg_class[]; of a trampoline, leaving space for the variable parts. */ /* On the 68k, the trampoline looks like this: - mov @#.,a0 - jsr @#___trampoline - jsr @#___trampoline - .long STATIC - .long FUNCTION -The reason for having three jsr insns is so that an entire line -of the instruction cache is filled in a predictable way -that will always be the same. + movl #STATIC,a0 + jmp FUNCTION -We always use the assembler label ___trampoline -regardless of whether the system adds underscores. */ + WARNING: Targets that may run on 68040+ cpus must arrange for + the instruction cache to be flushed. Previous incarnations of + the m68k trampoline code attempted to get around this by either + using an out-of-line transfer function or pc-relative data, but + the fact remains that the code to jump to the transfer function + or the code to load the pc-relative data needs to be flushed + just as much as the "variable" portion of the trampoline. + Recognizing that a cache flush is going to be required anyway, + dispense with such notions and build a smaller trampoline. */ -#define TRAMPOLINE_TEMPLATE(FILE) \ -{ \ - ASM_OUTPUT_SHORT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x207c)); \ - ASM_OUTPUT_SHORT (FILE, const0_rtx); \ - ASM_OUTPUT_SHORT (FILE, const0_rtx); \ - ASM_OUTPUT_SHORT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x4eb9)); \ - ASM_OUTPUT_INT (FILE, gen_rtx (SYMBOL_REF, SImode, "*___trampoline"));\ - ASM_OUTPUT_SHORT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x4eb9)); \ - ASM_OUTPUT_INT (FILE, gen_rtx (SYMBOL_REF, SImode, "*___trampoline"));\ - ASM_OUTPUT_SHORT (FILE, const0_rtx); \ - ASM_OUTPUT_SHORT (FILE, const0_rtx); \ - ASM_OUTPUT_SHORT (FILE, const0_rtx); \ - ASM_OUTPUT_SHORT (FILE, const0_rtx); \ -} +/* Since more instructions are required to move a template into + place than to create it on the spot, don't use a template. */ /* Length in units of the trampoline for entering a nested function. */ -#define TRAMPOLINE_SIZE 26 +#define TRAMPOLINE_SIZE 12 -/* Alignment required for a trampoline. 16 is used to find the - beginning of a line in the instruction cache. */ +/* Alignment required for a trampoline in bytes. */ -#define TRAMPOLINE_ALIGN 16 +#define TRAMPOLINE_ALIGNMENT 2 + +/* Targets redefine this to invoke code to either flush the cache, + or enable stack execution (or both). */ + +#ifndef FINALIZE_TRAMPOLINE +#define FINALIZE_TRAMPOLINE(TRAMP) +#endif /* Emit RTL insns to initialize the variable parts of a trampoline. FNADDR is an RTX for the address of the function's pure code. @@ -970,14 +972,20 @@ regardless of whether the system adds un #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ { \ - emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 2)), TRAMP); \ - emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 18)), CXT); \ - emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 22)), FNADDR); \ + emit_move_insn (gen_rtx (MEM, HImode, TRAMP), GEN_INT(0x207C)); \ + emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 2)), CXT); \ + emit_move_insn (gen_rtx (MEM, HImode, plus_constant (TRAMP, 6)), \ + GEN_INT(0x4EF9)); \ + emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 8)), FNADDR); \ + FINALIZE_TRAMPOLINE(TRAMP); \ } /* This is the library routine that is used to transfer control from the trampoline - to the actual nested function. */ + to the actual nested function. + It is defined for backward compatibility, + for linking with object code that used the old + trampoline definition. */ /* A colon is used with no explicit operands to cause the template string to be scanned for %-constructs. */ @@ -1073,7 +1081,12 @@ __transfer_from_trampoline () \ that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ #define LEGITIMATE_PIC_OPERAND_P(X) \ - (! symbolic_operand (X, VOIDmode)) + ((! symbolic_operand (X, VOIDmode) \ + && ! (GET_CODE (X) == CONST_DOUBLE && CONST_DOUBLE_MEM (X) \ + && GET_CODE (CONST_DOUBLE_MEM (X)) == MEM \ + && symbolic_operand (XEXP (CONST_DOUBLE_MEM (X), 0), \ + VOIDmode))) \ + || (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X))) /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its validity for a certain class. @@ -1120,14 +1133,23 @@ __transfer_from_trampoline () \ The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS. */ +/* Allow SUBREG everywhere we allow REG. This results in better code. It + also makes function inlining work when inline functions are called with + arguments that are SUBREGs. */ + +#define LEGITIMATE_BASE_REG_P(X) \ + ((GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \ + || (GET_CODE (X) == SUBREG \ + && GET_CODE (SUBREG_REG (X)) == REG \ + && REG_OK_FOR_BASE_P (SUBREG_REG (X)))) + #define INDIRECTABLE_1_ADDRESS_P(X) \ ((CONSTANT_ADDRESS_P (X) && (!flag_pic || LEGITIMATE_PIC_OPERAND_P (X))) \ - || (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \ + || LEGITIMATE_BASE_REG_P (X) \ || ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == POST_INC) \ - && REG_P (XEXP (X, 0)) \ - && REG_OK_FOR_BASE_P (XEXP (X, 0))) \ + && LEGITIMATE_BASE_REG_P (XEXP (X, 0))) \ || (GET_CODE (X) == PLUS \ - && REG_P (XEXP (X, 0)) && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ + && LEGITIMATE_BASE_REG_P (XEXP (X, 0)) \ && GET_CODE (XEXP (X, 1)) == CONST_INT \ && ((unsigned) INTVAL (XEXP (X, 1)) + 0x8000) < 0x10000) \ || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx \ @@ -1156,7 +1178,7 @@ __transfer_from_trampoline () \ && (GET_CODE (PATTERN (temp)) == ADDR_VEC \ || GET_CODE (PATTERN (temp)) == ADDR_DIFF_VEC)) \ goto ADDR; \ - if (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) goto ADDR; } + if (LEGITIMATE_BASE_REG_P (X)) goto ADDR; } #define GO_IF_INDEXING(X, ADDR) \ { if (GET_CODE (X) == PLUS && LEGITIMATE_INDEX_P (XEXP (X, 0))) \ @@ -1179,7 +1201,10 @@ __transfer_from_trampoline () \ || (GET_CODE (X) == SIGN_EXTEND \ && GET_CODE (XEXP (X, 0)) == REG \ && GET_MODE (XEXP (X, 0)) == HImode \ - && REG_OK_FOR_INDEX_P (XEXP (X, 0)))) + && REG_OK_FOR_INDEX_P (XEXP (X, 0))) \ + || (GET_CODE (X) == SUBREG \ + && GET_CODE (SUBREG_REG (X)) == REG \ + && REG_OK_FOR_INDEX_P (SUBREG_REG (X)))) #define LEGITIMATE_INDEX_P(X) \ (LEGITIMATE_INDEX_REG_P (X) \ @@ -1190,9 +1215,19 @@ __transfer_from_trampoline () \ || INTVAL (XEXP (X, 1)) == 4 \ || INTVAL (XEXP (X, 1)) == 8))) -#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ -{ GO_IF_NONINDEXED_ADDRESS (X, ADDR); \ - GO_IF_INDEXED_ADDRESS (X, ADDR); } +/* If pic, we accept INDEX+LABEL, which is what do_tablejump makes. */ +#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ +{ GO_IF_NONINDEXED_ADDRESS (X, ADDR); \ + GO_IF_INDEXED_ADDRESS (X, ADDR); \ + if (flag_pic && MODE == CASE_VECTOR_MODE && GET_CODE (X) == PLUS \ + && LEGITIMATE_INDEX_P (XEXP (X, 0)) \ + && GET_CODE (XEXP (X, 1)) == LABEL_REF) \ + goto ADDR; } + +/* Don't call memory_address_noforce for the address to fetch + the switch offset. This address is ok as it stands (see above), + but memory_address_noforce would alter it. */ +#define PIC_CASE_VECTOR_ADDRESS(index) index /* Try machine-dependent ways of modifying an illegitimate address to be legitimate. If we find one, return the new, valid address. @@ -1316,12 +1351,8 @@ __transfer_from_trampoline () \ case CONST_INT: \ /* Constant zero is super cheap due to clr instruction. */ \ if (RTX == const0_rtx) return 0; \ - /* Constants between -128 and 127 are cheap due to moveq */ \ - if (INTVAL (RTX) >= -128 && INTVAL (RTX) <= 127) return 1; \ - /* Constants between -136 and 254 are easily generated */ \ - /* by intelligent uses of moveq, add[q], and subq */ \ - if ((OUTER_CODE) == SET && INTVAL (RTX) >= -136 \ - && INTVAL (RTX) <= 254) return 2; \ + /* if ((OUTER_CODE) == SET) */ \ + return const_int_cost(RTX); \ case CONST: \ case LABEL_REF: \ case SYMBOL_REF: \ @@ -1335,8 +1366,10 @@ __transfer_from_trampoline () \ work properly in synth_mult on the 68020, relative to an average of the time for add and the time for shift, taking away a little more because sometimes move insns are needed. */ +/* div?.w is relatively cheaper on 68000 counted in COSTS_N_INSNS terms. */ #define MULL_COST (TARGET_68040 ? 5 : 13) -#define MULW_COST (TARGET_68040 ? 3 : 8) +#define MULW_COST (TARGET_68040 ? 3 : TARGET_68020 ? 8 : 5) +#define DIVW_COST (TARGET_68020 ? 27 : 12) #define RTX_COSTS(X,CODE,OUTER_CODE) \ case PLUS: \ @@ -1353,8 +1386,19 @@ __transfer_from_trampoline () \ break; \ case ASHIFT: \ case ASHIFTRT: \ - case LSHIFT: \ - case LSHIFTRT: \ + case LSHIFTRT: \ + if (! TARGET_68020) \ + { \ + if (GET_CODE (XEXP (X, 1)) == CONST_INT) \ + { \ + if (INTVAL (XEXP (X, 1)) < 16) \ + return COSTS_N_INSNS (2) + INTVAL (XEXP (X, 1)) / 2; \ + else \ + /* We're using clrw + swap for these cases. */ \ + return COSTS_N_INSNS (4) + (INTVAL (XEXP (X, 1)) - 16) / 2; \ + } \ + return COSTS_N_INSNS (10); /* worst case */ \ + } \ /* A shift by a big integer takes an extra instruction. */ \ if (GET_CODE (XEXP (X, 1)) == CONST_INT \ && (INTVAL (XEXP (X, 1)) == 16)) \ @@ -1365,30 +1409,20 @@ __transfer_from_trampoline () \ return COSTS_N_INSNS (3); /* lsr #i,dn */ \ break; \ case MULT: \ - if (GET_CODE (XEXP (x, 1)) == CONST_INT \ - && exact_log2 (INTVAL (XEXP (x, 1))) >= 0) \ - { \ - /* A shift by a big integer takes an extra instruction. */ \ - if (GET_CODE (XEXP (X, 1)) == CONST_INT \ - && (INTVAL (XEXP (X, 1)) == (1 << 16))) \ - return COSTS_N_INSNS (2); /* clrw;swap */ \ - if (GET_CODE (XEXP (X, 1)) == CONST_INT \ - && !(INTVAL (XEXP (X, 1)) > 1 \ - && INTVAL (XEXP (X, 1)) <= 256)) \ - return COSTS_N_INSNS (3); /* lsr #i,dn */ \ - break; \ - } \ - else if (GET_MODE (X) == QImode || GET_MODE (X) == HImode) \ + if ((GET_CODE (XEXP (X, 0)) == ZERO_EXTEND \ + || GET_CODE (XEXP (X, 0)) == SIGN_EXTEND) \ + && GET_MODE (X) == SImode) \ + return COSTS_N_INSNS (MULW_COST); \ + if (GET_MODE (X) == QImode || GET_MODE (X) == HImode) \ return COSTS_N_INSNS (MULW_COST); \ else \ return COSTS_N_INSNS (MULL_COST); \ - break; \ case DIV: \ case UDIV: \ case MOD: \ case UMOD: \ if (GET_MODE (X) == QImode || GET_MODE (X) == HImode) \ - return COSTS_N_INSNS (27); /* div.w */ \ + return COSTS_N_INSNS (DIVW_COST); /* div.w */ \ return COSTS_N_INSNS (43); /* div.l */ /* Tell final.c how to eliminate redundant test instructions. */ @@ -1772,12 +1806,162 @@ do { long l; \ #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR) +/* Definitions for generating bytecode */ + +/* Just so it's known this target is supported by the bytecode generator. + If this define isn't found anywhere in the target config files, then + dummy stubs are supplied by bytecode.h, and any attempt to use + -fbytecode will result in an error message. */ + +#define TARGET_SUPPORTS_BYTECODE + +/* Minimal segment alignment within sections is 8 units. */ +#define MACHINE_SEG_ALIGN 3 + +/* Integer alignment is two units. */ +#define INT_ALIGN 2 + +/* Pointer alignment is eight units. */ +#define PTR_ALIGN 3 + +/* Global symbols begin with `_' */ +#define NAMES_HAVE_UNDERSCORES + +/* BC_xxx below are similar to their ASM_xxx counterparts above. */ +#define BC_GLOBALIZE_LABEL(FP, NAME) bc_globalize_label(NAME) + +#define BC_OUTPUT_COMMON(FP, NAME, SIZE, ROUNDED) \ + do { bc_emit_common(NAME, ROUNDED); bc_globalize_label(NAME); } while (0) + +#define BC_OUTPUT_LOCAL(FP, NAME, SIZE, ROUNDED) \ + bc_emit_common(NAME, ROUNDED) + +#define BC_OUTPUT_ALIGN(FP, ALIGN) bc_align(ALIGN) + +#define BC_OUTPUT_LABEL(FP, NAME) bc_emit_labeldef(NAME) + +#define BC_OUTPUT_SKIP(FP, SIZE) bc_emit_skip(SIZE) + +#define BC_OUTPUT_LABELREF(FP, NAME) \ + do { \ + char *foo = (char *) xmalloc(strlen(NAME) + 2); \ + strcpy(foo, "_"); \ + strcat(foo, NAME); \ + bc_emit_labelref (foo); \ + free (foo); \ + } while (0) + +#define BC_OUTPUT_FLOAT(FP, VAL) \ + do { \ + float F = VAL; \ + bc_emit ((char *) &F, sizeof F); \ + } while (0) + +#define BC_OUTPUT_DOUBLE(FP, VAL) \ + do { \ + double D = VAL; \ + bc_emit ((char *) &D, sizeof D); \ + } while (0) + +#define BC_OUTPUT_BYTE(FP, VAL) \ + do { \ + char C = VAL; \ + bc_emit (&C, 1); \ + } while (0) + + +#define BC_OUTPUT_FILE ASM_OUTPUT_FILE +#define BC_OUTPUT_ASCII ASM_OUTPUT_ASCII +#define BC_OUTPUT_IDENT ASM_OUTPUT_IDENT + +/* Same as XSTR, but for bytecode */ +#define BCXSTR(RTX) ((RTX)->bc_label) + + +/* Flush bytecode buffer onto file */ +#define BC_WRITE_FILE(FP) \ +{ \ + fprintf (FP, ".text\n"); \ + bc_seg_write (bc_text_seg, FP); \ + fprintf(FP, "\n.data\n"); \ + bc_seg_write (bc_data_seg, FP); \ + bc_sym_write (FP); /* do .globl, .bss, etc. */ \ +} + +/* Write one symbol */ +#define BC_WRITE_SEGSYM(SEGSYM, FP) \ +{ \ + prsym (FP, (SEGSYM)->sym->name); \ + fprintf (FP, ":\n"); \ +} + + +/* Write one reloc entry */ +#define BC_WRITE_RELOC_ENTRY(SEGRELOC, FP, OFFSET) \ +{ \ + fprintf (FP, "\t.long "); \ + prsym (FP, (SEGRELOC)->sym->name); \ + fprintf (FP, " + %d\n", OFFSET); \ +} + +/* Start new line of bytecodes */ +#define BC_START_BYTECODE_LINE(FP) \ +{ \ + fprintf (FP, "\t.byte"); \ +} + +/* Write one bytecode */ +#define BC_WRITE_BYTECODE(SEP, VAL, FP) \ +{ \ + fprintf (FP, "%c0x%02X", (SEP), (VAL) & 0xff); \ +} + +/* Write one bytecode RTL entry */ +#define BC_WRITE_RTL(R, FP) \ +{ \ + fprintf (FP, "%s+%d/0x%08X\n", (R)->label, (R)->offset, (R)->bc_label); \ +} + + +/* Emit function entry trampoline */ +#define BC_EMIT_TRAMPOLINE(TRAMPSEG, CALLINFO) \ +{ \ + short insn; \ + \ + /* Push a reference to the callinfo structure. */ \ + insn = 0x4879; /* pea xxx.L */ \ + seg_data (TRAMPSEG, (char *) &insn, sizeof insn); \ + seg_refsym (TRAMPSEG, CALLINFO, 0); \ + \ + /* Call __interp, pop arguments, and return. */ \ + insn = 0x4eb9; /* jsr xxx.L */ \ + seg_data (TRAMPSEG, (char *) &insn, sizeof insn); \ + seg_refsym (TRAMPSEG, "__callint", 0); \ + insn = 0x588f; /* addql #4, sp */ \ + seg_data (TRAMPSEG, (char *) &insn, sizeof insn); \ + insn = 0x4e75; /* rts */ \ + seg_data (TRAMPSEG, (char *) &insn, sizeof insn); \ +} + + + +#if 0 +#define VALIDATE_STACK() if (stack_depth < 0) abort (); +#else +#if 0 +#define VALIDATE_STACK() \ + fprintf (stderr, " %%%d%%", stack_depth); +#endif +#endif + /* Define functions defined in aux-output.c and used in templates. */ +extern char *output_move_const_into_data_reg (); extern char *output_move_double (); extern char *output_move_const_single (); extern char *output_move_const_double (); extern char *output_btst (); +extern char *output_scc_di (); /* Local variables: