diff options
author | Richard Sandiford <rsandifo@redhat.com> | 2001-12-17 15:05:40 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2001-12-17 15:05:40 +0000 |
commit | 301d03af8a3cbf51e79ff35c1aa71a6f353709c5 (patch) | |
tree | db00089740b52986d77e25864271a24f731e7688 /gcc/config/m68k | |
parent | 00a8c0b430ad9ed836ab88fba25ef2acf16d3a0d (diff) | |
download | gcc-301d03af8a3cbf51e79ff35c1aa71a6f353709c5.zip gcc-301d03af8a3cbf51e79ff35c1aa71a6f353709c5.tar.gz gcc-301d03af8a3cbf51e79ff35c1aa71a6f353709c5.tar.bz2 |
target.h (asm_out.byte_op, [...]): New fields.
* target.h (asm_out.byte_op, asm_out.aligned_op, asm_out.unaligned_op,
asm_out.integer): New fields.
* target-def.h (TARGET_ASM_BYTE_OP, TARGET_ASM_ALIGNED_[HSDT]I_OP,
TARGET_ASM_UNALIGNED_[HSDT]I_OP, TARGET_ASM_INTEGER): New initialisers.
(TARGET_ASM_ALIGNED_INT_OP, TARGET_ASM_UNALIGNED_INT_OP): Collect
the individual initialisers together.
(TARGET_ASM_OUT): Add the new initialisers.
* output.h (assemble_integer): Return bool.
(integer_asm_op): Declare.
(default_assemble_integer): Declare.
(assemble_aligned_integer): New interface to assemble_integer.
* varasm.c (integer_asm_op): New function to select pseudo-op.
(default_assemble_integer): Default implementation of asm_out.integer.
(assemble_integer): Use the new target hook. Split objects into
words or bytes if the target hook fails. Return bool.
* doc/tm.texi (ASM_OUTPUT_CHAR, ASM_OUTPUT_BYTE, ASM_OUTPUT_SHORT,
ASM_OUTPUT_INT, ASM_OUTPUT_DOUBLE_INT, ASM_OUTPUT_QUADRUPLE_INT,
UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP,
UNALIGNED_DOUBLE_INT_ASM_OP): Undocument.
Document new target hooks.
* defaults.h (ASM_OUTPUT_ADDR_VEC_ELT): Use integer_asm_op.
* dwarf2asm.c (unaligned_integer_asm_op): Remove.
(dw2_assemble_integer): New.
(dw2_asm_output_data, dw2_asm_output_delta, dw2_asm_output_offset,
dw2_asm_output_pcrel, dw2_asm_output_addr, dw2_asm_output_addr_rtx,
dw2_asm_output_encoded_addr_rtx): Use it.
(dw2_asm_output_nstring): Use assemble_integer for the null terminator.
(dw2_asm_output_data_uleb128, dw2_asm_output_data_sleb128): Use
integer_asm_op to get the byte pseudo-op. Use assemble_integer
if it returns NULL.
* dwarf2asm.h (dw2_assemble_integer): Declare.
* dwarfout.c: Include dwarf2asm.h. Use dwarf2 functions for the
default implementation of most macros.
(output_unsigned_leb128): Use dw2_asm_output_data.
(output_signed_leb128, dwarfout_source_line): Likewise.
(output_reg_number): Use dw2_assemble_integer.
(generate_macinfo_entry): Separate the type and offset arguments.
Use assemble_integer to write the value.
(dwarfout_start_source_file): Update generate_macinfo_entry usage.
(dwarfout_end_source_file, dwarfout_define, dwarfout_undef): Likewise.
* final.c (output_addr_const): Don't put brackets round a subtracted
symbol value or ".".
* halfpic.c (half_pic_finish): Use assemble_aligned_integer.
* config/1750a/1750a.c (assemble_integer_1750a): New,
* config/alpha/alpha.h (literal_section): Avoid ASM_OUTPUT_INT.
* config/arc/arc.c (arc_assemble_integer): New.
* config/arc/arc.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
* config/arm/arm.c (arm_poke_function_name): Likewise.
(arm_assemble_integer): New, extracted from...
* config/arm/arm.h (OUTPUT_INT_ADDR_CONST): ...here, now removed.
(ARM_TRAMPOLINE_TEMPLATE, ARM_FUNCTION_PROFILER): Avoid ASM_OUTPUT_INT.
(ARM_FUNCTION_PROFILER): Likewise.
* config/avr/avr-protos.h (asm_output_byte): Remove.
(asm_output_char, asm_output_short): Remove.
* config/avr/avr.c (avr_assemble_integer): New.
(asm_output_byte, asm_output_char, asm_output_short): Remove.
* config/clipper/clipper.h (ASM_LONG): Remove.
* config/dsp16xx/dsp16xx-protos.h (asm_output_long): Remove.
* config/dsp16xx/dsp16xx.c (asm_output_long): Remove.
* config/elxsi/elxsi.c (elxsi_assemble_integer): New.
* config/i370/i370.c (i370_hlasm_assemble_integer): New.
* config/i370/i370.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_SHORT.
(ASM_BYTE, ASM_SHORT, ASM_LONG): Delete.
* config/i386/att.h, (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
* config/i386/linux.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Use
ASM_LONG instead of UNALIGNED_INT_ASM_OP.
* config/i386/sco5.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise.
(ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
* config/i386/sysv4.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Use
ASM_LONG instead of UNALIGNED_INT_ASM_OP.
* config/i860/fx2800.h (ASM_FILE_END): Avoid ASM_LONG.
* config/i860/i860.c (i860_output_function_epilogue): Likewise.
* config/i860/i860.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
(ASM_SHORT, ASM_LONG): Undefine.
* config/i860/paragon.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
* config/i860/sysv3.h (ASM_OUTPUT_ASCII): Likewise.
* config/i960/i960.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
* config/ia64/ia64.c (ia64_assemble_integer): New.
* config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): Use integer_asm_op.
(ASM_OUTPUT_DWARF_PCREL): Likewise.
* config/m68hc11/m68hc11.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_VEC_ELT): Avoid ASM_LONG.
(ASM_SHORT, ASM_LONG): Remove.
* config/m68k/m68k.h (INT_OP_GROUP): New macro.
(INT_OP_STANDARD, INT_OP_DOT_WORD, INT_OP_NO_DOT, INT_OP_DC): New
macros, the allowed values for INT_OP_GROUP.
* config/m68k/amix.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP
* config/m68k/atari.h (ASM_OUTPUT_ASCII): Likewise
* config/m68k/m68kelf.h (ASM_OUTPUT_ASCII): Likewise
* config/m68k/auxas.h (BYTE_ASM_OP, WORD_ASM_OP, LONG_ASM_OP): Remove.
(INT_OP_GROUP): Define to INT_OP_NO_DOT.
* config/m68k/dpx2.h (ASM_LONG): Undefine.
(INT_OP_GROUP): Define to INT_OP_DC.
* config/m68k/dpx2g.h (ASM_LONG): Undefine.
* config/m68k/hp320.h (INT_OP_GROUP): Define to INT_OP_NO_DOT.
* config/m68k/lynx.h (ASM_LONG): Undefine.
* config/m68k/dpx2g.h (ASM_LONG): Undefine.
* config/m68k/m68kelf.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
* config/m68k/m68kv4.h (ASM_OUTPUT_ASCII): Likewise.
(TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_*.
* config/m68k/mot3300.h (INT_OP_GROUP): Define to INT_OP_STANDARD
for GAS and INT_OP_NO_DOT otherwise.
(ASM_CHAR, ASM_BYTE, ASM_SHORT, ASM_LONG): Remove.
(ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Avoid ASM_LONG.
(ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
* config/m68k/sgs.h (BYTE_ASM_OP, WORD_ASM_OP, LONG_ASM_OP): Remove.
(INT_OP_GROUP): Define to INT_OP_STANDARD.
(ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Avoid LONG_ASM_OP.
(ASM_OUTPUT_ASCII): Avoid BYTE_ASM_OP.
* config/m68k/tower-as.h (ASM_LONG): Remove.
(INT_OP_GROUP): Define to INT_OP_NO_DOT.
* config/m88k/m88k.c (output_tdesc): Avoid ASM_LONG.
* config/m88k/m88k.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
(ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Avoid ASM_LONG.
* config/mips/iris5.h (TARGET_IRIX5): Define.
* config/mips/mips.c (mips_assemble_integer): New.
* config/mips/sni-svr4.h (ASM_LONG): Undefine.
* config/mmix/mmix-protos.h (mmix_asm_output_double_int): Remove.
* config/mmix/mmix.c (mmix_assemble_integer): New.
(mmix_asm_output_double_int): Remove.
(mmix_print_operand): Call mmix_output_octa directly.
* config/mmix/mmix.h (ASM_LONG): Remove.
* config/ns32k/ns32k.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
* config/pa/pa.c (pa_assemble_integer): New.
(pa_override_options): Only use aligned DI ops on 64-bit targets.
Only use the unaligned ops if TARGET_GAS.
* config/pdp11/pdp11.c (pdp11_assemble_integer): New.
* config/pdp11/pdp11.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_SHORT.
* config/pj/pj.h (ASM_LONG): Undefine.
* config/rs6000/linux64.h (RELOCATABLE_NEEDS_FIXUP): Undefine.
* config/rs6000/rs6000.c (rs6000_assemble_integer): New, mostly
extracted from ASM_OUTPUT_INT in sysv4.h. Use in_text_section()
and in_toc_section() rather than the in_section variable.
(rs6000_override_options): Only use DI ops when TARGET_POWERPC64.
* config/rs6000/sysv4.h (TOC_SECTION_FUNCTION): Add in_toc_section().
(RELOCATABLE_NEEDS_FIXUP): Define.
* config/rs6000/xcoff.h (DOUBLE_INT_ASM_OP): Change space to tab.
* config/s390/linux.h (ASM_SHORT, ASM_LONG, ASM_QUAD): Remove.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Use integer_asm_op
to get the word directive.
(ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
* config/s390/s390.c (s390_assemble_integer): New.
* config/s390/s390.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Use
integer_asm_op to get the word directive.
* config/sparc/sol2.h (ASM_SHORT, ASM_LONG): Remove.
* config/sparc/sparc-protos.h (output_double_int): Remove.
* config/sparc/sparc.c (output_double_int): Move to...
(sparc_assemble_integer): ...this new function.
(sparc_override_options): Only use .uaxword if TARGET_ARCH64.
* config/sparc/sparc.h (ASM_SHORT, ASM_LONG, ASM_LONGLONG): Remove.
* config/sparc/sysv4.h (ASM_LONG): Remove.
(ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Avoid
ASM_LONG.
* config/vax/vax.h (TRAMPOLINE_TEMPLATE): Use assemble_aligned_integer.
* config/we32k/we32k.h (TRAMPOLINE_TEMPLATE): Likewise.
* config/1750a/1750a.c, config/a29k/a29k.c, config/alpha/alpha.c,
config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/c4x/c4x.c,
config/clipper/clipper.c, config/convex/convex.c, config/cris/cris.c,
config/d30v/d30v.c, config/dsp16xx/dsp16xx.c, config/elxsi/elxsi.c,
config/fr30/fr30.c, config/h8300/h8300.c, config/i370/i370.c,
config/i386/i386.c, config/i860/i860.c, config/i960/i960.c,
config/ia64/ia64.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c,
config/m68k/m68k.c, config/m88k/m88k.c, config/mips/mips.c,
config/mmix/mmix.c, config/mn10200/mn10200.c, config/mn10300/mn10300.c,
config/ns32k/ns32k.c, config/pa/pa.c, config/pdp11/pdp11.c,
config/sh/sh.c, config/sparc/sparc.c, config/stormy16/stormy16.c,
config/v850/v850.c, config/vax/vax.c, config/we32k/we32k.c
(TARGET_ASM_BYTE_OP, TARGET_ASM_ALIGNED_HI_OP,
TARGET_ASM_ALIGNED_SI_OP, TARGET_ASM_ALIGNED_DI_OP,
TARGET_ASM_UNALIGNED_HI_OP, TARGET_ASM_UNALIGNED_SI_OP,
TARGET_ASM_UNALIGNED_DI_OP, TARGET_ASM_INTEGER): Redefine as
appropriate.
* config/defaults.h, config/darwin.h, config/elfos.h, config/svr3.h,
config/1750a/1750a.h, config/a29k/a29k.h, config/alpha/alpha.h,
config/arc/arc.h, config/arm/arm.h, config/avr/avr.h, config/c4x/c4x.h,
config/clipper/clipper.h, config/convex/convex.h, config/cris/cris.h,
config/d30v/d30v.h, config/dsp16xx/dsp16xx.h, config/elxsi/elxsi.h,
config/fr30/fr30.h, config/h8300/h8300.h, config/i370/i370.h,
config/i386/bsd.h, config/i386/djgpp.h, config/i386/i386.h,
config/i386/sco5.h, config/i386/sol2.h, config/i386/sun386.h,
config/i860/i860.h, config/i960/i960.h, config/ia64/ia64.h,
config/m32r/m32r.h, config/m68hc11/m68hc11.h, config/m68k/auxas.h,
config/m68k/dpx2.h, config/m68k/hp320.h, config/m68k/m68k.h,
config/m68k/mot3300.h, config/m68k/sgs.h, config/m68k/tower-as.h,
config/m88k/m88k.h, config/mcore/mcore-elf.h, config/mcore/mcore.h,
config/mips/iris5.h, config/mips/iris6.h, config/mips/mips.h,
config/mmix/mmix.h, config/mn10200/mn10200.h, config/mn10300/mn10300.h
config/ns32k/encore.h, config/ns32k/ns32k.h, config/pa/pa-64.h,
config/pa/pa.h, config/pdp11/pdp11.h, config/pj/pj.h,
config/romp/romp.h, config/rs6000/linux64.h, config/rs6000/rs6000.h,
config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/linux.h,
config/sh/sh.h, config/sparc/linux64.h, config/sparc/sol2.h,
config/sparc/sp64-elf.h, config/sparc/sparc.h, config/sparc/sysv4.h,
config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vax.h,
config/we32k/we32k.h (ASM_OUTPUT_CHAR, ASM_OUTPUT_BYTE, ASM_BYTE_OP,
ASM_BYTE, ASM_OUTPUT_SHORT, ASM_OUTPUT_INT, ASM_OUTPUT_DOUBLE_INT,
UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP,
UNALIGNED_DOUBLE_INT_ASM_OP): Undefine, where defined.
From-SVN: r48101
Diffstat (limited to 'gcc/config/m68k')
-rw-r--r-- | gcc/config/m68k/amix.h | 4 | ||||
-rw-r--r-- | gcc/config/m68k/atari.h | 4 | ||||
-rw-r--r-- | gcc/config/m68k/auxas.h | 18 | ||||
-rw-r--r-- | gcc/config/m68k/dpx2.h | 35 | ||||
-rw-r--r-- | gcc/config/m68k/dpx2g.h | 3 | ||||
-rw-r--r-- | gcc/config/m68k/hp320.h | 31 | ||||
-rw-r--r-- | gcc/config/m68k/lynx.h | 2 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.c | 29 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.h | 34 | ||||
-rw-r--r-- | gcc/config/m68k/m68kelf.h | 4 | ||||
-rw-r--r-- | gcc/config/m68k/m68kv4.h | 18 | ||||
-rw-r--r-- | gcc/config/m68k/mot3300.h | 68 | ||||
-rw-r--r-- | gcc/config/m68k/sgs.h | 31 | ||||
-rw-r--r-- | gcc/config/m68k/tower-as.h | 32 |
14 files changed, 90 insertions, 223 deletions
diff --git a/gcc/config/m68k/amix.h b/gcc/config/m68k/amix.h index d1968c0..998240e 100644 --- a/gcc/config/m68k/amix.h +++ b/gcc/config/m68k/amix.h @@ -101,7 +101,7 @@ do { \ #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ do { \ register size_t sp = 0, limit = (LEN); \ - fprintf ((FILE), "%s", BYTE_ASM_OP); \ + fputs (integer_asm_op (1, TRUE), (FILE)); \ do { \ int ch = (PTR)[sp]; \ if (ch > ' ' && ! (ch & 0x80) && ch != '\\') \ @@ -116,7 +116,7 @@ do { \ { \ if ((sp % 10) == 0) \ { \ - fprintf ((FILE), "\n%s", BYTE_ASM_OP); \ + fprintf ((FILE), "\n%s", integer_asm_op (1, TRUE)); \ } \ else \ { \ diff --git a/gcc/config/m68k/atari.h b/gcc/config/m68k/atari.h index 322058e..12b106a 100644 --- a/gcc/config/m68k/atari.h +++ b/gcc/config/m68k/atari.h @@ -61,7 +61,7 @@ int switch_table_difference_label_flag; #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ { \ register size_t sp = 0, limit = (LEN); \ - fprintf ((FILE), "%s", BYTE_ASM_OP); \ + fputs (integer_asm_op (1, TRUE), (FILE)); \ do { \ int ch = (PTR)[sp]; \ if (ch > ' ' && ! (ch & 0x80) && ch != '\\') \ @@ -76,7 +76,7 @@ int switch_table_difference_label_flag; { \ if ((sp % 10) == 0) \ { \ - fprintf ((FILE), "\n%s", BYTE_ASM_OP); \ + fprintf ((FILE), "\n%s", integer_asm_op (1, TRUE)); \ } \ else \ { \ diff --git a/gcc/config/m68k/auxas.h b/gcc/config/m68k/auxas.h index 3f368c7..86d9853 100644 --- a/gcc/config/m68k/auxas.h +++ b/gcc/config/m68k/auxas.h @@ -38,21 +38,15 @@ Boston, MA 02111-1307, USA. */ #define NO_DOLLAR_IN_LABEL #define NO_DOT_IN_LABEL +#undef INT_OP_GROUP +#define INT_OP_GROUP INT_OP_NO_DOT + #undef TEXT_SECTION_ASM_OP #define TEXT_SECTION_ASM_OP "\ttext" #undef DATA_SECTION_ASM_OP #define DATA_SECTION_ASM_OP "\tdata\t1" -#undef BYTE_ASM_OP -#define BYTE_ASM_OP "\tbyte\t" - -#undef WORD_ASM_OP -#define WORD_ASM_OP "\tshort\t" - -#undef LONG_ASM_OP -#define LONG_ASM_OP "\tlong\t" - #undef SPACE_ASM_OP #define SPACE_ASM_OP "\tspace\t" @@ -76,12 +70,6 @@ Boston, MA 02111-1307, USA. */ #define ADDITIONAL_REGISTER_NAMES { {"%a6", 14}, {"%a7", 15} } -#undef ASM_OUTPUT_INT -#define ASM_OUTPUT_INT(FILE,VALUE) \ -( fprintf ((FILE), "%s", LONG_ASM_OP), \ - output_addr_const ((FILE), (VALUE)), \ - fprintf ((FILE), "\n")) - #undef ASM_OUTPUT_COMMON #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ ( fputs ("\tcomm\t", (FILE)), \ diff --git a/gcc/config/m68k/dpx2.h b/gcc/config/m68k/dpx2.h index 27aa342..b237929 100644 --- a/gcc/config/m68k/dpx2.h +++ b/gcc/config/m68k/dpx2.h @@ -31,6 +31,9 @@ Boston, MA 02111-1307, USA. */ #undef SELECT_RTX_SECTION #include "svr3.h" +#undef INT_OP_GROUP +#define INT_OP_GROUP INT_OP_DC + /* We use collect2 instead of ctors_section constructors. */ #undef INIT_SECTION_ASM_OP #undef FINI_SECTION_ASM_OP @@ -119,13 +122,6 @@ Boston, MA 02111-1307, USA. */ #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NA) \ do { fprintf ((FILE), "\t.file\t'%s'\n", (NA)); } while (0) -/* Assembler pseudos to introduce constants of various size. */ - -#undef ASM_BYTE_OP -#define ASM_BYTE_OP "\tdc.b\t" -#undef ASM_LONG -#define ASM_LONG "\tdc.l" - /* * we don't seem to support any of: * .globl @@ -310,31 +306,6 @@ do { long l; \ fprintf (FILE, "\tdc.l $%lx\n", l); \ } while (0) -/* This is how to output an assembler line defining an `int' constant. */ -#undef ASM_OUTPUT_INT -#define ASM_OUTPUT_INT(FILE,VALUE) \ -( fprintf (FILE, "\tdc.l "), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -/* Likewise for `char' and `short' constants. */ -#undef ASM_OUTPUT_SHORT -#define ASM_OUTPUT_SHORT(FILE,VALUE) \ -( fprintf (FILE, "\tdc.w "), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -#undef ASM_OUTPUT_CHAR -#define ASM_OUTPUT_CHAR(FILE,VALUE) \ -( fprintf (FILE, "\tdc.b "), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -/* This is how to output an assembler line for a numeric constant byte. */ -#undef ASM_OUTPUT_BYTE -#define ASM_OUTPUT_BYTE(FILE,VALUE) \ - fprintf (FILE, "\tdc.b $%x\n", (int)(VALUE)) - /* This is how to output an element of a case-vector that is absolute. (The 68000 does not use such vectors, but we must define this macro anyway.) */ diff --git a/gcc/config/m68k/dpx2g.h b/gcc/config/m68k/dpx2g.h index 812f6f7..8fa6b42 100644 --- a/gcc/config/m68k/dpx2g.h +++ b/gcc/config/m68k/dpx2g.h @@ -15,7 +15,4 @@ /* GAS does not understand .ident so don't output anything for #ident. */ #undef ASM_OUTPUT_IDENT -#undef ASM_LONG -#define ASM_LONG "\t.long" - /* end of dpx2g.h */ diff --git a/gcc/config/m68k/hp320.h b/gcc/config/m68k/hp320.h index 403e4d1..11784c7c 100644 --- a/gcc/config/m68k/hp320.h +++ b/gcc/config/m68k/hp320.h @@ -59,6 +59,9 @@ Boston, MA 02111-1307, USA. */ #include "m68k/m68k.h" +#undef INT_OP_GROUP +#define INT_OP_GROUP INT_OP_NO_DOT + /* See m68k.h. 7 means 68020 with 68881. */ #ifndef TARGET_DEFAULT @@ -164,10 +167,6 @@ Boston, MA 02111-1307, USA. */ #undef READONLY_DATA_SECTION #undef ASM_OUTPUT_DOUBLE #undef ASM_OUTPUT_FLOAT -#undef ASM_OUTPUT_INT -#undef ASM_OUTPUT_SHORT -#undef ASM_OUTPUT_CHAR -#undef ASM_OUTPUT_BYTE #undef ASM_OUTPUT_ADDR_VEC_ELT #undef ASM_OUTPUT_ADDR_DIFF_ELT #undef ASM_OUTPUT_ALIGN @@ -286,30 +285,6 @@ do { long l[3]; \ fprintf (FILE, "\tlong 0x%lx,0x%lx,0x%lx\n", l[0], l[1], l[2]); \ } while (0) -/* This is how to output an assembler line defining an `int' constant. */ - -#define ASM_OUTPUT_INT(FILE,VALUE) \ -( fprintf (FILE, "\tlong "), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -/* Likewise for `char' and `short' constants. */ - -#define ASM_OUTPUT_SHORT(FILE,VALUE) \ -( fprintf (FILE, "\tshort "), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -#define ASM_OUTPUT_CHAR(FILE,VALUE) \ -( fprintf (FILE, "\tbyte "), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -/* This is how to output an assembler line for a numeric constant byte. */ - -#define ASM_OUTPUT_BYTE(FILE,VALUE) \ - fprintf (FILE, "\tbyte 0x%x\n", (int)(VALUE)) - #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ fprintf (FILE, "\tlong L%d\n", VALUE) diff --git a/gcc/config/m68k/lynx.h b/gcc/config/m68k/lynx.h index 92bded3..31415b9 100644 --- a/gcc/config/m68k/lynx.h +++ b/gcc/config/m68k/lynx.h @@ -29,8 +29,6 @@ Boston, MA 02111-1307, USA. */ #define BSS_SECTION_ASM_OP "\t.bss" -#define ASM_LONG ".long" - #include <lynx.h> /* See m68k.h. 7 means 68020 with 68881. */ diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index f893203..228d98f 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -88,6 +88,35 @@ int m68k_align_funcs; int m68k_last_compare_had_fp_operands; /* Initialize the GCC target structure. */ + +#if INT_OP_GROUP == INT_OP_DOT_WORD +#undef TARGET_ASM_ALIGNED_HI_OP +#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t" +#endif + +#if INT_OP_GROUP == INT_OP_NO_DOT +#undef TARGET_ASM_BYTE_OP +#define TARGET_ASM_BYTE_OP "\tbyte\t" +#undef TARGET_ASM_ALIGNED_HI_OP +#define TARGET_ASM_ALIGNED_HI_OP "\tshort\t" +#undef TARGET_ASM_ALIGNED_SI_OP +#define TARGET_ASM_ALIGNED_SI_OP "\tlong\t" +#endif + +#if INT_OP_GROUP == INT_OP_DC +#undef TARGET_ASM_BYTE_OP +#define TARGET_ASM_BYTE_OP "\tdc.b\t" +#undef TARGET_ASM_ALIGNED_HI_OP +#define TARGET_ASM_ALIGNED_HI_OP "\tdc.w\t" +#undef TARGET_ASM_ALIGNED_SI_OP +#define TARGET_ASM_ALIGNED_SI_OP "\tdc.l\t" +#endif + +#undef TARGET_ASM_UNALIGNED_HI_OP +#define TARGET_ASM_UNALIGNED_HI_OP TARGET_ASM_ALIGNED_HI_OP +#undef TARGET_ASM_UNALIGNED_SI_OP +#define TARGET_ASM_UNALIGNED_SI_OP TARGET_ASM_ALIGNED_SI_OP + #undef TARGET_ASM_FUNCTION_PROLOGUE #define TARGET_ASM_FUNCTION_PROLOGUE m68k_output_function_prologue #undef TARGET_ASM_FUNCTION_EPILOGUE diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index 65a34ee..4637d81 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -25,6 +25,16 @@ Boston, MA 02111-1307, USA. */ many of the definitions that relate to assembler syntax. */ +/* Classify the groups of pseudo-ops used to assemble QI, HI and SI + quantities. */ +#define INT_OP_STANDARD 0 /* .byte, .short, .long */ +#define INT_OP_DOT_WORD 1 /* .byte, .word, .long */ +#define INT_OP_NO_DOT 2 /* byte, short, long */ +#define INT_OP_DC 3 /* dc.b, dc.w, dc.l */ + +/* Set the default */ +#define INT_OP_GROUP INT_OP_DOT_WORD + /* Names to predefine in the preprocessor for this target machine. */ /* See sun3.h, sun2.h, isi.h for different CPP_PREDEFINES. */ @@ -1816,30 +1826,6 @@ do { long l; \ fprintf (FILE, "\t.long 0x%lx\n", l); \ } while (0) -/* This is how to output an assembler line defining an `int' constant. */ - -#define ASM_OUTPUT_INT(FILE,VALUE) \ -( fprintf (FILE, "\t.long "), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -/* Likewise for `char' and `short' constants. */ - -#define ASM_OUTPUT_SHORT(FILE,VALUE) \ -( fprintf (FILE, "\t.word "), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -#define ASM_OUTPUT_CHAR(FILE,VALUE) \ -( fprintf (FILE, "\t.byte "), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -/* This is how to output an assembler line for a numeric constant byte. */ - -#define ASM_OUTPUT_BYTE(FILE,VALUE) \ - fprintf (FILE, "\t.byte 0x%x\n", (int)(VALUE)) - /* This is how to output an insn to push a register on the stack. It need not be very fast code. */ diff --git a/gcc/config/m68k/m68kelf.h b/gcc/config/m68k/m68kelf.h index ae47c19..88154fc 100644 --- a/gcc/config/m68k/m68kelf.h +++ b/gcc/config/m68k/m68kelf.h @@ -183,7 +183,7 @@ do { \ #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ do { \ register int sp = 0, ch; \ - fprintf ((FILE), "%s", BYTE_ASM_OP); \ + fputs (integer_asm_op (1, TRUE), (FILE)); \ do { \ ch = (PTR)[sp]; \ if (ch > ' ' && ! (ch & 0x80) && ch != '\\') \ @@ -198,7 +198,7 @@ do { \ { \ if ((sp % 10) == 0) \ { \ - fprintf ((FILE), "\n%s", BYTE_ASM_OP); \ + fprintf ((FILE), "\n%s", integer_asm_op (1, TRUE)); \ } \ else \ { \ diff --git a/gcc/config/m68k/m68kv4.h b/gcc/config/m68k/m68kv4.h index 7b1f0e7..d2bb108 100644 --- a/gcc/config/m68k/m68kv4.h +++ b/gcc/config/m68k/m68kv4.h @@ -217,7 +217,7 @@ do { \ #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ do { \ register size_t sp = 0, limit = (LEN); \ - fprintf ((FILE), "%s", BYTE_ASM_OP); \ + fputs (integer_asm_op (1, TRUE), (FILE)); \ do { \ int ch = (PTR)[sp]; \ if (ch > ' ' && ! (ch & 0x80) && ch != '\\') \ @@ -232,7 +232,7 @@ do { \ { \ if ((sp % 10) == 0) \ { \ - fprintf ((FILE), "\n%s", BYTE_ASM_OP); \ + fprintf ((FILE), "\n%s", integer_asm_op (1, TRUE)); \ } \ else \ { \ @@ -308,13 +308,13 @@ int switch_table_difference_label_flag; #undef TRAMPOLINE_TEMPLATE #define TRAMPOLINE_TEMPLATE(FILE) \ { \ - ASM_OUTPUT_SHORT (FILE, GEN_INT (0x227a)); \ - ASM_OUTPUT_SHORT (FILE, GEN_INT (8)); \ - ASM_OUTPUT_SHORT (FILE, GEN_INT (0x2f3a)); \ - ASM_OUTPUT_SHORT (FILE, GEN_INT (8)); \ - ASM_OUTPUT_SHORT (FILE, GEN_INT (0x4e75)); \ - ASM_OUTPUT_INT (FILE, const0_rtx); \ - ASM_OUTPUT_INT (FILE, const0_rtx); \ + assemble_aligned_integer (2, GEN_INT (0x227a)); \ + assemble_aligned_integer (2, GEN_INT (8)); \ + assemble_aligned_integer (2, GEN_INT (0x2f3a)); \ + assemble_aligned_integer (2, GEN_INT (8)); \ + assemble_aligned_integer (2, GEN_INT (0x4e75)); \ + assemble_aligned_integer (4, const0_rtx); \ + assemble_aligned_integer (4, const0_rtx); \ } /* Redefine since we are using a different trampoline */ diff --git a/gcc/config/m68k/mot3300.h b/gcc/config/m68k/mot3300.h index 1c8da7a..6801f6b 100644 --- a/gcc/config/m68k/mot3300.h +++ b/gcc/config/m68k/mot3300.h @@ -289,29 +289,12 @@ Boston, MA 02111-1307, USA. */ ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 12), \ sprintf ((OUTPUT), "%s_%%%d", (NAME), (LABELNO))) +#undef INT_OP_GROUP #ifdef USE_GAS -#undef ASM_LONG -#define ASM_LONG ".long" -#undef ASM_SHORT -#define ASM_SHORT ".short" -#undef ASM_CHAR -#define ASM_CHAR ".byte" -#undef ASM_BYTE -#define ASM_BYTE ".byte" -#undef ASM_BYTE_OP -#define ASM_BYTE_OP "\t.byte\t" +#define INT_OP_GROUP INT_OP_STANDARD #else -#undef ASM_LONG -#define ASM_LONG "long" -#undef ASM_SHORT -#define ASM_SHORT "short" -#undef ASM_CHAR -#define ASM_CHAR "byte" -#undef ASM_BYTE -#define ASM_BYTE "byte" -#undef ASM_BYTE_OP -#define ASM_BYTE_OP "\tbyte\t" -#endif /* USE_GAS */ +#define INT_OP_GROUP INT_OP_NO_DOT +#endif /* The sysV68 as doesn't know about double's and float's. */ /* This is how to output an assembler line defining a `double' constant. */ @@ -320,14 +303,16 @@ Boston, MA 02111-1307, USA. */ #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ do { long l[2]; \ REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ - fprintf (FILE, "\t%s 0x%lx,0x%lx\n", ASM_LONG, l[0], l[1]); \ + fprintf ((FILE), "%s0x%lx,0x%lx\n", \ + integer_asm_op (4, TRUE), l[0], l[1]); \ } while (0) #undef ASM_OUTPUT_LONG_DOUBLE #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \ do { long l[3]; \ REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \ - fprintf (FILE, "\t%s 0x%lx,0x%lx,0x%lx\n", ASM_LONG, l[0], l[1], l[2]); \ + fprintf (FILE, "%s 0x%lx,0x%lx,0x%lx\n", \ + integer_asm_op (4, TRUE), l[0], l[1], l[2]); \ } while (0) /* This is how to output an assembler line defining a `float' constant. */ @@ -336,37 +321,9 @@ do { long l[3]; \ #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ do { long l; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ - fprintf ((FILE), "\t%s 0x%lx\n", ASM_LONG, l); \ + assemble_aligned_integer (4, GEN_INT (l)); \ } while (0) -/* This is how to output an assembler line defining an `int' constant. */ - -#undef ASM_OUTPUT_INT -#define ASM_OUTPUT_INT(FILE,VALUE) \ -( fprintf (FILE, "\t%s ", ASM_LONG), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -/* Likewise for `char' and `short' constants. */ - -#undef ASM_OUTPUT_SHORT -#define ASM_OUTPUT_SHORT(FILE,VALUE) \ -( fprintf (FILE, "\t%s ", ASM_SHORT), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -#undef ASM_OUTPUT_CHAR -#define ASM_OUTPUT_CHAR(FILE,VALUE) \ -( fprintf (FILE, "\t%s ", ASM_CHAR), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -/* This is how to output an assembler line for a numeric constant byte. */ - -#undef ASM_OUTPUT_BYTE -#define ASM_OUTPUT_BYTE(FILE,VALUE) \ - fprintf (FILE, "\t%s 0x%x\n", ASM_BYTE, (int)(VALUE)) - /* This is how to output an assembler line that says to advance the location counter to a multiple of 2**LOG bytes. */ @@ -419,7 +376,7 @@ do { long l; \ #undef ASM_OUTPUT_ASCII #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ do { register size_t sp = 0, lp = 0, limit = (LEN); \ - fprintf ((FILE), "%s", ASM_BYTE_OP); \ + fputs (integer_asm_op (1, TRUE), (FILE)); \ loop: \ if ((PTR)[sp] > ' ' && ! ((PTR)[sp] & 0x80) && (PTR)[sp] != '\\') \ { lp += 3; \ @@ -490,13 +447,14 @@ do { long l; \ #undef ASM_OUTPUT_ADDR_VEC_ELT #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - asm_fprintf (FILE, "\t%s %LL%d\n", ASM_LONG, (VALUE)) + asm_fprintf (FILE, "%s%LL%d\n", integer_asm_op (4, TRUE), (VALUE)) /* This is how to output an element of a case-vector that is relative. */ #undef ASM_OUTPUT_ADDR_DIFF_ELT #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - asm_fprintf (FILE, "\t%s %LL%d-%LL%d\n", ASM_SHORT, (VALUE), (REL)) + asm_fprintf (FILE, "\t%s %LL%d-%LL%d\n", \ + integer_asm_op (2, TRUE), (VALUE), (REL)) #ifndef USE_GAS diff --git a/gcc/config/m68k/sgs.h b/gcc/config/m68k/sgs.h index 5e4c212..7f44b26 100644 --- a/gcc/config/m68k/sgs.h +++ b/gcc/config/m68k/sgs.h @@ -30,11 +30,11 @@ Boston, MA 02111-1307, USA. */ #include "m68k/m68k.h" +#undef INT_OP_GROUP +#define INT_OP_GROUP INT_OP_STANDARD + /* SGS specific assembler pseudo ops. */ -#define BYTE_ASM_OP "\t.byte " -#define WORD_ASM_OP "\t.short " -#define LONG_ASM_OP "\t.long " #define SPACE_ASM_OP "\t.space " #define ALIGN_ASM_OP "\t.align " #undef GLOBAL_ASM_OP @@ -42,9 +42,6 @@ Boston, MA 02111-1307, USA. */ #define SWBEG_ASM_OP "\t.swbeg " #define SET_ASM_OP "\t.set " -#define UNALIGNED_SHORT_ASM_OP "\t.short " /* Used in dwarfout.c */ -#define UNALIGNED_INT_ASM_OP "\t.long " /* Used in dwarfout.c */ - #define ASM_PN_FORMAT "%s_%d" /* Format for private names */ /* Here are four prefixes that are used by asm_fprintf to @@ -105,18 +102,12 @@ Boston, MA 02111-1307, USA. */ /* This is how to output an assembler line defining an `int' constant. */ /* The SGS assembler doesn't understand ".word". */ -#undef ASM_OUTPUT_SHORT -#define ASM_OUTPUT_SHORT(FILE,VALUE) \ -( fprintf ((FILE), "%s", WORD_ASM_OP), \ - output_addr_const ((FILE), (VALUE)), \ - fprintf ((FILE), "\n")) - #undef ASM_OUTPUT_LONG_DOUBLE #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \ do { long l[3]; \ REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \ - fprintf ((FILE), "%s0x%lx,0x%lx,0x%lx\n", LONG_ASM_OP, \ - l[0], l[1], l[2]); \ + fprintf ((FILE), "%s0x%lx,0x%lx,0x%lx\n", \ + integer_asm_op (4, TRUE), l[0], l[1], l[2]); \ } while (0) /* This is how to output an assembler line defining a `double' constant. */ @@ -125,8 +116,8 @@ do { long l[3]; \ #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ do { long l[2]; \ REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ - fprintf ((FILE), "%s0x%lx,0x%lx\n", LONG_ASM_OP, \ - l[0], l[1]); \ + fprintf ((FILE), "%s0x%lx,0x%lx\n", \ + integer_asm_op (4, TRUE), l[0], l[1]); \ } while (0) /* This is how to output an assembler line defining a `float' constant. */ @@ -135,7 +126,7 @@ do { long l[2]; \ #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ do { long l; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ - fprintf ((FILE), "%s0x%lx\n", LONG_ASM_OP, l); \ + assemble_aligned_integer (4, GEN_INT (l)); \ } while (0) /* This is how to output an assembler line that says to advance the @@ -160,7 +151,7 @@ do { \ #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ do { \ register size_t sp = 0, limit = (LEN); \ - fprintf ((FILE), "%s", BYTE_ASM_OP); \ + fputs (integer_asm_op (1, TRUE), (FILE)); \ do { \ int ch = (PTR)[sp]; \ if (ch > ' ' && ! (ch & 0x80) && ch != '\\') \ @@ -175,7 +166,7 @@ do { \ { \ if ((sp % 10) == 0) \ { \ - fprintf ((FILE), "\n%s", BYTE_ASM_OP); \ + fprintf ((FILE), "\n%s", integer_asm_op (1, TRUE)); \ } \ else \ { \ @@ -423,7 +414,7 @@ extern int switch_table_difference_label_flag; #undef ASM_OUTPUT_ADDR_DIFF_ELT #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - asm_fprintf (FILE, "%s%LL%d-%LL%d\n", WORD_ASM_OP, VALUE, REL) + asm_fprintf (FILE, "%s%LL%d-%LL%d\n", integer_asm_op (2, TRUE), VALUE, REL) /* Currently, JUMP_TABLES_IN_TEXT_SECTION must be defined in order to keep switch tables in the text section. */ diff --git a/gcc/config/m68k/tower-as.h b/gcc/config/m68k/tower-as.h index 927e92d..f9009df 100644 --- a/gcc/config/m68k/tower-as.h +++ b/gcc/config/m68k/tower-as.h @@ -63,6 +63,9 @@ Boston, MA 02111-1307, USA. */ #define SGS_CMP_ORDER /* Takes cmp operands in reverse order */ #define SGS_NO_LI /* Suppress jump table label usage */ +#undef INT_OP_GROUP +#define INT_OP_GROUP INT_OP_NO_DOT + /* Turn on SDB debugging info. */ #define SDB_DEBUGGING_INFO @@ -276,34 +279,6 @@ do { long l; \ fprintf ((FILE), "\tlong 0x%lx\n", l); \ } while (0) -/* This is how to output an assembler line defining an `int' constant. */ - -#undef ASM_OUTPUT_INT -#define ASM_OUTPUT_INT(FILE,VALUE) \ -( fprintf (FILE, "\tlong "), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -/* Likewise for `char' and `short' constants. */ - -#undef ASM_OUTPUT_SHORT -#define ASM_OUTPUT_SHORT(FILE,VALUE) \ -( fprintf (FILE, "\tshort "), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -#undef ASM_OUTPUT_CHAR -#define ASM_OUTPUT_CHAR(FILE,VALUE) \ -( fprintf (FILE, "\tbyte "), \ - output_addr_const (FILE, (VALUE)), \ - fprintf (FILE, "\n")) - -/* This is how to output an assembler line for a numeric constant byte. */ - -#undef ASM_OUTPUT_BYTE -#define ASM_OUTPUT_BYTE(FILE,VALUE) \ - fprintf (FILE, "\tbyte 0x%x\n", (int)(VALUE)) - #undef ASM_OUTPUT_ADDR_VEC_ELT #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ fprintf (FILE, "\tlong L%%%d\n", (VALUE)) @@ -585,7 +560,6 @@ do { fprintf (asm_out_file, "\ttag\t"); \ and CTOR_LIST_END to contribute to the .init section an instruction to push a word containing 0 (or some equivalent of that). */ -#define ASM_LONG "\tlong" #undef INIT_SECTION_ASM_OP #define INIT_SECTION_ASM_OP "\tsection\t~init" #undef FINI_SECTION_ASM_OP |