From: Richard Stallman Date: Tue, 2 Mar 1993 18:07:56 +0000 (+0000) Subject: (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Use SIZE instead of ROUNDED. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=24e3324a7f31b2d6bc87a5501edfde69605dfb5b;p=gcc.git (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Use SIZE instead of ROUNDED. (ASM_OUTPUT_CASE_LABEL): Always use `swbeg' syntax to output switch table (m68k.md depends on this to happen). (LEGITIMATE_PIC_OPERAND_P): Treat a symbol_ref rtx with SYMBOL_REF_FLAG set a valid PIC operand. (OVERRIDE_OPTIONS): Turn off function cse when doing pic. From-SVN: r3593 --- diff --git a/gcc/config/m68k/m68kv4.h b/gcc/config/m68k/m68kv4.h index 81f3726100a..6f3e573df0c 100644 --- a/gcc/config/m68k/m68kv4.h +++ b/gcc/config/m68k/m68kv4.h @@ -234,3 +234,41 @@ do { \ } while (0) int switch_table_difference_label_flag; + +#undef ASM_OUTPUT_COMMON +#undef ASM_OUTPUT_LOCAL +#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ +( fputs (".comm ", (FILE)), \ + assemble_name ((FILE), (NAME)), \ + fprintf ((FILE), ",%u\n", (SIZE))) + +#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ +( fputs (".lcomm ", (FILE)), \ + assemble_name ((FILE), (NAME)), \ + fprintf ((FILE), ",%u\n", (SIZE))) + +/* Override the definition in svr4.h. In m68k svr4, using swbeg is the + standard way to do switch table. */ +#undef ASM_OUTPUT_BEFORE_CASE_LABEL +#define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \ + fprintf ((FILE), "\t%s &%d\n", SWBEG_ASM_OP, XVECLEN (PATTERN (TABLE), 1)); + +/* In m68k svr4, a symbol_ref rtx can be a valid PIC operand if it is an + operand of a function call. */ +#undef LEGITIMATE_PIC_OPERAND_P +#define LEGITIMATE_PIC_OPERAND_P(X) \ + (! symbolic_operand (X, VOIDmode) \ + || ((GET_CODE(X) == SYMBOL_REF) && SYMBOL_REF_FLAG(X))) + +/* Turn off function cse if we are doing PIC. We always want function call + to be done as `bsr foo@PLTPC', so it will force the assembler to create + the PLT entry for `foo'. Doing function cse will cause the address of `foo' + to be loaded into a register, which is exactly what we want to avoid when + we are doing PIC on svr4 m68k. */ +#undef OVERRIDE_OPTIONS +#define OVERRIDE_OPTIONS \ +{ \ + if (flag_pic) flag_no_function_cse = 1; \ + if (! TARGET_68020 && flag_pic == 2) \ + error("-fPIC is not currently supported on the 68000 or 68010\n"); \ +}