From: Richard Stallman Date: Tue, 31 Mar 1992 09:05:45 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9fd3fbd05cee0fc4bc5a7dbfc15b95345f8a1b6a;p=gcc.git *** empty log message *** From-SVN: r645 --- diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index 9c417b65004..89f57729c18 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -912,23 +912,26 @@ extern enum reg_class regno_reg_class[]; /* On the 68k, the trampoline looks like this: mov @#.,a0 - jsr @#__trampoline - jsr @#__trampoline + 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. */ +that will always be the same. + +We always use the assembler label ___trampoline +regardless of whether the system adds underscores. */ #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, 0x4ef9)); \ - ASM_OUTPUT_INT (FILE, gen_rtx (SYMBOL_REF, SImode, "__trampoline")); \ - ASM_OUTPUT_SHORT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x4ef9)); \ - 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, 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); \ @@ -969,6 +972,7 @@ void \ __transfer_from_trampoline () \ { \ register char *a0 asm ("%a0"); \ + asm (GLOBAL_ASM_OP, " ___trampoline"); \ asm ("___trampoline:"); \ asm volatile ("move%.l %0,%@" : : "m" (a0[22])); \ asm volatile ("move%.l %1,%0" : "=a" (a0) : "m" (a0[18])); \ @@ -1303,6 +1307,8 @@ __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. */ +#define MULL_COST (TARGET_68040 ? 5 : 13) +#define MULW_COST (TARGET_68040 ? 3 : 8) #define RTX_COSTS(X,CODE) \ case PLUS: \ @@ -1345,9 +1351,9 @@ __transfer_from_trampoline () \ break; \ } \ else if (GET_MODE (X) == QImode || GET_MODE (X) == HImode) \ - return COSTS_N_INSNS (8); /* mul.w */ \ + return COSTS_N_INSNS (MULW_COST); \ else \ - return COSTS_N_INSNS (13); /* mul.l */ \ + return COSTS_N_INSNS (MULL_COST); \ break; \ case DIV: \ case UDIV: \ @@ -1473,8 +1479,11 @@ __transfer_from_trampoline () \ /* This is how to output a command to make the user-level label named NAME defined for reference from other files. */ +#define GLOBAL_ASM_OP ".globl" #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ - do { fputs (".globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0) + do { fprintf (FILE, "%s ", GLOBAL_ASM_OP); \ + assemble_name (FILE, NAME); \ + fputs ("\n", FILE);} while (0) /* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */ diff --git a/gcc/config/m68k/sgs.h b/gcc/config/m68k/sgs.h index 4ca91af1ff4..55f315916c0 100644 --- a/gcc/config/m68k/sgs.h +++ b/gcc/config/m68k/sgs.h @@ -38,6 +38,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define LONG_ASM_OP ".long" #define SPACE_ASM_OP ".space" #define ALIGN_ASM_OP ".align" +#undef GLOBAL_ASM_OP #define GLOBAL_ASM_OP ".global" #define SWBEG_ASM_OP ".swbeg" #define SET_ASM_OP ".set" @@ -199,17 +200,6 @@ do { union { float f; long l;} tem; \ #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (68k, SGS/AT&T syntax)"); -/* This is how to output a command to make the user-level label named NAME - defined for reference from other files. */ - -#undef ASM_GLOBALIZE_LABEL -#define ASM_GLOBALIZE_LABEL(FILE,NAME) \ - do { \ - fprintf ((FILE), "\t%s ", GLOBAL_ASM_OP); \ - assemble_name ((FILE), NAME); \ - fputs ("\n", FILE); \ - } while (0) - #undef PRINT_OPERAND_PRINT_FLOAT #define PRINT_OPERAND_PRINT_FLOAT(CODE,FILE) \ asm_fprintf ((FILE), "%I0x%x", u1.i); diff --git a/gcc/config/m68k/tower-as.h b/gcc/config/m68k/tower-as.h index a9615f4ca8f..c43882e1237 100644 --- a/gcc/config/m68k/tower-as.h +++ b/gcc/config/m68k/tower-as.h @@ -159,10 +159,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ fprintf (FILE, "\tlink %%a6,&%d\n", -fsize); \ else \ fprintf (FILE, "\tlink %%a6,&0\n\tsub.l &%d,%%sp\n", fsize); } \ - for (regno = 24; regno < 56; regno++) \ - if (regs_ever_live[regno] && ! call_used_regs[regno]) \ - fprintf(FILE, "\tfpmoved %s,-(%%sp)\n", \ - reg_names[regno]); \ for (regno = 16; regno < 24; regno++) \ if (regs_ever_live[regno] && ! call_used_regs[regno]) \ mask |= 1 << (regno - 16); \ @@ -188,20 +184,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ { register int regno; \ register int mask, fmask; \ register int nregs; \ - int offset, foffset, fpoffset; \ + int offset, foffset; \ extern char call_used_regs[]; \ int fsize = ((SIZE) + 3) & -4; \ int big = 0; \ - nregs = 0; fmask = 0; fpoffset = 0; \ - for (regno = 24 ; regno < 56 ; regno++) \ - if (regs_ever_live[regno] && ! call_used_regs[regno]) \ - nregs++; \ - fpoffset = nregs*8; \ - nregs = 0; \ + nregs = 0; fmask = 0; \ for (regno = 16; regno < 24; regno++) \ if (regs_ever_live[regno] && ! call_used_regs[regno]) \ { nregs++; fmask |= 1 << (23 - regno); } \ - foffset = fpoffset + nregs * 12; \ + foffset = nregs * 12; \ nregs = 0; mask = 0; \ if (frame_pointer_needed) regs_ever_live[FRAME_POINTER_REGNUM] = 0; \ for (regno = 0; regno < 16; regno++) \ @@ -210,7 +201,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ offset = foffset + nregs * 4; \ if (offset + fsize >= 0x8000 \ && frame_pointer_needed \ - && (mask || fmask || fpoffset)) \ + && (mask || fmask)) \ { fprintf (FILE, "\tmov.l &%d,%%a0\n", -fsize); \ fsize = 0, big = 1; } \ if (exact_log2 (mask) >= 0) { \ @@ -241,20 +232,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ else \ fprintf (FILE, "\tfmovm -%d(%%a6),&0x%x\n", \ foffset + fsize, fmask); } \ - if (fpoffset != 0) \ - for (regno = 55; regno >= 24; regno--) \ - if (regs_ever_live[regno] && ! call_used_regs[regno]) { \ - if (big) \ - fprintf(FILE, "\tfpmoved -%d(%%a6,%%a0.l),%s\n", \ - fpoffset + fsize, reg_names[regno]); \ - else if (! frame_pointer_needed) \ - fprintf(FILE, "\tfpmoved (%%sp)+,%s\n", \ - reg_names[regno]); \ - else \ - fprintf(FILE, "\tfpmoved -%d(%%a6),%s\n", \ - fpoffset + fsize, reg_names[regno]); \ - fpoffset -= 8; \ - } \ if (current_function_returns_pointer) \ fprintf (FILE, "\tmov.l %%d0,%%a0\n"); \ if (frame_pointer_needed) \ @@ -314,16 +291,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 11), \ sprintf ((OUTPUT), "%s%%%%%d", (NAME), (LABELNO))) - -/* This is how to output a command to make the user-level label named NAME + +/* This is the command to make the user-level label named NAME defined for reference from other files. */ -#undef ASM_GLOBALIZE_LABEL -#define ASM_GLOBALIZE_LABEL(FILE,NAME) \ -do { fputs ("\tglobal ", FILE); \ - assemble_name (FILE, NAME); \ - fputs ("\n", FILE); \ - } while (0) +#undef GLOBAL_ASM_OP +#define GLOBAL_ASM_OP "global" #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ @@ -577,7 +550,9 @@ do { fprintf (asm_out_file, "\tdef\t"); \ #define PUT_SDB_ENDEF fputs("\tendef\n", asm_out_file) #define PUT_SDB_TYPE(a) fprintf(asm_out_file, "\ttype\t0%o;", a) #define PUT_SDB_SIZE(a) fprintf(asm_out_file, "\tsize\t%d;", a) -#define PUT_SDB_DIM(a) fprintf(asm_out_file, "\tdim\t%d;", a) +#define PUT_SDB_START_DIM fprintf(asm_out_file, "\tdim\t") +#define PUT_SDB_NEXT_DIM(a) fprintf(asm_out_file, "%d,", a) +#define PUT_SDB_LAST_DIM(a) fprintf(asm_out_file, "%d;", a) #define PUT_SDB_TAG(a) \ do { fprintf (asm_out_file, "\ttag\t"); \