diff options
Diffstat (limited to 'gcc/config/m88k')
-rw-r--r-- | gcc/config/m88k/m88k.c | 25 | ||||
-rw-r--r-- | gcc/config/m88k/m88k.h | 37 |
2 files changed, 29 insertions, 33 deletions
diff --git a/gcc/config/m88k/m88k.c b/gcc/config/m88k/m88k.c index fde0d14a2a1..44ca220c4e1 100644 --- a/gcc/config/m88k/m88k.c +++ b/gcc/config/m88k/m88k.c @@ -23,6 +23,8 @@ Boston, MA 02111-1307, USA. */ #include "config.h" #include "system.h" +#include "coretypes.h" +#include "tm.h" #include "rtl.h" #include "regs.h" #include "hard-reg-set.h" @@ -74,6 +76,9 @@ static void m88k_svr3_asm_out_destructor PARAMS ((rtx, int)); static void m88k_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT)); static int m88k_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static void m88k_encode_section_info PARAMS ((tree, int)); +#ifdef AS_BUG_DOT_LABELS +static void m88k_internal_label PARAMS ((FILE *, const char *, unsigned long)); +#endif /* Initialize the GCC target structure. */ #undef TARGET_ASM_BYTE_OP @@ -101,6 +106,10 @@ static void m88k_encode_section_info PARAMS ((tree, int)); #undef TARGET_ENCODE_SECTION_INFO #define TARGET_ENCODE_SECTION_INFO m88k_encode_section_info +#ifdef AS_BUG_DOT_LABELS +#undef TARGET_ASM_INTERNAL_LABEL +#define TARGET_ASM_INTERNAL_LABEL m88k_internal_label +#endif struct gcc_target targetm = TARGET_INITIALIZER; @@ -892,7 +901,9 @@ output_call (operands, addr) jump = XVECEXP (final_sequence, 0, 1); if (GET_CODE (jump) == JUMP_INSN) { +#ifndef USE_GAS rtx low, high; +#endif const char *last; rtx dest = XEXP (SET_SRC (PATTERN (jump)), 0); int delta = 4 * (INSN_ADDRESSES (INSN_UID (dest)) @@ -1714,7 +1725,7 @@ void output_label (label_number) int label_number; { - ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", label_number); + (*targetm.asm_out.internal_label) (asm_out_file, "L", label_number); } /* Generate the assembly code for function entry. @@ -3339,3 +3350,15 @@ m88k_encode_section_info (decl, first) SYMBOL_REF_FLAG (XEXP (TREE_CST_RTL (decl), 0)) = 1; } } + +#ifdef AS_BUG_DOT_LABELS /* The assembler requires a declaration of local. */ +static void +m88k_internal_label (stream, prefix, labelno) + FILE *stream; + const char *prefix; + unsigned long labelno; +{ + fprintf (stream, TARGET_SVR4 ? ".%s%lu:\n%s.%s%lu\n" : "@%s%ld:\n", + prefix, labelno, INTERNAL_ASM_OP, prefix, labelno); +} +#endif diff --git a/gcc/config/m88k/m88k.h b/gcc/config/m88k/m88k.h index 659f5fbe801..c702094f423 100644 --- a/gcc/config/m88k/m88k.h +++ b/gcc/config/m88k/m88k.h @@ -1104,7 +1104,7 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS, fprintf (FILE, "\tor\t %s,%s,0\n", reg_names[11], reg_names[1]); \ /* Locate this block; transfer to the next instruction. */ \ fprintf (FILE, "\tbsr\t %s\n", &buf[1]); \ - ASM_OUTPUT_INTERNAL_LABEL (FILE, "LTRMP", labelno); \ + (*targetm.asm_out.internal_label) (FILE, "LTRMP", labelno); \ /* Save r10; use it as the relative pointer; restore r1. */ \ fprintf (FILE, "\tst\t %s,%s,24\n", reg_names[10], reg_names[1]); \ fprintf (FILE, "\tor\t %s,%s,0\n", reg_names[10], reg_names[1]); \ @@ -1155,12 +1155,6 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS, #define SELECT_CC_MODE(OP,X,Y) CCmode -/* #define HAVE_POST_INCREMENT 0 */ -/* #define HAVE_POST_DECREMENT 0 */ - -/* #define HAVE_PRE_DECREMENT 0 */ -/* #define HAVE_PRE_INCREMENT 0 */ - /* Recognize any constant value that is a valid address. When PIC, we do not accept an address that would require a scratch reg to load into a register. */ @@ -1877,25 +1871,11 @@ do { \ fputs (NAME, FILE); \ } -/* This is how to output an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - For V.4, labels use `.' rather than `@'. */ - -#undef ASM_OUTPUT_INTERNAL_LABEL -#ifdef AS_BUG_DOT_LABELS /* The assembler requires a declaration of local. */ -#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, TARGET_SVR4 ? ".%s%d:\n%s.%s%d\n" : "@%s%d:\n", \ - PREFIX, NUM, INTERNAL_ASM_OP, PREFIX, NUM) -#else -#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, TARGET_SVR4 ? ".%s%d:\n" : "@%s%d:\n", PREFIX, NUM) -#endif /* AS_BUG_DOT_LABELS */ - /* This is how to store into the string LABEL the symbol_ref name of an internal numbered label where PREFIX is the class of label and NUM is the number within the class. This is suitable for output with `assemble_name'. This must agree - with ASM_OUTPUT_INTERNAL_LABEL above, except for being prefixed + with (*targetm.asm_out.internal_label) above, except for being prefixed with an `*'. */ #undef ASM_GENERATE_INTERNAL_LABEL @@ -1917,7 +1897,7 @@ do { \ readonly_data_section (); \ ASM_OUTPUT_ALIGN (FILE, 2); \ } \ - ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); \ + (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM); \ } while (0) /* Epilogue for case labels. This jump instruction is called by casesi @@ -1992,13 +1972,6 @@ do { \ assemble_name ((FILE), (NAME)), \ fprintf ((FILE), ",%u,%d\n", (SIZE) ? (SIZE) : 1, (SIZE) <= 4 ? 4 : 8)) -/* Store in OUTPUT a string (made with alloca) containing - an assembler-name for a local static variable named NAME. - LABELNO is an integer which is different for each call. */ -#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ -( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ - sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) - /* This is how to output an insn to push a register on the stack. It need not be very fast code. */ #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ @@ -2030,10 +2003,10 @@ do { \ #define OCS_END_PREFIX "Lte" #define PUT_OCS_FUNCTION_START(FILE) \ - { ASM_OUTPUT_INTERNAL_LABEL (FILE, OCS_START_PREFIX, m88k_function_number); } + { (*targetm.asm_out.internal_label) (FILE, OCS_START_PREFIX, m88k_function_number); } #define PUT_OCS_FUNCTION_END(FILE) \ - { ASM_OUTPUT_INTERNAL_LABEL (FILE, OCS_END_PREFIX, m88k_function_number); } + { (*targetm.asm_out.internal_label) (FILE, OCS_END_PREFIX, m88k_function_number); } /* Macros for debug information */ #define DEBUGGER_AUTO_OFFSET(X) \ |