Commit 01bbf777 by Andreas Schwab Committed by Bernardo Innocenti

m68k.h (REGISTER_NAMES): Prefix each name with REGISTER_PREFIX.

	* config/m68k/m68k.h (REGISTER_NAMES): Prefix each name with
	REGISTER_PREFIX.
	* (M68K_FP_REG_NAME): New macro to specify an alternate name for the
	frame pointer register, overridable by OS targets.
	* (M68K_REGNAME): Macro to obtain register name for asm output,
	eventually replacing %a6 with M68K_FP_REG_NAME.
	* config/m68k/coff.h (REGISTER_NAMES): Don't redefine.
	* config/m68k/linux.h (REGISTER_NAMES): Likewise.
	* config/m68k/m68kelf.h (REGISTER_NAMES): Likewise.
	* config/m68k/netbsd-elf.h (REGISTER_NAMES): Likewise.
	* config/m68k/m68k.c: Use M68K_REGNAME(x) in place of reg_names[x].

Co-Authored-By: Bernardo Innocenti <bernie@develer.com>

From-SVN: r77510
parent f934561e
2004-02-08 Andreas Schwab <schwab@suse.de>
Bernardo Innocenti <bernie@develer.com>
* config/m68k/m68k.h (REGISTER_NAMES): Prefix each name with
REGISTER_PREFIX.
* (M68K_FP_REG_NAME): New macro to specify an alternate name for the
frame pointer register, overridable by OS targets.
* (M68K_REGNAME): Macro to obtain register name for asm output,
eventually replacing %a6 with M68K_FP_REG_NAME.
* config/m68k/coff.h (REGISTER_NAMES): Don't redefine.
* config/m68k/linux.h (REGISTER_NAMES): Likewise.
* config/m68k/m68kelf.h (REGISTER_NAMES): Likewise.
* config/m68k/netbsd-elf.h (REGISTER_NAMES): Likewise.
* config/m68k/m68k.c: Use M68K_REGNAME(x) in place of reg_names[x].
2004-02-08 Kazu Hirata <kazu@cs.umass.edu> 2004-02-08 Kazu Hirata <kazu@cs.umass.edu>
* target-def.h (TARGET_STRUCT_VALUE_RTX): Define as * target-def.h (TARGET_STRUCT_VALUE_RTX): Define as
......
/* Definitions of target machine for GNU compiler. /* Definitions of target machine for GNU compiler.
m68k series COFF object files and debugging, version. m68k series COFF object files and debugging, version.
Copyright (C) 1994, 1996, 1997, 2000, 2002, 2003 Free Software Foundation, Inc. Copyright (C) 1994, 1996, 1997, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -68,14 +68,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -68,14 +68,6 @@ Boston, MA 02111-1307, USA. */
return "jmp %%pc@(2,%0:w)"; \ return "jmp %%pc@(2,%0:w)"; \
} while (0) } while (0)
/* Here are the new register names. */
#undef REGISTER_NAMES
#define REGISTER_NAMES \
{"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \
"%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \
"%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", "argptr" }
#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true #define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
/* If defined, a C expression whose value is a string containing the /* If defined, a C expression whose value is a string containing the
......
/* Definitions for Motorola 68k running Linux-based GNU systems with /* Definitions for Motorola 68k running Linux-based GNU systems with
ELF format. ELF format.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -59,17 +59,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -59,17 +59,6 @@ Boston, MA 02111-1307, USA. */
#define ASM_COMMENT_START "|" #define ASM_COMMENT_START "|"
/* How to refer to registers in assembler output.
This sequence is indexed by compiler's hard-register-number.
Motorola format uses different register names than defined in m68k.h. */
#undef REGISTER_NAMES
#define REGISTER_NAMES \
{"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \
"%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \
"%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", "argptr" }
#undef SIZE_TYPE #undef SIZE_TYPE
#define SIZE_TYPE "unsigned int" #define SIZE_TYPE "unsigned int"
......
...@@ -499,20 +499,20 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED ...@@ -499,20 +499,20 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED
fprintf (stream, MOTOROLA ? fprintf (stream, MOTOROLA ?
"\tpea (%s)\n\tmove.l %s,%s\n" : "\tpea (%s)\n\tmove.l %s,%s\n" :
"\tpea %s@\n\tmovel %s,%s\n", "\tpea %s@\n\tmovel %s,%s\n",
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
reg_names[STACK_POINTER_REGNUM], M68K_REGNAME(STACK_POINTER_REGNUM),
reg_names[FRAME_POINTER_REGNUM]); M68K_REGNAME(FRAME_POINTER_REGNUM));
else if (fsize_with_regs < 0x8000) else if (fsize_with_regs < 0x8000)
asm_fprintf (stream, "\tlink" ASM_DOTW " %s,%I%wd\n", asm_fprintf (stream, "\tlink" ASM_DOTW " %s,%I%wd\n",
reg_names[FRAME_POINTER_REGNUM], -fsize_with_regs); M68K_REGNAME(FRAME_POINTER_REGNUM), -fsize_with_regs);
else if (TARGET_68020) else if (TARGET_68020)
asm_fprintf (stream, "\tlink" ASM_DOTL " %s,%I%wd\n", asm_fprintf (stream, "\tlink" ASM_DOTL " %s,%I%wd\n",
reg_names[FRAME_POINTER_REGNUM], -fsize_with_regs); M68K_REGNAME(FRAME_POINTER_REGNUM), -fsize_with_regs);
else else
/* Adding negative number is faster on the 68040. */ /* Adding negative number is faster on the 68040. */
asm_fprintf (stream, "\tlink" ASM_DOTW " %s,%I0\n" asm_fprintf (stream, "\tlink" ASM_DOTW " %s,%I0\n"
"\tadd" ASM_DOT "l %I%wd,%Rsp\n", "\tadd" ASM_DOT "l %I%wd,%Rsp\n",
reg_names[FRAME_POINTER_REGNUM], -fsize_with_regs); M68K_REGNAME(FRAME_POINTER_REGNUM), -fsize_with_regs);
if (dwarf2out_do_frame ()) if (dwarf2out_do_frame ())
{ {
...@@ -591,7 +591,7 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED ...@@ -591,7 +591,7 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED
{ {
if (REG_P (stack_limit_rtx)) if (REG_P (stack_limit_rtx))
asm_fprintf (stream, "\tcmp" ASM_DOT "l %s,%Rsp\n\ttrapcs\n", asm_fprintf (stream, "\tcmp" ASM_DOT "l %s,%Rsp\n\ttrapcs\n",
reg_names[REGNO (stack_limit_rtx)]); M68K_REGNAME(REGNO (stack_limit_rtx)));
else if (GET_CODE (stack_limit_rtx) != SYMBOL_REF) else if (GET_CODE (stack_limit_rtx) != SYMBOL_REF)
warning ("stack limit expression is not supported"); warning ("stack limit expression is not supported");
} }
...@@ -611,7 +611,7 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED ...@@ -611,7 +611,7 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED
asm_fprintf (stream, MOTOROLA ? asm_fprintf (stream, MOTOROLA ?
"\t%Omove.l %s,-(%Rsp)\n" : "\t%Omove.l %s,-(%Rsp)\n" :
"\tmovel %s,%Rsp@-\n", "\tmovel %s,%Rsp@-\n",
reg_names[15 - i]); M68K_REGNAME(15 - i));
if (dwarf2out_do_frame ()) if (dwarf2out_do_frame ())
{ {
char *l = (char *) dwarf2out_cfi_label (); char *l = (char *) dwarf2out_cfi_label ();
...@@ -661,22 +661,22 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED ...@@ -661,22 +661,22 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED
if (TARGET_ID_SHARED_LIBRARY) if (TARGET_ID_SHARED_LIBRARY)
{ {
asm_fprintf (stream, "\tmovel %s@(%s), %s\n", asm_fprintf (stream, "\tmovel %s@(%s), %s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM], M68K_REGNAME(PIC_OFFSET_TABLE_REGNUM),
m68k_library_id_string, m68k_library_id_string,
reg_names[PIC_OFFSET_TABLE_REGNUM]); M68K_REGNAME(PIC_OFFSET_TABLE_REGNUM));
} }
else else
{ {
if (MOTOROLA) if (MOTOROLA)
asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n", asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM]); M68K_REGNAME(PIC_OFFSET_TABLE_REGNUM));
else else
{ {
asm_fprintf (stream, "\tmovel %I%U_GLOBAL_OFFSET_TABLE_, %s\n", asm_fprintf (stream, "\tmovel %I%U_GLOBAL_OFFSET_TABLE_, %s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM]); M68K_REGNAME(PIC_OFFSET_TABLE_REGNUM));
asm_fprintf (stream, "\tlea %Rpc@(0,%s:l),%s\n", asm_fprintf (stream, "\tlea %Rpc@(0,%s:l),%s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM], M68K_REGNAME(PIC_OFFSET_TABLE_REGNUM),
reg_names[PIC_OFFSET_TABLE_REGNUM]); M68K_REGNAME(PIC_OFFSET_TABLE_REGNUM));
} }
} }
} }
...@@ -779,31 +779,31 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED ...@@ -779,31 +779,31 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED
if (MOTOROLA) if (MOTOROLA)
asm_fprintf (stream, "\t%Omove.l -%wd(%s,%Ra1.l),%s\n", asm_fprintf (stream, "\t%Omove.l -%wd(%s,%Ra1.l),%s\n",
offset, offset,
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
reg_names[i]); M68K_REGNAME(i));
else else
asm_fprintf (stream, "\tmovel %s@(-%wd,%Ra1:l),%s\n", asm_fprintf (stream, "\tmovel %s@(-%wd,%Ra1:l),%s\n",
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
offset, offset,
reg_names[i]); M68K_REGNAME(i));
} }
else if (restore_from_sp) else if (restore_from_sp)
asm_fprintf (stream, MOTOROLA ? asm_fprintf (stream, MOTOROLA ?
"\t%Omove.l (%Rsp)+,%s\n" : "\t%Omove.l (%Rsp)+,%s\n" :
"\tmovel %Rsp@+,%s\n", "\tmovel %Rsp@+,%s\n",
reg_names[i]); M68K_REGNAME(i));
else else
{ {
if (MOTOROLA) if (MOTOROLA)
asm_fprintf (stream, "\t%Omove.l -%wd(%s),%s\n", asm_fprintf (stream, "\t%Omove.l -%wd(%s),%s\n",
offset, offset,
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
reg_names[i]); M68K_REGNAME(i));
else else
asm_fprintf (stream, "\tmovel %s@(-%wd),%s\n", asm_fprintf (stream, "\tmovel %s@(-%wd),%s\n",
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
offset, offset,
reg_names[i]); M68K_REGNAME(i));
} }
offset -= 4; offset -= 4;
} }
...@@ -816,7 +816,7 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED ...@@ -816,7 +816,7 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED
if (big) if (big)
{ {
asm_fprintf (stream, "\tadd" ASM_DOT "l %s,%Ra1\n", asm_fprintf (stream, "\tadd" ASM_DOT "l %s,%Ra1\n",
reg_names[FRAME_POINTER_REGNUM]); M68K_REGNAME(FRAME_POINTER_REGNUM));
asm_fprintf (stream, MOTOROLA ? asm_fprintf (stream, MOTOROLA ?
"\tmovm.l (%Ra1),%I0x%x\n" : "\tmovm.l (%Ra1),%I0x%x\n" :
"\tmoveml %Ra1@,%I0x%x\n", "\tmoveml %Ra1@,%I0x%x\n",
...@@ -832,11 +832,11 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED ...@@ -832,11 +832,11 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED
if (MOTOROLA) if (MOTOROLA)
asm_fprintf (stream, "\tmovm.l -%wd(%s),%I0x%x\n", asm_fprintf (stream, "\tmovm.l -%wd(%s),%I0x%x\n",
current_frame.offset + fsize, current_frame.offset + fsize,
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
current_frame.reg_mask); current_frame.reg_mask);
else else
asm_fprintf (stream, "\tmoveml %s@(-%wd),%I0x%x\n", asm_fprintf (stream, "\tmoveml %s@(-%wd),%I0x%x\n",
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
current_frame.offset + fsize, current_frame.offset + fsize,
current_frame.reg_mask); current_frame.reg_mask);
} }
...@@ -848,11 +848,11 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED ...@@ -848,11 +848,11 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED
if (MOTOROLA) if (MOTOROLA)
asm_fprintf (stream, "\tmovm.l -%wd(%s,%Ra1.l),%I0x%x\n", asm_fprintf (stream, "\tmovm.l -%wd(%s,%Ra1.l),%I0x%x\n",
current_frame.offset + fsize, current_frame.offset + fsize,
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
current_frame.reg_mask); current_frame.reg_mask);
else else
asm_fprintf (stream, "\tmoveml %s@(-%wd,%Ra1:l),%I0x%x\n", asm_fprintf (stream, "\tmoveml %s@(-%wd,%Ra1:l),%I0x%x\n",
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
current_frame.offset + fsize, current_frame.offset + fsize,
current_frame.reg_mask); current_frame.reg_mask);
} }
...@@ -868,11 +868,11 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED ...@@ -868,11 +868,11 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED
if (MOTOROLA) if (MOTOROLA)
asm_fprintf (stream, "\tmovm.l -%wd(%s),%I0x%x\n", asm_fprintf (stream, "\tmovm.l -%wd(%s),%I0x%x\n",
current_frame.offset + fsize, current_frame.offset + fsize,
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
current_frame.reg_mask); current_frame.reg_mask);
else else
asm_fprintf (stream, "\tmoveml %s@(-%wd),%I0x%x\n", asm_fprintf (stream, "\tmoveml %s@(-%wd),%I0x%x\n",
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
current_frame.offset + fsize, current_frame.offset + fsize,
current_frame.reg_mask); current_frame.reg_mask);
} }
...@@ -885,11 +885,11 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED ...@@ -885,11 +885,11 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED
if (MOTOROLA) if (MOTOROLA)
asm_fprintf (stream, "\tfmovm -%wd(%s,%Ra1.l),%I0x%x\n", asm_fprintf (stream, "\tfmovm -%wd(%s,%Ra1.l),%I0x%x\n",
current_frame.foffset + fsize, current_frame.foffset + fsize,
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
current_frame.fpu_rev_mask); current_frame.fpu_rev_mask);
else else
asm_fprintf (stream, "\tfmovem %s@(-%wd,%Ra1:l),%I0x%x\n", asm_fprintf (stream, "\tfmovem %s@(-%wd,%Ra1:l),%I0x%x\n",
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
current_frame.foffset + fsize, current_frame.foffset + fsize,
current_frame.fpu_rev_mask); current_frame.fpu_rev_mask);
} }
...@@ -907,18 +907,17 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED ...@@ -907,18 +907,17 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED
if (MOTOROLA) if (MOTOROLA)
asm_fprintf (stream, "\tfmovm -%wd(%s),%I0x%x\n", asm_fprintf (stream, "\tfmovm -%wd(%s),%I0x%x\n",
current_frame.foffset + fsize, current_frame.foffset + fsize,
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
current_frame.fpu_rev_mask); current_frame.fpu_rev_mask);
else else
asm_fprintf (stream, "\tfmovem %s@(-%wd),%I0x%x\n", asm_fprintf (stream, "\tfmovem %s@(-%wd),%I0x%x\n",
reg_names[FRAME_POINTER_REGNUM], M68K_REGNAME(FRAME_POINTER_REGNUM),
current_frame.foffset + fsize, current_frame.foffset + fsize,
current_frame.fpu_rev_mask); current_frame.fpu_rev_mask);
} }
} }
if (frame_pointer_needed) if (frame_pointer_needed)
fprintf (stream, "\tunlk %s\n", fprintf (stream, "\tunlk %s\n", M68K_REGNAME(FRAME_POINTER_REGNUM));
reg_names[FRAME_POINTER_REGNUM]);
else if (fsize_with_regs) else if (fsize_with_regs)
{ {
if (fsize_with_regs <= 8) if (fsize_with_regs <= 8)
...@@ -2716,9 +2715,9 @@ print_operand (FILE *file, rtx op, int letter) ...@@ -2716,9 +2715,9 @@ print_operand (FILE *file, rtx op, int letter)
if (letter == 'R') if (letter == 'R')
/* Print out the second register name of a register pair. /* Print out the second register name of a register pair.
I.e., R (6) => 7. */ I.e., R (6) => 7. */
fputs (reg_names[REGNO (op) + 1], file); fputs (M68K_REGNAME(REGNO (op) + 1), file);
else else
fputs (reg_names[REGNO (op)], file); fputs (M68K_REGNAME(REGNO (op)), file);
} }
else if (GET_CODE (op) == MEM) else if (GET_CODE (op) == MEM)
{ {
...@@ -2816,15 +2815,15 @@ print_operand_address (FILE *file, rtx addr) ...@@ -2816,15 +2815,15 @@ print_operand_address (FILE *file, rtx addr)
switch (GET_CODE (addr)) switch (GET_CODE (addr))
{ {
case REG: case REG:
fprintf (file, MOTOROLA ? "(%s)" : "%s@", reg_names[REGNO (addr)]); fprintf (file, MOTOROLA ? "(%s)" : "%s@", M68K_REGNAME(REGNO (addr)));
break; break;
case PRE_DEC: case PRE_DEC:
fprintf (file, MOTOROLA ? "-(%s)" : "%s@-", fprintf (file, MOTOROLA ? "-(%s)" : "%s@-",
reg_names[REGNO (XEXP (addr, 0))]); M68K_REGNAME(REGNO (XEXP (addr, 0))));
break; break;
case POST_INC: case POST_INC:
fprintf (file, MOTOROLA ? "(%s)+" : "%s@+", fprintf (file, MOTOROLA ? "(%s)+" : "%s@+",
reg_names[REGNO (XEXP (addr, 0))]); M68K_REGNAME(REGNO (XEXP (addr, 0))));
break; break;
case PLUS: case PLUS:
reg1 = reg2 = ireg = breg = offset = 0; reg1 = reg2 = ireg = breg = offset = 0;
...@@ -2933,14 +2932,14 @@ print_operand_address (FILE *file, rtx addr) ...@@ -2933,14 +2932,14 @@ print_operand_address (FILE *file, rtx addr)
{ {
ASM_OUTPUT_CASE_FETCH (file, ASM_OUTPUT_CASE_FETCH (file,
CODE_LABEL_NUMBER (XEXP (addr, 0)), CODE_LABEL_NUMBER (XEXP (addr, 0)),
reg_names[REGNO (XEXP (ireg, 0))]); M68K_REGNAME(REGNO (XEXP (ireg, 0))));
fprintf (file, "w"); fprintf (file, "w");
} }
else else
{ {
ASM_OUTPUT_CASE_FETCH (file, ASM_OUTPUT_CASE_FETCH (file,
CODE_LABEL_NUMBER (XEXP (addr, 0)), CODE_LABEL_NUMBER (XEXP (addr, 0)),
reg_names[REGNO (ireg)]); M68K_REGNAME(REGNO (ireg)));
fprintf (file, "l"); fprintf (file, "l");
} }
if (scale != 1) if (scale != 1)
...@@ -2953,7 +2952,7 @@ print_operand_address (FILE *file, rtx addr) ...@@ -2953,7 +2952,7 @@ print_operand_address (FILE *file, rtx addr)
{ {
ASM_OUTPUT_CASE_FETCH (file, ASM_OUTPUT_CASE_FETCH (file,
CODE_LABEL_NUMBER (XEXP (addr, 0)), CODE_LABEL_NUMBER (XEXP (addr, 0)),
reg_names[REGNO (breg)]); M68K_REGNAME(REGNO (breg)));
fprintf (file, "l)"); fprintf (file, "l)");
break; break;
} }
...@@ -2980,13 +2979,13 @@ print_operand_address (FILE *file, rtx addr) ...@@ -2980,13 +2979,13 @@ print_operand_address (FILE *file, rtx addr)
fprintf (file, ".w"); fprintf (file, ".w");
} }
} }
fprintf (file, "(%s", reg_names[REGNO (breg)]); fprintf (file, "(%s", M68K_REGNAME(REGNO (breg)));
if (ireg != 0) if (ireg != 0)
putc (',', file); putc (',', file);
} }
else /* !MOTOROLA */ else /* !MOTOROLA */
{ {
fprintf (file, "%s@(", reg_names[REGNO (breg)]); fprintf (file, "%s@(", M68K_REGNAME(REGNO (breg)));
if (addr != 0) if (addr != 0)
{ {
output_addr_const (file, addr); output_addr_const (file, addr);
...@@ -3011,10 +3010,10 @@ print_operand_address (FILE *file, rtx addr) ...@@ -3011,10 +3010,10 @@ print_operand_address (FILE *file, rtx addr)
} }
if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND)
fprintf (file, MOTOROLA ? "%s.w" : "%s:w", fprintf (file, MOTOROLA ? "%s.w" : "%s:w",
reg_names[REGNO (XEXP (ireg, 0))]); M68K_REGNAME(REGNO (XEXP (ireg, 0))));
else if (ireg != 0) else if (ireg != 0)
fprintf (file, MOTOROLA ? "%s.l" : "%s:l", fprintf (file, MOTOROLA ? "%s.l" : "%s:l",
reg_names[REGNO (ireg)]); M68K_REGNAME(REGNO (ireg)));
if (scale != 1) if (scale != 1)
fprintf (file, MOTOROLA ? "*%d" : ":%d", scale); fprintf (file, MOTOROLA ? "*%d" : ":%d", scale);
putc (')', file); putc (')', file);
...@@ -3025,7 +3024,7 @@ print_operand_address (FILE *file, rtx addr) ...@@ -3025,7 +3024,7 @@ print_operand_address (FILE *file, rtx addr)
{ {
ASM_OUTPUT_CASE_FETCH (file, ASM_OUTPUT_CASE_FETCH (file,
CODE_LABEL_NUMBER (XEXP (addr, 0)), CODE_LABEL_NUMBER (XEXP (addr, 0)),
reg_names[REGNO (reg1)]); M68K_REGNAME(REGNO (reg1)));
fprintf (file, "l)"); fprintf (file, "l)");
break; break;
} }
......
/* Definitions of target machine for GNU compiler. /* Definitions of target machine for GCC for Motorola 680x0/ColdFire.
Sun 68000/68020 version.
Copyright (C) 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, 1999, Copyright (C) 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
......
...@@ -78,18 +78,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -78,18 +78,6 @@ Boston, MA 02111-1307, USA. */
return "jmp %%pc@(2,%0:w)"; \ return "jmp %%pc@(2,%0:w)"; \
} while (0) } while (0)
/* How to refer to registers in assembler output.
This sequence is indexed by compiler's hard-register-number.
Motorola format uses different register names than defined
in m68k.h. */
#undef REGISTER_NAMES
#define REGISTER_NAMES \
{"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \
"%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \
"%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", "argptr" }
/* This is how to output an assembler line that says to advance the /* This is how to output an assembler line that says to advance the
location counter to a multiple of 2**LOG bytes. */ location counter to a multiple of 2**LOG bytes. */
......
...@@ -175,19 +175,6 @@ while (0) ...@@ -175,19 +175,6 @@ while (0)
#define ASM_COMMENT_START "|" #define ASM_COMMENT_START "|"
/* How to refer to registers in assembler output.
This sequence is indexed by compiler's hard-register-number.
Motorola format uses different register names than defined in m68k.h.
We also take this chance to convert 'a6' to 'fp' */
#undef REGISTER_NAMES
#define REGISTER_NAMES \
{"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \
"%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp", \
"%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", "argptr" }
/* Currently, JUMP_TABLES_IN_TEXT_SECTION must be defined in order to /* Currently, JUMP_TABLES_IN_TEXT_SECTION must be defined in order to
keep switch tables in the text section. */ keep switch tables in the text section. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment