target.h (asm_out.byte_op, [...]): New fields.
authorRichard Sandiford <rsandifo@redhat.com>
Mon, 17 Dec 2001 15:05:40 +0000 (15:05 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 17 Dec 2001 15:05:40 +0000 (15:05 +0000)
* 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

144 files changed:
gcc/ChangeLog
gcc/config/1750a/1750a.c
gcc/config/1750a/1750a.h
gcc/config/a29k/a29k.c
gcc/config/a29k/a29k.h
gcc/config/alpha/alpha.c
gcc/config/alpha/alpha.h
gcc/config/alpha/elf.h
gcc/config/arc/arc.c
gcc/config/arc/arc.h
gcc/config/arm/aof.h
gcc/config/arm/aout.h
gcc/config/arm/arm.c
gcc/config/arm/arm.h
gcc/config/avr/avr-protos.h
gcc/config/avr/avr.c
gcc/config/avr/avr.h
gcc/config/c4x/c4x.c
gcc/config/c4x/c4x.h
gcc/config/clipper/clipper.c
gcc/config/clipper/clipper.h
gcc/config/clipper/clix.h
gcc/config/convex/convex.c
gcc/config/convex/convex.h
gcc/config/cris/cris.c
gcc/config/cris/cris.h
gcc/config/d30v/d30v.c
gcc/config/d30v/d30v.h
gcc/config/darwin.h
gcc/config/dsp16xx/dsp16xx-protos.h
gcc/config/dsp16xx/dsp16xx.c
gcc/config/dsp16xx/dsp16xx.h
gcc/config/elfos.h
gcc/config/elxsi/elxsi.c
gcc/config/elxsi/elxsi.h
gcc/config/fr30/fr30.c
gcc/config/fr30/fr30.h
gcc/config/h8300/h8300.c
gcc/config/h8300/h8300.h
gcc/config/i370/i370.c
gcc/config/i370/i370.h
gcc/config/i386/att.h
gcc/config/i386/bsd.h
gcc/config/i386/djgpp.h
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/linux.h
gcc/config/i386/sco5.h
gcc/config/i386/sol2.h
gcc/config/i386/sun386.h
gcc/config/i386/sysv4.h
gcc/config/i860/fx2800.h
gcc/config/i860/i860.c
gcc/config/i860/i860.h
gcc/config/i860/paragon.h
gcc/config/i860/sysv3.h
gcc/config/i960/i960.c
gcc/config/i960/i960.h
gcc/config/ia64/ia64.c
gcc/config/ia64/ia64.h
gcc/config/ia64/sysv4.h
gcc/config/m32r/m32r.c
gcc/config/m32r/m32r.h
gcc/config/m68hc11/m68hc11.c
gcc/config/m68hc11/m68hc11.h
gcc/config/m68k/amix.h
gcc/config/m68k/atari.h
gcc/config/m68k/auxas.h
gcc/config/m68k/dpx2.h
gcc/config/m68k/dpx2g.h
gcc/config/m68k/hp320.h
gcc/config/m68k/lynx.h
gcc/config/m68k/m68k.c
gcc/config/m68k/m68k.h
gcc/config/m68k/m68kelf.h
gcc/config/m68k/m68kv4.h
gcc/config/m68k/mot3300.h
gcc/config/m68k/sgs.h
gcc/config/m68k/tower-as.h
gcc/config/m88k/m88k.c
gcc/config/m88k/m88k.h
gcc/config/mcore/mcore-elf.h
gcc/config/mcore/mcore.c
gcc/config/mcore/mcore.h
gcc/config/mips/iris5.h
gcc/config/mips/iris6.h
gcc/config/mips/mips.c
gcc/config/mips/mips.h
gcc/config/mips/sni-svr4.h
gcc/config/mmix/mmix-protos.h
gcc/config/mmix/mmix.c
gcc/config/mmix/mmix.h
gcc/config/mn10200/mn10200.c
gcc/config/mn10200/mn10200.h
gcc/config/mn10300/mn10300.c
gcc/config/mn10300/mn10300.h
gcc/config/ns32k/encore.h
gcc/config/ns32k/ns32k.c
gcc/config/ns32k/ns32k.h
gcc/config/pa/pa-64.h
gcc/config/pa/pa.c
gcc/config/pa/pa.h
gcc/config/pdp11/pdp11.c
gcc/config/pdp11/pdp11.h
gcc/config/pj/pj.h
gcc/config/romp/romp.h
gcc/config/rs6000/linux64.h
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.h
gcc/config/rs6000/sysv4.h
gcc/config/rs6000/xcoff.h
gcc/config/s390/linux.h
gcc/config/s390/s390.c
gcc/config/s390/s390.h
gcc/config/sh/sh.c
gcc/config/sh/sh.h
gcc/config/sparc/linux64.h
gcc/config/sparc/sol2.h
gcc/config/sparc/sp64-elf.h
gcc/config/sparc/sparc-protos.h
gcc/config/sparc/sparc.c
gcc/config/sparc/sparc.h
gcc/config/sparc/sun4gas.h
gcc/config/sparc/sysv4.h
gcc/config/stormy16/stormy16.c
gcc/config/stormy16/stormy16.h
gcc/config/svr3.h
gcc/config/v850/v850.c
gcc/config/v850/v850.h
gcc/config/vax/vax.c
gcc/config/vax/vax.h
gcc/config/we32k/we32k.c
gcc/config/we32k/we32k.h
gcc/defaults.h
gcc/doc/tm.texi
gcc/dwarf2asm.c
gcc/dwarf2asm.h
gcc/dwarfout.c
gcc/final.c
gcc/halfpic.c
gcc/output.h
gcc/target-def.h
gcc/target.h
gcc/varasm.c

index ff720d1bb3022ff42ccb5cfa04f0df0d60f0bbd9..211386bc34abbf759aa94107f2a4e2115f459139 100644 (file)
@@ -1,3 +1,210 @@
+2001-12-17  Richard Sandiford  <rsandifo@redhat.com>
+
+       * 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.
+
 2001-12-17  Stan Shebs  <shebs@apple.com>
 
        * config/rs6000/darwin.h (SUBTARGET_OVERRIDE_OPTIONS): Define.
index a5ad52a15fdac0ea76bf33d2fe601b2e841d9280..54a2216b789631918f7f68f4c866db49ed6d3a73 100644 (file)
@@ -47,10 +47,20 @@ const char *const sectname[4] =
 {"Init", "Normal", "Konst", "Static"};
 
 static int which_bit PARAMS ((int));
+static bool assemble_integer_1750a PARAMS ((rtx, unsigned int, int));
 static void output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_BYTE_OP
+#define TARGET_ASM_BYTE_OP "\tdata\t"
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\tdatal\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP NULL
+#undef TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER assemble_integer_1750a
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
@@ -807,6 +817,25 @@ print_operand_address (file, addr)
   addr_inc = 0;
 }
 
+/* Target hook for assembling integer objects.  The 1750a version needs to
+   keep track of how many bytes have been written.  */
+
+static bool
+assemble_integer_1750a (x, size, aligned_p)
+     rtx x;
+     unsigned int size;
+     int aligned_p;
+{
+  if (default_assemble_integer (x, size, aligned_p))
+    {
+      if (label_pending)
+       label_pending = 0;
+      datalbl[datalbl_ndx].size += size;
+      return true;
+    }
+  return false;
+}
+
 
 /*
  *  Return non zero if the LS 16 bits of the given value has just one bit set,
index 9d05863a86000195be301958cb6492ca4346b76f..90903c9aa0e22bf0fed0858e10e35283f8bdf00e 100644 (file)
@@ -1118,46 +1118,6 @@ enum reg_class { NO_REGS, R2, R0_1, INDEX_REGS, BASE_REGS, ALL_REGS, LIM_REG_CLA
        fprintf(FILE,"\n");                                             \
   } while (0)
 
-/* This is how to output an assembler line defining a `char', `short', or
-  `int' constant.
-   1750 NOTE: The reason why this macro also outputs `short' and `int'
-   constants is that for the 1750, BITS_PER_UNIT is 16 (as opposed to the
-   usual 8.) This behavior is different from the usual, where
-   ASM_OUTPUT_CHAR only outputs character constants. The name
-   of this macro should perhaps be `ASM_OUTPUT_QUARTER_INT' or so.
- */
-
-#define ASM_OUTPUT_CHAR(FILE,VALUE)  do {        \
-       if (label_pending)                                              \
-          label_pending = 0;                                           \
-       datalbl[datalbl_ndx].size++;                                    \
-       fprintf(FILE, "\tdata\t");                                      \
-       output_addr_const(FILE, VALUE);                                 \
-       fprintf(FILE, "\n");                                            \
-  } while (0)
-
-/* This is how to output an assembler line defining a `long int' constant.
-   1750 NOTE: The reason why this macro outputs `long' instead of `short'
-   constants is that for the 1750, BITS_PER_UNIT is 16 (as opposed to the
-   usual 8.) The name of this macro should perhaps be `ASM_OUTPUT_HALF_INT'.
- */
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE) do {        \
-       if (label_pending)                                              \
-          label_pending = 0;                                           \
-       datalbl[datalbl_ndx].size += 2;                                 \
-       fprintf(FILE, "\tdatal\t%d\n",INTVAL(VALUE));                   \
-  } while (0)
-
-/* This is how to output an assembler line for a numeric constant byte.  */
-
-#define ASM_OUTPUT_BYTE(FILE,VALUE) do {         \
-       if (label_pending)                                              \
-          label_pending = 0;                                           \
-       datalbl[datalbl_ndx].size++;                                    \
-       fprintf(FILE, "\tdata\t#%x\n", VALUE);                          \
-  } while (0)
-
 /* This is how to output an insn to push a register on the stack.
    It need not be very fast code.  */
 
index 531247154fc7828ee9107f4ab6b50d246b5c4839..3291bab5b245fc12233a48fa98d17fc8d8494bdd 100644 (file)
@@ -97,6 +97,11 @@ rtx a29k_compare_op0, a29k_compare_op1;
 int a29k_compare_fp_p;
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
index 27b33be9cd53ad01283fee7b149f17ecedc9a985..775179dfb2faf41fd13ed2eb7d7524220dad7528 100644 (file)
@@ -1470,25 +1470,6 @@ extern int a29k_debug_reg_map[];
 #define ASM_OUTPUT_FLOAT(FILE,VALUE)           \
   fprintf (FILE, "\t.float %.20e\n", (VALUE))
 
-/* This is how to output an assembler line defining an `int' constant.  */
-
-#define ASM_OUTPUT_INT(FILE,VALUE)  \
-( fprintf (FILE, "\t.word "),                  \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "\n"))
-
-/* Likewise for `char' and `short' constants.  */
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE)  \
-( fprintf (FILE, "\t.hword "),                 \
-  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 insn to push a register on the stack.
    It need not be very fast code.  */
 
@@ -1505,11 +1486,6 @@ extern int a29k_debug_reg_map[];
            reg_names[REGNO], reg_names[R_MSP], reg_names[R_MSP],       \
           reg_names[R_MSP]);
 
-/* 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", (VALUE))
-
 /* This is how to output an element of a case-vector that is absolute.  */
 
 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
index 7dcb4a6bc4dd51f03bad8583293c1bea4aec06e0..2588f5f43710e16ff20a97e022bdc5cabe8ca315 100644 (file)
@@ -205,6 +205,22 @@ static unsigned int unicosmk_section_type_flags PARAMS ((tree, const char *,
 # define TARGET_SECTION_TYPE_FLAGS unicosmk_section_type_flags
 #endif
 
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
+#undef TARGET_ASM_ALIGNED_DI_OP
+#define TARGET_ASM_ALIGNED_DI_OP "\t.quad\t"
+
+/* Default unaligned ops are provided for ELF systems.  To get unaligned
+   data for non-ELF systems, we have to turn off auto alignment.  */
+#ifndef OBJECT_FORMAT_ELF
+#undef TARGET_ASM_UNALIGNED_HI_OP
+#define TARGET_ASM_UNALIGNED_HI_OP "\t.align 0\n\t.word\t"
+#undef TARGET_ASM_UNALIGNED_SI_OP
+#define TARGET_ASM_UNALIGNED_SI_OP "\t.align 0\n\t.long\t"
+#undef TARGET_ASM_UNALIGNED_DI_OP
+#define TARGET_ASM_UNALIGNED_DI_OP "\t.align 0\n\t.quad\t"
+#endif
+
 #undef TARGET_ASM_FUNCTION_END_PROLOGUE
 #define TARGET_ASM_FUNCTION_END_PROLOGUE alpha_output_function_end_prologue
 
index 43dabceca6e4ad32192c31356b170adf23e39634..db23a57b54fad039ef4bc16d400e702fb1011440 100644 (file)
@@ -1845,7 +1845,7 @@ literal_section ()                                                \
       if (firsttime)                                           \
        {                                                       \
          firsttime = 0;                                        \
-         ASM_OUTPUT_DOUBLE_INT (asm_out_file, const0_rtx);     \
+         assemble_aligned_integer (8, const0_rtx);             \
        }                                                       \
                                                                \
       in_section = readonly_data;                              \
@@ -1978,32 +1978,6 @@ do {                                             \
     fprintf (FILE, "\t.long 0x%lx\n", t & 0xffffffff);         \
   } 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"))
-
-/* This is how to output an assembler line defining a `long' constant.  */
-
-#define ASM_OUTPUT_DOUBLE_INT(FILE,VALUE)      \
-( fprintf (FILE, "\t.quad "),                  \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "\n"))
-
-/* Likewise for `char' and `short' constants.  */
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE)  \
-  fprintf (FILE, "\t.word %d\n",               \
-    (int)(GET_CODE (VALUE) == CONST_INT                \
-     ? INTVAL (VALUE) & 0xffff : (abort (), 0)))
-
-#define ASM_OUTPUT_CHAR(FILE,VALUE)            \
-  fprintf (FILE, "\t.byte %d\n",               \
-    (int)(GET_CODE (VALUE) == CONST_INT                \
-     ? INTVAL (VALUE) & 0xff : (abort (), 0)))
-
 /* We use the default ASCII-output routine, except that we don't write more
    than 50 characters since the assembler doesn't support very long lines.  */
 
@@ -2048,11 +2022,6 @@ do {                                             \
   }                                                                          \
   while (0)
 
-/* To get unaligned data, we have to turn off auto alignment.  */
-#define UNALIGNED_SHORT_ASM_OP         "\t.align 0\n\t.word\t"
-#define UNALIGNED_INT_ASM_OP           "\t.align 0\n\t.long\t"
-#define UNALIGNED_DOUBLE_INT_ASM_OP    "\t.align 0\n\t.quad\t"
-
 /* This is how to output an insn to push a register on the stack.
    It need not be very fast code.  */
 
@@ -2069,11 +2038,6 @@ do {                                             \
          (REGNO) > 32 ? "t" : "q", (REGNO) > 32 ? "f" : "",            \
          (REGNO) & 31);
 
-/* 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) & 0xff))
-
 /* This is how to output an element of a case-vector that is absolute.
    (Alpha does not use such vectors, but we must define this macro anyway.)  */
 
index 7c8822916724ce5caa405f523f23479511bfdb08..7e9b4d84b4b5b59d5b81decec6d456949ed159f0 100644 (file)
@@ -624,12 +624,6 @@ do {                                                                       \
 /* We support #pragma.  */
 #define HANDLE_SYSV_PRAGMA
 
-/* Undo the auto-alignment stuff from alpha.h.  ELF has unaligned data
-   pseudos natively.  */
-#undef UNALIGNED_SHORT_ASM_OP
-#undef UNALIGNED_INT_ASM_OP
-#undef UNALIGNED_DOUBLE_INT_ASM_OP
-
 /* Select a format to encode pointers in exception handling data.  CODE
    is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
    true if the symbol may be affected by dynamic relocations.
index 5ecc1eceef8e92b39847c812a654bf076856932d..62ed01097bf9eb6b79d34e5e48e10055ecc62da6 100644 (file)
@@ -89,10 +89,18 @@ static void arc_init_reg_tables PARAMS ((void));
 static int get_arc_condition_code PARAMS ((rtx));
 const struct attribute_spec arc_attribute_table[];
 static tree arc_handle_interrupt_attribute PARAMS ((tree *, tree, tree, int, bool *));
+static bool arc_assemble_integer PARAMS ((rtx, unsigned int, int));
 static void arc_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void arc_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
+#undef TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER arc_assemble_integer
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE arc_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
@@ -1107,6 +1115,28 @@ arc_save_restore (file, base_reg, offset, gmask, op)
     }
 }
 \f
+/* Target hook to assemble an integer object.  The ARC version needs to
+   emit a special directive for references to labels and function
+   symbols.  */
+
+static bool
+arc_assemble_integer (x, size, aligned_p)
+     rtx x;
+     unsigned int size;
+     int aligned_p;
+{
+  if (size == UNITS_PER_WORD && aligned_p
+      && ((GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FLAG (x))
+         || GET_CODE (x) == LABEL_REF))
+    {
+      fputs ("\t.word\t%st(", asm_out_file);
+      output_addr_const (asm_out_file, x);
+      fputs (")\n", asm_out_file);
+      return true;
+    }
+  return default_assemble_integer (x, size, aligned_p);
+}
+\f
 /* Set up the stack and frame pointer (if desired) for the function.  */
 
 static void
index ddd989b6a4562e3ed0b302797471a4484131773d..d7db3bd66dbd3000165878b5f3b925f951b55b82 100644 (file)
@@ -863,10 +863,10 @@ arc_eligible_for_epilogue_delay (TRIAL, SLOTS_FILLED)
 */
 #define TRAMPOLINE_TEMPLATE(FILE) \
 do { \
-  ASM_OUTPUT_INT (FILE, GEN_INT (0x631f7c00)); \
-  ASM_OUTPUT_INT (FILE, const0_rtx); \
-  ASM_OUTPUT_INT (FILE, GEN_INT (0x381f0000)); \
-  ASM_OUTPUT_INT (FILE, const0_rtx); \
+  assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0x631f7c00)); \
+  assemble_aligned_integer (UNITS_PER_WORD, const0_rtx); \
+  assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0x381f0000)); \
+  assemble_aligned_integer (UNITS_PER_WORD, const0_rtx); \
 } while (0)
 
 /* Length in units of the trampoline for entering a nested function.  */
@@ -1238,36 +1238,6 @@ do {                                                     \
    no longer contain unusual constructs.  */
 #define ASM_APP_OFF ""
 
-/* This is how to output an assembler line defining a `char' constant.  */
-#define ASM_OUTPUT_CHAR(FILE, VALUE) \
-( fprintf (FILE, "\t.byte\t"),                 \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "\n"))
-
-/* This is how to output an assembler line defining a `short' constant.  */
-#define ASM_OUTPUT_SHORT(FILE, VALUE) \
-( fprintf (FILE, "\t.hword\t"),                        \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "\n"))
-
-/* This is how to output an assembler line defining an `int' constant.
-   We also handle symbol output here.  Code addresses must be right shifted
-   by 2 because that's how the jump instruction wants them.  */
-#define ASM_OUTPUT_INT(FILE, VALUE) \
-do {                                                                   \
-  fprintf (FILE, "\t.word\t");                                         \
-  if ((GET_CODE (VALUE) == SYMBOL_REF && SYMBOL_REF_FLAG (VALUE))      \
-      || GET_CODE (VALUE) == LABEL_REF)                                        \
-    {                                                                  \
-      fprintf (FILE, "%%st(");                                         \
-      output_addr_const (FILE, (VALUE));                               \
-      fprintf (FILE, ")");                                             \
-    }                                                                  \
-  else                                                                 \
-    output_addr_const (FILE, (VALUE));                                 \
-  fprintf (FILE, "\n");                                                        \
-} while (0)
-
 /* This is how to output an assembler line defining a `float' constant.  */
 #define ASM_OUTPUT_FLOAT(FILE, VALUE) \
 {                                                      \
@@ -1290,11 +1260,6 @@ do {                                                                     \
           t[0], ASM_COMMENT_START, str, t[1]);         \
 }
 
-/* This is how to output an assembler line for a numeric constant byte.  */
-#define ASM_BYTE_OP    "\t.byte\t"
-#define ASM_OUTPUT_BYTE(FILE, VALUE)  \
-  fprintf (FILE, "%s0x%x\n", ASM_BYTE_OP, (VALUE))
-
 /* This is how to output the definition of a user-level label named NAME,
    such as the label on a static function or variable NAME.  */
 #define ASM_OUTPUT_LABEL(FILE, NAME) \
index 387788d3bd5acad71740505153c6bf0135ae058d..01826b8172713c950a9acb3327158f83dd48cd81 100644 (file)
@@ -206,24 +206,6 @@ do {                                                       \
           l, ASM_COMMENT_START, dstr);                 \
 } while (0)
 
-#define ASM_OUTPUT_INT(STREAM,VALUE)           \
-  (fprintf ((STREAM), "\tDCD\t"),              \
-   output_addr_const ((STREAM), (VALUE)),      \
-   fputc ('\n', (STREAM)))
-
-#define ASM_OUTPUT_SHORT(STREAM,VALUE)         \
-  (fprintf ((STREAM), "\tDCW\t"),              \
-   output_addr_const ((STREAM), (VALUE)),      \
-   fputc ('\n', (STREAM)))
-
-#define ASM_OUTPUT_CHAR(STREAM,VALUE)          \
-  (fprintf ((STREAM), "\tDCB\t"),              \
-   output_addr_const ((STREAM), (VALUE)),      \
-   fputc ('\n', (STREAM)))
-
-#define ASM_OUTPUT_BYTE(STREAM,VALUE)          \
-  fprintf ((STREAM), "\tDCB\t%d\n", (VALUE))
-
 #define ASM_OUTPUT_ASCII(STREAM,PTR,LEN)               \
 {                                                      \
   int i;                                               \
index fbdbba072f50ff428d0ee74a1df4ce1dff3bc57a..9832eda92607a946b53e87a57c03927acf6f206c 100644 (file)
@@ -226,36 +226,6 @@ Boston, MA 02111-1307, USA.  */
     }                                                          \
   while (0)
 
-#define ASM_OUTPUT_INT(STREAM, EXP)            \
-  do                                           \
-    {                                          \
-      fprintf (STREAM, "\t.word\t");           \
-      OUTPUT_INT_ADDR_CONST (STREAM, EXP);     \
-      fputc ('\n', STREAM);                    \
-    }                                          \
-  while (0)
-
-#define ASM_OUTPUT_SHORT(STREAM, EXP)          \
-  do                                           \
-    {                                          \
-      fprintf (STREAM, "\t.short\t");          \
-      output_addr_const (STREAM, EXP);         \
-      fputc ('\n', STREAM);                    \
-    }                                          \
-  while (0)
-
-#define ASM_OUTPUT_CHAR(STREAM, EXP)           \
-  do                                           \
-    {                                          \
-      fprintf (STREAM, "\t.byte\t");           \
-      output_addr_const (STREAM, EXP);         \
-      fputc ('\n', STREAM);                    \
-    }                                          \
-  while (0)
-
-#define ASM_OUTPUT_BYTE(STREAM, VALUE)         \
-  fprintf (STREAM, "\t.byte\t%d\n", VALUE)
-
 #undef  ASM_OUTPUT_ASCII
 #define ASM_OUTPUT_ASCII(STREAM, PTR, LEN)  \
   output_ascii_pseudo_op (STREAM, (const unsigned char *)(PTR), LEN)
index 7ede66663148d492a5b7e07556567047ce2026bc..7a5f03ae4ec8a275e8179be74311ba9587bba19f 100644 (file)
@@ -68,6 +68,10 @@ static int       const_ok_for_op             PARAMS ((Hint, enum rtx_code));
 static int       eliminate_lr2ip               PARAMS ((rtx *));
 static rtx      emit_multi_reg_push            PARAMS ((int));
 static rtx      emit_sfm                       PARAMS ((int, int));
+#ifndef AOF_ASSEMBLER
+static bool     arm_assemble_integer           PARAMS ((rtx, unsigned int,
+                                                        int));
+#endif
 static Ccstar    fp_const_from_val             PARAMS ((REAL_VALUE_TYPE *));
 static arm_cc    get_arm_condition_code                PARAMS ((rtx));
 static void      init_fpa_table                        PARAMS ((void));
@@ -134,6 +138,20 @@ static int  arm_adjust_cost                PARAMS ((rtx, rtx, rtx, int));
 #undef TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE arm_attribute_table
 
+#ifdef AOF_ASSEMBLER
+#undef TARGET_ASM_BYTE_OP
+#define TARGET_ASM_BYTE_OP "\tDCB\t"
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\tDCW\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\tDCD\t"
+#else
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP NULL
+#undef TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER arm_assemble_integer
+#endif
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE arm_output_function_prologue
 
@@ -7320,7 +7338,7 @@ arm_poke_function_name (stream, name)
   ASM_OUTPUT_ASCII (stream, name, length);
   ASM_OUTPUT_ALIGN (stream, 2);
   x = GEN_INT ((unsigned HOST_WIDE_INT) 0xff000000 + alignlength);
-  ASM_OUTPUT_INT (stream, x);
+  assemble_aligned_integer (UNITS_PER_WORD, x);
 }
 
 /* Place some comments into the assembler stream
@@ -8509,6 +8527,40 @@ arm_print_operand (stream, x, code)
     }
 }
 \f
+#ifndef AOF_ASSEMBLER
+/* Target hook for assembling integer objects.  The ARM version needs to
+   handle word-sized values specially.  */
+
+static bool
+arm_assemble_integer (x, size, aligned_p)
+     rtx x;
+     unsigned int size;
+     int aligned_p;
+{
+  if (size == UNITS_PER_WORD && aligned_p)
+    {
+      fputs ("\t.word\t", asm_out_file);
+      output_addr_const (asm_out_file, x);
+
+      /* Mark symbols as position independent.  We only do this in the
+        .text segment, not in the .data segment. */
+      if (NEED_GOT_RELOC && flag_pic && making_const_table &&
+         (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF))
+       {
+         if (GET_CODE (x) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (x))
+           fputs ("(GOTOFF)", asm_out_file);
+         else if (GET_CODE (x) == LABEL_REF)
+           fputs ("(GOTOFF)", asm_out_file);
+         else
+           fputs ("(GOT)", asm_out_file);
+       }
+      fputc ('\n', asm_out_file);
+      return true;
+    }
+  return default_assemble_integer (x, size, aligned_p);
+}
+#endif
+\f
 /* A finite state machine takes care of noticing whether or not instructions
    can be conditionally executed, and thus decrease execution time and code
    size by deleting branch instructions.  The fsm is controlled by
index eefa198150dabf69483a7c127e08c0ade81a4a15..6060275d6bb5333f2524fa8b7de0a536a45c3ffe 100644 (file)
@@ -1579,7 +1579,7 @@ typedef struct
   fputc ('\n', STREAM);                                        \
   ASM_GENERATE_INTERNAL_LABEL (temp, "LP", LABELNO);   \
   sym = gen_rtx (SYMBOL_REF, Pmode, temp);             \
-  ASM_OUTPUT_INT (STREAM, sym);                                \
+  assemble_aligned_integer (UNITS_PER_WORD, sym);      \
 }
 #endif
 
@@ -1716,14 +1716,14 @@ typedef struct
           .word        static chain value
           .word        function's address
    ??? FIXME: When the trampoline returns, r8 will be clobbered.  */
-#define ARM_TRAMPOLINE_TEMPLATE(FILE)                  \
-{                                                      \
-  asm_fprintf (FILE, "\tldr\t%r, [%r, #0]\n",          \
-              STATIC_CHAIN_REGNUM, PC_REGNUM);         \
-  asm_fprintf (FILE, "\tldr\t%r, [%r, #0]\n",          \
-              PC_REGNUM, PC_REGNUM);                   \
-  ASM_OUTPUT_INT (FILE, const0_rtx);                   \
-  ASM_OUTPUT_INT (FILE, const0_rtx);                   \
+#define ARM_TRAMPOLINE_TEMPLATE(FILE)                          \
+{                                                              \
+  asm_fprintf (FILE, "\tldr\t%r, [%r, #0]\n",                  \
+              STATIC_CHAIN_REGNUM, PC_REGNUM);                 \
+  asm_fprintf (FILE, "\tldr\t%r, [%r, #0]\n",                  \
+              PC_REGNUM, PC_REGNUM);                           \
+  assemble_aligned_integer (UNITS_PER_WORD, const0_rtx);       \
+  assemble_aligned_integer (UNITS_PER_WORD, const0_rtx);       \
 }
 
 /* On the Thumb we always switch into ARM mode to execute the trampoline.
@@ -2781,24 +2781,6 @@ extern int making_const_table;
   else                                         \
     THUMB_PRINT_OPERAND_ADDRESS (STREAM, X)
      
-#define OUTPUT_INT_ADDR_CONST(STREAM, X)                               \
-  {                                                                    \
-    output_addr_const (STREAM, X);                                     \
-                                                                       \
-    /* Mark symbols as position independent.  We only do this in the   \
-      .text segment, not in the .data segment. */                      \
-    if (NEED_GOT_RELOC && flag_pic && making_const_table &&            \
-       (GET_CODE (X) == SYMBOL_REF || GET_CODE (X) == LABEL_REF))      \
-     {                                                                 \
-        if (GET_CODE (X) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (X)) \
-          fprintf (STREAM, "(GOTOFF)");                                        \
-        else if (GET_CODE (X) == LABEL_REF)                            \
-          fprintf (STREAM, "(GOTOFF)");                                        \
-        else                                                           \
-          fprintf (STREAM, "(GOT)");                                   \
-     }                                                                 \
-  }
-
 /* Output code to add DELTA to the first argument, and then jump to FUNCTION.
    Used for C++ multiple inheritance.  */
 #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION)               \
index b6f4d74cb0021342c403c9232e54b1117bcfcf9f..e47b7e0ea6465eabed5fcdbbda08fe100d26e944 100644 (file)
@@ -115,9 +115,6 @@ extern const char * output_reload_insisf PARAMS ((rtx insn, rtx *operands,
                                                int *len));
 extern int    default_rtx_costs      PARAMS ((rtx X, RTX_CODE code,
                                             RTX_CODE outer_code));
-extern void   asm_output_char        PARAMS ((FILE *file, rtx value));
-extern void   asm_output_short       PARAMS ((FILE *file, rtx value));
-extern void   asm_output_byte        PARAMS ((FILE *file, int value));
 extern enum reg_class secondary_input_reload_class PARAMS ((enum reg_class,
                                                           enum machine_mode,
                                                           rtx));
index 8b7e1a12861489a06733390ab1a17ba9067324ad..7e20748220ce5c8c64063b993e55d805571cc421 100644 (file)
@@ -61,6 +61,7 @@ void          debug_hard_reg_set   PARAMS ((HARD_REG_SET set));
 static tree   avr_handle_progmem_attribute PARAMS ((tree *, tree, tree, int, bool *));
 static tree   avr_handle_fndecl_attribute PARAMS ((tree *, tree, tree, int, bool *));
 const struct attribute_spec avr_attribute_table[];
+static bool   avr_assemble_integer PARAMS ((rtx, unsigned int, int));
 static void   avr_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void   avr_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 
@@ -174,6 +175,11 @@ static const struct mcu_type_s avr_mcu_types[] = {
 int avr_case_values_threshold = 30000;
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
+#undef TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER avr_assemble_integer
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE avr_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
@@ -4458,49 +4464,25 @@ _reg_unused_after (insn, reg)
   return 1;
 }
 
-/* Output rtx VALUE as .byte to file FILE */
-
-void
-asm_output_char (file, value)
-     FILE *file;
-     rtx value;
-{
-  fprintf (file, "\t.byte ");
-  output_addr_const (file, value);
-  fprintf (file, "\n");
-}
-
-
-/* Output VALUE as .byte to file FILE */
-
-void
-asm_output_byte (file, value)
-     FILE *file;
-     int value;
-{
-  fprintf (file, "\t.byte 0x%x\n", value & 0xff);
-}
-
-
-/* Output rtx VALUE as .word to file FILE */
+/* Target hook for assembling integer objects.  The AVR version needs
+   special handling for references to certain labels.  */
 
-void
-asm_output_short (file, value)
-     FILE *file;
-     rtx value;
+static bool
+avr_assemble_integer (x, size, aligned_p)
+     rtx x;
+     unsigned int size;
+     int aligned_p;
 {
-  if (SYMBOL_REF_FLAG (value) || GET_CODE (value) == LABEL_REF)
-    {
-      fprintf (file, "\t.word pm(");
-      output_addr_const (file, (value));
-      fprintf (file, ")\n");
-    }
-  else
+  if (size == POINTER_SIZE / BITS_PER_UNIT && aligned_p
+      && ((GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FLAG (x))
+         || GET_CODE (x) == LABEL_REF))
     {
-      fprintf (file, "\t.word ");
-      output_addr_const (file, (value));
-      fprintf (file, "\n");
+      fputs ("\t.word\tpm(", asm_out_file);
+      output_addr_const (asm_out_file, x);
+      fputs (")\n", asm_out_file);
+      return true;
     }
+  return default_assemble_integer (x, size, aligned_p);
 }
 
 
index 23810bf46299220135c9b01a5f04ce4a649576a5..fac7e46901aff6a9ec9621cda21014c4c78f474f 100644 (file)
@@ -2025,39 +2025,6 @@ progmem_section (void)                                                         \
    definitions.  */
 
 
-#define ASM_OUTPUT_INT(FILE, VALUE)                    \
- ( fprintf (FILE, "\t.long "),                         \
-   output_addr_const (FILE, (VALUE)),                  \
-   fputs ("\n", FILE))
-
- /* Likewise for `short' and `char' constants.   */
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE) asm_output_short(FILE,VALUE)
-#define ASM_OUTPUT_CHAR(FILE,VALUE) asm_output_char(FILE,VALUE)
-
-/* `ASM_OUTPUT_QUADRUPLE_INT (STREAM, EXP)'
-   A C statement to output to the stdio stream STREAM an assembler
-   instruction to assemble an integer of 16, 8, 4, 2 or 1 bytes,
-   respectively, whose value is VALUE.  The argument EXP will be an
-   RTL expression which represents a constant value.  Use
-   `output_addr_const (STREAM, EXP)' to output this value as an
-   assembler expression.
-
-   For sizes larger than `UNITS_PER_WORD', if the action of a macro
-   would be identical to repeatedly calling the macro corresponding to
-   a size of `UNITS_PER_WORD', once for each word, you need not define
-   the macro.  */
-
-
-#define ASM_OUTPUT_BYTE(FILE,VALUE) asm_output_byte (FILE,VALUE)
-/* A C statement to output to the stdio stream STREAM an assembler
-   instruction to assemble a single byte containing the number VALUE.  */
-
-#define ASM_BYTE_OP "\t.byte "
-/* A C string constant giving the pseudo-op to use for a sequence of
-   single-byte constants.  If this macro is not defined, the default
-   is `"\t.byte\t"'.  */
-
 #define ASM_OUTPUT_ASCII(FILE, P, SIZE)         gas_output_ascii (FILE,P,SIZE)
 /* `ASM_OUTPUT_ASCII (STREAM, PTR, LEN)'
    output_ascii (FILE, P, SIZE)
index 3559652fe4051a5e0e8ac53286bfd841dcda01d6..ee878dd709886e66511486dbeb1b9803e365293f 100644 (file)
@@ -195,6 +195,13 @@ static void c4x_asm_named_section PARAMS ((const char *, unsigned int));
 static int c4x_adjust_cost PARAMS ((rtx, rtx, rtx, int));
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_BYTE_OP
+#define TARGET_ASM_BYTE_OP "\t.word\t"
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP NULL
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP NULL
+
 #undef TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE c4x_attribute_table
 
index 5dd4a122c24925f66ae7cb3a7fca71ce90a0687e..824fa2ce7ffb758f622819aa0f0d2e2f6f5f63f4 100644 (file)
@@ -1888,19 +1888,6 @@ const_section ()                                                 \
                l[0], str, l[1]);                               \
   } while (0);
 
-#define ASM_OUTPUT_CHAR(FILE, VALUE)                   \
-  do {                                                 \
-    fprintf (FILE, "\t.word\t");                       \
-     output_addr_const (FILE, VALUE);                  \
-     if (GET_CODE (VALUE) != SYMBOL_REF)               \
-       fprintf (FILE, " ; 0%08xh\n", INTVAL (VALUE));  \
-     else                                              \
-       fputc ('\n', FILE);                             \
-  } while (0);
-
-#define ASM_OUTPUT_BYTE(FILE, VALUE)  \
-  fprintf (FILE, "\t.word\t0%xh\n", (VALUE))
-
 #define ASM_OUTPUT_ASCII(FILE, PTR, LEN) c4x_output_ascii (FILE, PTR, LEN)
 
 /* Output and Generation of Labels.  */
index 7e6bd1330efa69938d470a37b31d3e0b50c95d7b..96c1caa7a6ea4ac3c036175fd5491fed1a8e7de7 100644 (file)
@@ -54,6 +54,9 @@ extern int frame_pointer_needed;
 static int frame_size;
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE clipper_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
index 1d202c08f7ad2dc50b5a8a59038118063481a230..48671b02c3edc47c4c176ec42515e2564da2b636 100644 (file)
@@ -979,30 +979,6 @@ do                                                                       \
 #define ASM_GLOBALIZE_LABEL(FILE,NAME) \
   do { fputs (".globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} 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", (VALUE))
-
 /* This is how to output an insn to push a register on the stack.
    It need not be very fast code.  */
 
index 45f92646cc70fc055027f5624ce4bc911c2d3659..cd625c1e827af120a2a287954cf76719e0a83632 100644 (file)
@@ -70,7 +70,6 @@ do {                                                  \
   fprintf(FILE, "\t.align %d\n", 1 << (LOG))
 
 
-#define ASM_LONG ".long"
 #define BSS_SECTION_ASM_OP  "\t.bss"
 #undef INIT_SECTION_ASM_OP
 #define INIT_SECTION_ASM_OP "\t.section .init,\"x\""
index f77ed67efd11e08e5d845f5a88b96b5a56eb9522..bee0f173076d4de19cf86249fb8324e37234b57f 100644 (file)
@@ -69,6 +69,13 @@ static void convex_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 static int convex_adjust_cost PARAMS ((rtx, rtx, rtx, int));
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_BYTE_OP
+#define TARGET_ASM_BYTE_OP "\tds.b\t"
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\tds.h\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\tds.w\t"
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE convex_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
index c6e025507352eb2e7dc5463882eeb69ecf34ece7..d8fa6836956a43e9834d600ffdcacb431cd522cf 100644 (file)
@@ -1267,48 +1267,6 @@ enum reg_class {
 #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
   outfloat (FILE, VALUE, "%.9e", "\tds.s ", "\n")
 
-/* This is how to output an assembler line defining an `int' constant.  */
-
-#define ASM_OUTPUT_INT(FILE,VALUE)  \
-{                                                                      \
-  fprintf (FILE, "\tds.w ");                                           \
-  output_addr_const (FILE, simplify_for_convex (VALUE));               \
-  fprintf (FILE, "\n");                                                        \
-}
-
-/* Likewise for a `long long int' constant.  */
-
-#define ASM_OUTPUT_DOUBLE_INT(FILE,VALUE)  \
-{                                                                      \
-  if (GET_CODE (VALUE) == CONST_DOUBLE)                                        \
-    fprintf (FILE, "\tds.w %d,%d\n",                                   \
-            const_double_high_int (VALUE), const_double_low_int (VALUE)); \
-  else if (GET_CODE (VALUE) == CONST_INT)                              \
-    {                                                                  \
-      int val = INTVAL (VALUE);                                                \
-      fprintf (FILE, "\tds.w %d,%d\n", val < 0 ? -1 : 0, val);         \
-    }                                                                  \
-  else                                                                 \
-    abort ();                                                          \
-}
-
-/* Likewise for `char' and `short' constants.  */
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE)  \
-( fprintf (FILE, "\tds.h "),                   \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "\n"))
-
-#define ASM_OUTPUT_CHAR(FILE,VALUE)  \
-( fprintf (FILE, "\tds.b "),                   \
-  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, "\tds.b %#x\n", (int)(VALUE))
-
 /* This is how to output a string */
 
 #define ASM_OUTPUT_ASCII(FILE,STR,SIZE) do {                           \
index 5e297921fcae2dd13a93e90ccedc48e3927409c6..8d2afa82d0617f5ad53f3cc803168bcb23d99a0b 100644 (file)
@@ -123,6 +123,25 @@ int cris_max_stackframe = 0;
 /* This is the parsed result of the "-march=" option, if given.  */
 int cris_cpu_version = CRIS_DEFAULT_CPU_VERSION;
 
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\t.dword\t"
+#undef TARGET_ASM_ALIGNED_DI_OP
+#define TARGET_ASM_ALIGNED_DI_OP "\t.quad\t"
+
+/* We need to define these, since the 2byte, 4byte, 8byte op:s are only
+   available in ELF.  These "normal" pseudos do not have any alignment
+   constraints or side-effects.  */
+#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_UNALIGNED_DI_OP
+#define TARGET_ASM_UNALIGNED_DI_OP TARGET_ASM_ALIGNED_DI_OP
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE cris_target_asm_function_prologue
 
index 38a92ae607cb597b1ff19a1cf1612b0ba2da2277..c7e2cba60537aeceb06780f228d959361a2fe3e4 100644 (file)
@@ -1537,56 +1537,8 @@ struct cum_args {int regs;};
  ASM_OUTPUT_LONG_DOUBLE (FILE, VALUE)
 
 
-/* This is a kludge for a.out+ELF support: For non-ELF prioritized
-   [cd]tors, globalize the function so collect2 can collect it.  This is
-   due to short-sightedness guided by defined (ASM_OUTPUT_SECTION_NAME)
-   && defined (ASM_OUTPUT_CONSTRUCTOR).  */
-
-#define ASM_OUTPUT_INT(FILE, VALUE)            \
-  do                                           \
-    {                                          \
-      fprintf (FILE, "\t.dword ");             \
-      output_addr_const (FILE, (VALUE));       \
-      fprintf (FILE, "\n");                    \
-    }                                          \
-  while (0)
-
-#define ASM_OUTPUT_SHORT(FILE, VALUE)          \
-  do                                           \
-    {                                          \
-      fprintf (FILE, "\t.word ");              \
-      output_addr_const (FILE, (VALUE));       \
-      fprintf (FILE, "\n");                    \
-    }                                          \
-  while (0)
-
-#define ASM_OUTPUT_CHAR(FILE, VALUE)           \
-  do                                           \
-    {                                          \
-      fprintf (FILE, "\t.byte ");              \
-      output_addr_const (FILE, (VALUE));       \
-      fprintf (FILE, "\n");                    \
-    }                                          \
-  while (0)
-
-#define ASM_OUTPUT_BYTE(FILE, VALUE)  \
- fprintf (FILE, "\t.byte 0x%x\n", (VALUE))
-
 #define IS_ASM_LOGICAL_LINE_SEPARATOR(C) (C) == '@'
 
-/* FIXME: These are undocumented.  */
-/* We need to define these, since the 2byte, 4byte, 8byte op:s are only
-   available in ELF.  These "normal" pseudos do not have any alignment
-   constraints or side-effects.  */
-#undef UNALIGNED_SHORT_ASM_OP
-#define UNALIGNED_SHORT_ASM_OP "\t.word\t"
-
-#undef UNALIGNED_INT_ASM_OP
-#define UNALIGNED_INT_ASM_OP "\t.dword\t"
-
-#undef UNALIGNED_DOUBLE_INT_ASM_OP
-#define UNALIGNED_DOUBLE_INT_ASM_OP "\t.quad\t"
-
 /* Node: Uninitialized Data */
 
 /* Remember to round off odd values if we want data alignment,
index 9eea5f5ef6e646f7ee1c8be31b471bf752e0c409..f359d3d71c0bfd6d9641316f2aaf9f187cbfb24a 100644 (file)
@@ -85,6 +85,11 @@ enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER];
 enum reg_class reg_class_from_letter[256];
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE d30v_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
index af641b35bc2e2c3818022765f25122ad752f3110..ebdefb598ed2215eba7f60668c002e576b0daf11 100644 (file)
@@ -3778,53 +3778,6 @@ extern const char *d30v_branch_cost_string;
 /* #define ASM_OUTPUT_SHORT_FLOAT(STREAM, VALUE) */
 /* #define ASM_OUTPUT_BYTE_FLOAT(STREAM, VALUE) */
 
-/* A C statement to output to the stdio stream STREAM an assembler instruction
-   to assemble an integer of 16, 8, 4, 2 or 1 bytes, respectively, whose value
-   is VALUE.  The argument EXP will be an RTL expression which represents a
-   constant value.  Use `output_addr_const (STREAM, EXP)' to output this value
-   as an assembler expression.
-
-   For sizes larger than `UNITS_PER_WORD', if the action of a macro would be
-   identical to repeatedly calling the macro corresponding to a size of
-   `UNITS_PER_WORD', once for each word, you need not define the macro.  */
-
-/* #define ASM_OUTPUT_QUADRUPLE_INT(STREAM, EXP) */
-/* #define ASM_OUTPUT_DOUBLE_INT(STREAM, EXP) */
-
-#define ASM_OUTPUT_INT(STREAM, EXP)                                    \
-do {                                                                   \
-  fputs ("\t.word ", STREAM);                                          \
-  output_addr_const (STREAM, EXP);                                     \
-  putc ('\n', STREAM);                                                 \
-} while (0)
-
-#define ASM_OUTPUT_SHORT(STREAM, EXP)                                  \
-do {                                                                   \
-  fputs ("\t.hword ", STREAM);                                         \
-  output_addr_const (STREAM, EXP);                                     \
-  putc ('\n', STREAM);                                                 \
-} while (0)
-
-#define ASM_OUTPUT_CHAR(STREAM, EXP)                                   \
-do {                                                                   \
-  fputs ("\t.byte ", STREAM);                                          \
-  output_addr_const (STREAM, EXP);                                     \
-  putc ('\n', STREAM);                                                 \
-} while (0)
-
-/* A C statement to output to the stdio stream STREAM an assembler instruction
-   to assemble a single byte containing the number VALUE.  */
-
-#define ASM_OUTPUT_BYTE(STREAM, VALUE) \
-  fprintf (STREAM, "%s%d\n", ASM_BYTE_OP, (int)(VALUE))
-
-/* A C string constant giving the pseudo-op to use for a sequence of
-   single-byte constants.  If this macro is not defined, the default
-   is `"byte"'.
-
-   Defined in svr4.h.  */
-/* #define ASM_BYTE_OP */
-
 /* A C statement to output to the stdio stream STREAM an assembler instruction
    to assemble a string constant containing the LEN bytes at PTR.  PTR will be
    a C expression of type `char *' and LEN a C expression of type `int'.
@@ -4675,8 +4628,7 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE)
 /* Define this macro to 0 if your target supports DWARF 2 frame unwind
    information, but it does not yet work with exception handling.  Otherwise,
    if your target supports this information (if it defines
-   `INCOMING_RETURN_ADDR_RTX' and either `UNALIGNED_INT_ASM_OP' or
-   `OBJECT_FORMAT_ELF'), GCC will provide a default definition of 1.
+   `INCOMING_RETURN_ADDR_RTX'), GCC will provide a default definition of 1.
 
    If this macro is defined to 1, the DWARF 2 unwinder will be the default
    exception handling mechanism; otherwise, setjmp/longjmp will be used by
index cfa2bd5745f037d03edf16e4f28d4f16026bae69..7988b61a393b61d53cf607a7f08008880b869ae6 100644 (file)
@@ -262,13 +262,6 @@ do { text_section ();                                                      \
          fprintf (FILE, "_%s", NAME);                                  \
   } while (0)
 
-/* The standard fillin directives are unaligned.  */
-
-#define UNALIGNED_SHORT_ASM_OP          "\t.short\t"
-#define UNALIGNED_INT_ASM_OP            "\t.long\t"
-/* Don't try to use this before the assembler knows about it.  */
-/* #define UNALIGNED_DOUBLE_INT_ASM_OP     "\t.quad\t"  */
-
 #undef ALIGN_ASM_OP
 #define ALIGN_ASM_OP           ".align"
 
index ea1ea6b6610d6b6a11593a1c9c83a0291864cb5d..a2f68afbc3ef9dd0aeb0378cdca18e8d0d5d2e07 100644 (file)
@@ -78,7 +78,6 @@ extern int initial_frame_pointer_offset PARAMS ((void));
 extern void asm_output_common PARAMS ((FILE *, const char *, int, int));
 extern void asm_output_local PARAMS ((FILE *, const char *, int, int));
 extern void asm_output_float PARAMS ((FILE *, double));
-extern void asm_output_long PARAMS ((FILE *, long));
 extern void dsp16xx_file_start PARAMS ((void));
 extern void coff_dsp16xx_file_start PARAMS ((FILE *));
 extern void luxworks_dsp16xx_file_start PARAMS ((FILE *));
index 5e67f710e2972fc2fd2304cad2a4095d0033bf63..5cd1012e944b8e71f95b03547a365f40169167f8 100644 (file)
@@ -151,6 +151,13 @@ static void dsp16xx_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void dsp16xx_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_BYTE_OP
+#define TARGET_ASM_BYTE_OP "\tint\t"
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP NULL
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP NULL
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE dsp16xx_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
@@ -2281,20 +2288,6 @@ asm_output_float (file, fp_const)
 #endif
 }
 
-void
-asm_output_long (file, value)
-     FILE *file;
-     long value;
-{
-      fputs ("\tint ", file);
-#ifdef WORDS_BIG_ENDIAN
-      fprintf (file, "0x%-4.4lx, 0x%-4.4lx", (value >> 16) & 0xffff, (value & 0xffff));
-#else
-      fprintf (file, "0x%-4.4lx, 0x%-4.4lx", (value & 0xffff), (value >> 16) & 0xffff);
-#endif
-      fputs ("\n", file);
-}
-
 int
 dsp16xx_address_cost (addr)
      rtx addr;
index 215b45237c3754df71dca687a61be05f3e2bb9ba..af05183d0d47d83ea11495d29a414777b1987d02 100644 (file)
@@ -1648,21 +1648,6 @@ const_section ()                                                   \
    size HFmode.  */
 #define ASM_OUTPUT_SHORT_FLOAT(FILE,VALUE)  asm_output_float (FILE, VALUE)
 
-/* This is how to output an assembler line defining an `char' constant.  */
-#define ASM_OUTPUT_CHAR(FILE,VALUE)              \
-( fprintf (FILE, "\tint "),                    \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "\n"))
-
-/* This is how to output an assembler line defining an `short' constant.  */
-#define ASM_OUTPUT_SHORT(FILE,EXP)   asm_output_long(FILE,INTVAL(EXP))
-
-/* This is how to output an assembler line defining a 'int' constant.  */
-#define ASM_OUTPUT_INT(FILE, EXP)    asm_output_long(FILE,INTVAL(EXP))
-
-/* This is how to output an assembler line for a numeric constant byte.  */
-#define ASM_OUTPUT_BYTE(FILE,VALUE)    ASM_OUTPUT_CHAR(FILE,GEN_INT(VALUE))
-
 /* This is how we output a 'c' character string. For the 16xx
    assembler we have to do it one letter at a time */
 
index 003fca26d9a0940cdf6ad242f086007df1d16483..d09bdbc8d9138c915d538bf2f717a01ad5b9e2fe 100644 (file)
@@ -88,9 +88,6 @@ Boston, MA 02111-1307, USA.  */
 
 #define IDENT_ASM_OP "\t.ident\t"
 
-#undef  ASM_BYTE_OP
-#define ASM_BYTE_OP    "\t.byte\t"
-
 #undef  SET_ASM_OP
 #define SET_ASM_OP     "\t.set\t"
 
index 7e8a24c1205dc9429de1cdf6259e26ba6cfc7c93..c2b9c57e2d58e9cbafe5332f4233caf6bf5e8acd 100644 (file)
@@ -42,10 +42,20 @@ static const char *const cmp_tab[] = {
     "gt", "gt", "eq", "eq", "ge", "ge", "lt", "lt", "ne", "ne",
     "le", "le" };
 
+static bool elxsi_assemble_integer PARAMS ((rtx, unsigned int, int));
 static void elxsi_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void elxsi_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_BYTE_OP
+#define TARGET_ASM_BYTE_OP NULL
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP NULL
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP NULL
+#undef TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER elxsi_assemble_integer
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE elxsi_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
@@ -53,6 +63,30 @@ static void elxsi_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
+/* Target hook for assembling integer objects.  The ELXSI assembler
+   syntax uses a suffix to indicate the size of data, so we can't use
+   the usual string hooks.  */
+
+static bool
+elxsi_assemble_integer (x, size, aligned_p)
+     rtx x;
+     unsigned int size;
+     int aligned_p;
+{
+  if (aligned_p)
+    switch (size)
+      {
+      case 1:
+      case 2:
+      case 4:
+       fputs ("\t.data\t", asm_out_file);
+       output_addr_const (asm_out_file, x);
+       fprintf (asm_out_file, "{%d}\n", size * BITS_PER_UNIT);
+       return true;
+      }
+  return default_assemble_integer (x, size, aligned_p);
+}
+\f
 /* Generate the assembly code for function entry.  FILE is a stdio
    stream to output the code to.  SIZE is an int: how many units of
    temporary storage to allocate.
index 16cd8981a6c9132ab19f15d0855e241d367f6956..13e39d8b7f044f1e1df7fdcd60a359d590d61f09 100644 (file)
@@ -747,50 +747,6 @@ enum reg_class { NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES };
   tem.f = (VALUE);                                             \
   fprintf (FILE, "\t.data %d{32}\n", tem.i); }
 
-/* This is how to output an assembler line defining an `int' constant.  */
-
-#define ASM_OUTPUT_INT(FILE,VALUE)  \
-( \
-       fprintf (FILE, "\t.data\t"),                    \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "{32}\n"))
-
-#define ASM_OUTPUT_DOUBLE_INT(FILE,VALUE)                      \
-{                                                              \
-       fprintf (FILE, "\t.data\t");                            \
-       if (GET_CODE (VALUE) == CONST_DOUBLE)                   \
-       {                                                       \
-               fprintf (FILE, "%d", CONST_DOUBLE_HIGH (VALUE)); \
-               fprintf (FILE, "{32}, ");                       \
-               fprintf (FILE, "%d", CONST_DOUBLE_LOW (VALUE)); \
-               fprintf (FILE, "{32}\n");                       \
-       } else if (GET_CODE (VALUE) == CONST_INT)               \
-       {                                                       \
-               int val = INTVAL (VALUE);                       \
-               fprintf (FILE, "%d", val < 0 ? -1 : 0);         \
-               fprintf (FILE, "{32}, ");                       \
-               fprintf (FILE, "%d", val);                      \
-               fprintf (FILE, "{32}\n");                       \
-       } else abort ();                                        \
-}
-
-/* Likewise for `char' and `short' constants.  */
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE)  \
-( fprintf (FILE, "\t.data\t"),                 \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "{16}\n"))
-
-#define ASM_OUTPUT_CHAR(FILE,VALUE)  \
-( fprintf (FILE, "\t.data\t"),                 \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "{8}\n"))
-
-/* This is how to output an assembler line for a numeric constant byte.  */
-
-#define ASM_OUTPUT_BYTE(FILE,VALUE)  \
-  fprintf (FILE, "\t.data\t%d{8}\n", (VALUE))
-
 /* This is how to output an insn to push a register on the stack.
    It need not be very fast code.  */
 
index d50499150d7792400b5f2005f13a91ce22881570..c386297a6465565612f91a4938cfe95055634772 100644 (file)
@@ -141,6 +141,10 @@ static rtx fr30_pass_by_value PARAMS ((tree, tree));
 #endif
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
 
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
index 3c7b46bfb2728050c381cbae4b8b0fe27a5c6048..b8f84f7d834436602f0a3a13aded9a7a616c86af 100644 (file)
@@ -1444,43 +1444,6 @@ do                                                                               \
               t[0], ASM_COMMENT_START, str, t[1]);             \
     }                                                          \
   while (0)
-
-/* This is how to output an assembler line defining a `char' constant.  */
-#define ASM_OUTPUT_CHAR(FILE, VALUE)           \
-  do                                           \
-    {                                          \
-      fprintf (FILE, "\t.byte\t");             \
-      output_addr_const (FILE, (VALUE));       \
-      fprintf (FILE, "\n");                    \
-    }                                          \
-  while (0)
-
-/* This is how to output an assembler line defining a `short' constant.  */
-#define ASM_OUTPUT_SHORT(FILE, VALUE)          \
-  do                                           \
-    {                                          \
-      fprintf (FILE, "\t.hword\t");            \
-      output_addr_const (FILE, (VALUE));       \
-      fprintf (FILE, "\n");                    \
-    }                                          \
-  while (0)
-
-/* This is how to output an assembler line defining an `int' constant.
-   We also handle symbol output here.  */
-#define ASM_OUTPUT_INT(FILE, VALUE)            \
-  do                                           \
-    {                                          \
-      fprintf (FILE, "\t.word\t");             \
-      output_addr_const (FILE, (VALUE));       \
-      fprintf (FILE, "\n");                    \
-    }                                          \
-  while (0)
-
-/* A C statement to output to the stdio stream STREAM an assembler instruction
-   to assemble a single byte containing the number VALUE.  */
-#define ASM_OUTPUT_BYTE(STREAM, VALUE) \
-  fprintf (STREAM, "%s0x%x\n", ASM_BYTE_OP, (VALUE))
-
 /*}}}*/ \f
 /*{{{  Output and Generation of Labels.  */ 
 
index 2df15e2945df4a8e3704cf030253100a6ca90146..e16c54ca3f6bf246f7da38cd0b3db13b89aae3bd 100644 (file)
@@ -106,6 +106,9 @@ const char *h8_push_op, *h8_pop_op, *h8_mov_op;
 #undef TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE h8300_attribute_table
 
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE h8300_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
index d27c987a2d99bbd33d6cd12ac84b7d5bf6c6e829..0535d5f2c0d22be3c5454808234bdba8f7c44225 100644 (file)
@@ -1270,29 +1270,6 @@ readonly_data ()                                                 \
     }                                                          \
   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", (VALUE))
-
 /* This is how to output an insn to push a register on the stack.
    It need not be very fast code.  */
 
index bbe27823e0ae95f94f5c8f421ed4d74db7695cc0..81be7bd902601f3fcbb7995a8de3b7c68fd6a3ec 100644 (file)
@@ -99,6 +99,9 @@ static FILE *assembler_source = 0;
 
 static label_node_t * mvs_get_label PARAMS ((int));
 static void i370_label_scan PARAMS ((void));
+#ifdef TARGET_HLASM
+static bool i370_hlasm_assemble_integer PARAMS ((rtx, unsigned int, int));
+#endif
 static void i370_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void i370_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 #ifdef LONGEXTERNAL
@@ -288,6 +291,17 @@ static const unsigned char ebcasc[256] =
 };
 \f
 /* Initialize the GCC target structure.  */
+#ifdef TARGET_HLASM
+#undef TARGET_ASM_BYTE_OP
+#define TARGET_ASM_BYTE_OP NULL
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP NULL
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP NULL
+#undef TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER i370_hlasm_assemble_integer
+#endif
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE i370_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
@@ -1176,6 +1190,54 @@ unsigned_jump_follows_p (insn)
     }
 }
 
+#ifdef TARGET_HLASM
+
+/* Target hook for assembling integer objects.  This version handles all
+   objects when TARGET_HLASM is defined.  */
+
+static bool
+i370_hlasm_assemble_integer (x, size, aligned_p)
+     rtx x;
+     unsigned int size;
+     int aligned_p;
+{
+  const char *int_format = NULL;
+
+  if (aligned_p)
+    switch (size)
+      {
+      case 1:
+       int_format = "\tDC\tX'%02X'\n";
+       break;
+
+      case 2:
+       int_format = "\tDC\tX'%04X'\n";
+       break;
+
+      case 4:
+       if (GET_CODE (x) == CONST_INT)
+         {
+           fputs ("\tDC\tF'", asm_out_file);
+           output_addr_const (asm_out_file, x);
+           fputs ("'\n", asm_out_file);
+         }
+       else
+         {
+           fputs ("\tDC\tA(", asm_out_file);
+           output_addr_const (asm_out_file, x);
+           fputs (")\n", asm_out_file);
+         }
+       return true;
+      }
+
+  if (int_format && GET_CODE (x) == CONST_INT)
+    {
+      fprintf (asm_out_file, int_format, INTVAL (x));
+      return true;
+    }
+  return default_assemble_integer (x, size, aligned_p);
+}
+
 /* Generate the assembly code for function entry.  FILE is a stdio
    stream to output the code to.  SIZE is an int: how many units of
    temporary storage to allocate.
@@ -1185,8 +1247,6 @@ unsigned_jump_follows_p (insn)
    used in the function.  This function is responsible for knowing
    which registers should not be saved even if used.  */
 
-#ifdef TARGET_HLASM
-
 static void
 i370_output_function_prologue (f, l)
      FILE *f;
index 044fd5ac3d04519fc0c840292d60a41e886bb8a8..826382fbe6076935126a11b56347b3e6aa5715a7 100644 (file)
@@ -629,16 +629,16 @@ enum reg_class
 
 #define TRAMPOLINE_TEMPLATE(FILE)                                      \
 {                                                                      \
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x05E0));                           \
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x5800 | STATIC_CHAIN_REGNUM << 4)); \
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0xE00A));                           \
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x58F0));                           \
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0xE00E));                           \
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x07FF));                           \
-  ASM_OUTPUT_SHORT (FILE, const0_rtx);                                 \
-  ASM_OUTPUT_SHORT (FILE, const0_rtx);                                 \
-  ASM_OUTPUT_SHORT (FILE, const0_rtx);                                 \
-  ASM_OUTPUT_SHORT (FILE, const0_rtx);                                 \
+  assemble_aligned_integer (2, GEN_INT (0x05E0));                      \
+  assemble_aligned_integer (2, GEN_INT (0x5800 | STATIC_CHAIN_REGNUM << 4)); \
+  assemble_aligned_integer (2, GEN_INT (0xE00A));                      \
+  assemble_aligned_integer (2, GEN_INT (0x58F0));                      \
+  assemble_aligned_integer (2, GEN_INT (0xE00E));                      \
+  assemble_aligned_integer (2, GEN_INT (0x07FF));                      \
+  assemble_aligned_integer (2, const0_rtx);                            \
+  assemble_aligned_integer (2, const0_rtx);                            \
+  assemble_aligned_integer (2, const0_rtx);                            \
+  assemble_aligned_integer (2, const0_rtx);                            \
 }
 
 /* Length in units of the trampoline for entering a nested function.  */
@@ -1191,39 +1191,6 @@ enum reg_class
 #define ASM_OUTPUT_FLOAT(FILE, VALUE)                                  \
   fprintf (FILE, "\tDC\tE'%.9G'\n", (VALUE))
 
-/* This outputs an integer, if not a CONST_INT must be address constant.  */
-
-#define ASM_OUTPUT_INT(FILE, EXP)                                      \
-{                                                                      \
-  if (GET_CODE (EXP) == CONST_INT)                                     \
-    {                                                                  \
-      fprintf (FILE, "\tDC\tF'");                                      \
-      output_addr_const (FILE, EXP);                                   \
-      fprintf (FILE, "'\n");                                           \
-    }                                                                  \
-  else                                                                 \
-    {                                                                  \
-      fprintf (FILE, "\tDC\tA(");                                      \
-      output_addr_const (FILE, EXP);                                   \
-      fprintf (FILE, ")\n");                                           \
-    }                                                                  \
-}
-
-/* This outputs a short integer.  */
-
-#define ASM_OUTPUT_SHORT(FILE, EXP)                                    \
-{                                                                      \
-  fprintf (FILE, "\tDC\tX'%04X'\n", INTVAL(EXP) & 0xFFFF);             \
-}
-
-/* This outputs a byte sized integer.  */
-
-#define ASM_OUTPUT_CHAR(FILE, EXP)                                     \
-  fprintf (FILE, "\tDC\tX'%02X'\n", INTVAL (EXP) )
-
-#define ASM_OUTPUT_BYTE(FILE, VALUE)                                   \
-  fprintf (FILE, "\tDC\tX'%02X'\n", VALUE)
-
 /* This outputs a text string.  The string are chopped up to fit into
    an 80 byte record.  Also, control and special characters, interpreted
    by the IBM assembler, are output numerically.  */
@@ -1898,9 +1865,6 @@ abort(); \
 #undef ASM_OUTPUT_EXTERNAL
 
 #define ASM_DOUBLE "\t.double"     
-#define ASM_LONG "\t.long"
-#define ASM_SHORT "\t.short"
-#define ASM_BYTE "\t.byte"
 
 /* Argument to the flt pt. macros is a REAL_VALUE_TYPE which 
    may or may not be a float/double, depending on whther we
@@ -1920,28 +1884,6 @@ abort(); \
 }
 
 
-/* This is how to output an assembler line defining an `int' constant.  */
-#define ASM_OUTPUT_INT(FILE,VALUE)  \
-( fprintf (FILE, "%s ", ASM_LONG),              \
-  output_addr_const (FILE,(VALUE)),             \
-  putc('\n',FILE))
-
-/* Likewise for `char' and `short' constants.  */
-#define ASM_OUTPUT_SHORT(FILE,VALUE)  \
-( fprintf (FILE, "%s ", ASM_SHORT),             \
-  output_addr_const (FILE,(VALUE)),             \
-  putc('\n',FILE))
-
-
-#define ASM_OUTPUT_CHAR(FILE,VALUE)  \
-( fprintf (FILE, "%s", ASM_BYTE_OP),            \
-  output_addr_const (FILE, (VALUE)),            \
-  putc ('\n', FILE))
-
-/* This is how to output an assembler line for a numeric constant byte.  */
-#define ASM_OUTPUT_BYTE(FILE,VALUE)  \
-  fprintf ((FILE), "%s0x%x\n", ASM_BYTE_OP, (VALUE))
 /* This is how to output the definition of a user-level label named NAME,
    such as the label on a static function or variable NAME.  */
 #define ASM_OUTPUT_LABEL(FILE,NAME)     \
index 2726f7ba5b9237c2488ec48ccbaf8281805d2aae..df47f891cfd7c88a7ad78938d711dc30e9ad0e20 100644 (file)
@@ -41,7 +41,7 @@ do                                                            \
 { size_t i = 0, limit = (SIZE);                                \
   while (i < limit)                                            \
     { if (i%10 == 0) { if (i!=0) fprintf ((FILE), "\n");       \
-                      fprintf ((FILE), "%s", ASM_BYTE_OP); }   \
+                      fputs ("\t.byte\t", (FILE)); }           \
       else fprintf ((FILE), ",");                              \
        fprintf ((FILE), "0x%x", ((PTR)[i++] & 0377)) ;}        \
       fprintf ((FILE), "\n");                                  \
index 6473cae88f79cd0e2ceb996eb5a53a2feb607c25..c58db1b3e8e596698454d64adff06780a368a22a 100644 (file)
@@ -40,7 +40,6 @@ Boston, MA 02111-1307, USA.  */
 
 /* Assembler pseudos to introduce constants of various size.  */
 
-#define ASM_BYTE_OP "\t.byte\t"
 #define ASM_SHORT "\t.word\t"
 #define ASM_LONG "\t.long\t"
 #define ASM_QUAD "\t.quad\t"  /* Should not be used for 32bit compilation.  */
index cc4aa5c765bd2c439cd350f8c647a50f4e6b18d0..36b4639346f345f9052e40aae7f2261c353caccf 100644 (file)
@@ -62,18 +62,6 @@ Boston, MA 02111-1307, USA.  */
 #undef TEXT_SECTION_ASM_OP
 #define TEXT_SECTION_ASM_OP "\t.section .text"
 
-/* How to output an unaligned integer.  */
-#undef UNALIGNED_INT_ASM_OP
-#define UNALIGNED_INT_ASM_OP "\t.long\t"
-
-/* How to output an unaligned double length integer.  */
-#undef UNALIGNED_DOUBLE_INT_ASM_OP
-#define UNALIGNED_DOUBLE_INT_ASM_OP "\t.quad\t"
-
-/* How to output an unaligned half length intenger.  */
-#undef UNALIGNED_SHORT_ASM_OP
-#define UNALIGNED_SHORT_ASM_OP "\t.short\t"
-
 /* Define standard DJGPP installation paths.                             */
 /* We override default /usr or /usr/local part with /dev/env/DJDIR which */
 /* points to actual DJGPP instalation directory.                         */
index aa65281cf5f2e9bb8db752cf1af2b6ac6bf03e59..0c60bdafd8d991a66b585bbf951115d23cfd7a57 100644 (file)
@@ -784,6 +784,22 @@ static enum x86_64_reg_class merge_classes PARAMS ((enum x86_64_reg_class,
 #undef TARGET_ASM_CLOSE_PAREN
 #define TARGET_ASM_CLOSE_PAREN ""
 
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP ASM_SHORT
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP ASM_LONG
+#ifdef ASM_QUAD
+#undef TARGET_ASM_ALIGNED_DI_OP
+#define TARGET_ASM_ALIGNED_DI_OP ASM_QUAD
+#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_UNALIGNED_DI_OP
+#define TARGET_ASM_UNALIGNED_DI_OP TARGET_ASM_ALIGNED_DI_OP
+
 #undef TARGET_SCHED_ADJUST_COST
 #define TARGET_SCHED_ADJUST_COST ix86_adjust_cost
 #undef TARGET_SCHED_ISSUE_RATE
index a95a23e77700cdd2c0c78bd70ec85e6f5813ea55..b38bdcaa6295591582db489c2515fa508b02c345 100644 (file)
@@ -2912,42 +2912,6 @@ do { long l;                                             \
 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),   \
   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
 
-/* This is how to output an assembler line defining an `int' constant.  */
-
-#define ASM_OUTPUT_INT(FILE,VALUE)  \
-( fputs (ASM_LONG, FILE),                      \
-  output_addr_const (FILE,(VALUE)),            \
-  putc('\n',FILE))
-
-#define ASM_OUTPUT_DOUBLE_INT(FILE,VALUE)  \
-( fprintf (FILE, "%s\t", ASM_QUAD),            \
-  output_addr_const (FILE,(VALUE)),            \
-  putc('\n',FILE))
-
-/* Likewise for `char' and `short' constants.  */
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE)  \
-( fputs (ASM_SHORT, FILE),                     \
-  output_addr_const (FILE,(VALUE)),            \
-  putc('\n',FILE))
-
-#define ASM_OUTPUT_CHAR(FILE,VALUE)  \
-( fputs (ASM_BYTE_OP, FILE),                   \
-  output_addr_const (FILE, (VALUE)),           \
-  putc ('\n', FILE))
-
-/* Given that x86 natively supports unaligned data, it's reasonable to
-   assume that all x86 assemblers don't auto-align data.  Thus the 
-   unaligned output macros required by dwarf2 frame unwind information
-   degenerate to the macros used above.  */
-#define UNALIGNED_SHORT_ASM_OP         ASM_SHORT
-#define UNALIGNED_INT_ASM_OP           ASM_LONG
-
-/* This is how to output an assembler line for a numeric constant byte.  */
-
-#define ASM_OUTPUT_BYTE(FILE,VALUE)  \
-  asm_fprintf ((FILE), "%s0x%x\n", ASM_BYTE_OP, (int) (VALUE))
-
 /* This is how to output an insn to push a register on the stack.
    It need not be very fast code.  */
 
index 42bfcd30a13a06801b7d42e2977325c7b17665a0..b7d7b3d079b1bf1ee405b51ad5112c473b243448 100644 (file)
@@ -189,7 +189,7 @@ Boston, MA 02111-1307, USA.  */
   do {                                                                 \
     if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel)                \
       {                                                                        \
-        fputs (UNALIGNED_INT_ASM_OP, FILE);                            \
+        fputs (ASM_LONG, FILE);                        \
         assemble_name (FILE, XSTR (ADDR, 0));                          \
        fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
         goto DONE;                                                     \
index 16861a85bf2d970aa06efa894ac700ee4edddcb4..211ca366ab7a24641e57c7a69421d8d46b511b69 100644 (file)
@@ -35,9 +35,6 @@ Boston, MA 02111-1307, USA.  */
 #undef ASCII_DATA_ASM_OP
 #define ASCII_DATA_ASM_OP              "\t.ascii\t"
 
-#undef ASM_BYTE_OP
-#define ASM_BYTE_OP                    "\t.byte\t"
-
 #undef IDENT_ASM_OP
 #define IDENT_ASM_OP                   "\t.ident\t"
 
@@ -57,7 +54,6 @@ Boston, MA 02111-1307, USA.  */
 #define ASM_LONG                       "\t.long\t"
 
 #undef ASM_QUAD
-#undef ASM_OUTPUT_DOUBLE_INT
 
 #undef TYPE_ASM_OP
 #define TYPE_ASM_OP                    "\t.type\t"
@@ -349,7 +345,7 @@ do {                                                                        \
          else                                                          \
            {                                                           \
              if (bytes_in_chunk == 0)                                  \
-               fprintf ((FILE), "%s", ASM_BYTE_OP);                    \
+               fputs ("\t.byte\t", (FILE));                            \
              else                                                      \
                fputc (',', (FILE));                                    \
              fprintf ((FILE), "0x%02x", *_ascii_bytes);                \
@@ -846,7 +842,7 @@ do {                                                                        \
   do {                                                                 \
     if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel)                \
       {                                                                        \
-        fputs (UNALIGNED_INT_ASM_OP, FILE);                            \
+        fputs (ASM_LONG, FILE);                                                \
         assemble_name (FILE, XSTR (ADDR, 0));                          \
        fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
         goto DONE;                                                     \
index da3ad8f18ebfa78b37564ee8d7967f082d348f2d..ff1585e05d8ce367060373e03a914d6b6d06e68d 100644 (file)
@@ -156,7 +156,3 @@ Boston, MA 02111-1307, USA.  */
 
 #undef LOCAL_LABEL_PREFIX
 #define LOCAL_LABEL_PREFIX "."
-
-/* Override defaults.h and insist that Solaris/Intel doesn't have
-   an eight byte data output directive.  */
-#define UNALIGNED_DOUBLE_INT_ASM_OP NULL
index 0487aa510fe5d0e370d4d0258b07061509dee5ea..d280d583cbeece2898c5c502e32d882c6581e2b4 100644 (file)
@@ -33,7 +33,6 @@ Boston, MA 02111-1307, USA.  */
 
 /* Assembler pseudos to introduce constants of various size.  */
 
-#define ASM_BYTE_OP "\t.byte\t"
 #define ASM_SHORT "\t.value\t"
 #define ASM_LONG "\t.long\t"
 #define ASM_QUAD "\t.quad\t"  /* Should not be used for 32bit compilation.  */
@@ -46,7 +45,7 @@ do                                                            \
 { size_t i = 0, limit = (SIZE);                                \
   while (i < limit)                                            \
     { if (i%10 == 0) { if (i!=0) fprintf ((FILE), "\n");       \
-                      fprintf ((FILE), "%s", ASM_BYTE_OP); }   \
+                      fputs ("\t.byte\t", (FILE)); }           \
       else fprintf ((FILE), ",");                              \
       fprintf ((FILE), "0x%x", ((PTR)[i++] & 0377)) ;}         \
       fprintf ((FILE), "\n");                                  \
index 4ccd74bc245108ea10cced4e6465be962609ad4b..0d44b1a23e4cd2e0fb68a4247c6b6588b53ab315 100644 (file)
@@ -170,7 +170,7 @@ do { long value[3];                                                 \
   do {                                                                 \
     if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel)                \
       {                                                                        \
-        fputs (UNALIGNED_INT_ASM_OP, FILE);                            \
+        fputs (ASM_LONG, FILE);                                                \
         assemble_name (FILE, XSTR (ADDR, 0));                          \
        fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
         goto DONE;                                                     \
index e86a91e2c2a1332815b5e4e03c0a0bc9cbec7824..b12cb123742786988d740c8f05798e23a4bb02c9 100644 (file)
@@ -339,9 +339,12 @@ Boston, MA 02111-1307, USA.  */
 #define ASM_FILE_END(FILE)                                     \
 do {                                                           \
      if (current_function_original_name != NULL) {             \
+       const char *long_op = integer_asm_op (4, FALSE);                \
        tdesc_section();                                                \
-       fprintf ((FILE), "%s __ETEXT\n", ASM_LONG);             \
-       fprintf ((FILE), "%s 0\n", ASM_LONG);                   \
+       fprintf ((FILE), "%s __ETEXT\n", long_op);              \
+       fprintf ((FILE), "%s 0\n", long_op);                    \
+       fputs ("\t.long\t__ETEXT\n", (FILE));                   \
+       fputs ("\t.long\t0\n", (FILE));                         \
        text_section();                                         \
        fputs("__ETEXT:\n", (FILE));                            \
      }                                                         \
index 29ee2884fc5cd3a0a5463054f446d08137126d36..dfc9f0d1ea38f33e7809a61b3a36e2af2ad86df5 100644 (file)
@@ -2003,6 +2003,9 @@ i860_output_function_epilogue (asm_file, local_bytes)
   register unsigned mask;
   unsigned intflags=0;
   register TDESC_flags *flags = (TDESC_flags *) &intflags;
+#ifdef OUTPUT_TDESC    /* Output an ABI-compliant TDESC entry */
+  const char *long_op = integer_asm_op (4, TRUE);
+#endif
 
   flags->version = 4;
   flags->reg_packing = 1;
@@ -2092,23 +2095,23 @@ i860_output_function_epilogue (asm_file, local_bytes)
   }
   assemble_name(asm_file,current_function_original_name);
   fputs(".TDESC:\n", asm_file);
-  fprintf(asm_file, "%s 0x%0x\n", ASM_LONG, intflags);
-  fprintf(asm_file, "%s %d\n", ASM_LONG,
+  fprintf(asm_file, "%s 0x%0x\n", long_op, intflags);
+  fprintf(asm_file, "%s %d\n", long_op,
        int_restored ? must_preserve_bytes : 0);
   if (flags->version > 1) {
-    fprintf(asm_file, "%s %d\n", ASM_LONG,
+    fprintf(asm_file, "%s %d\n", long_op,
        (restored_so_far == int_restored) ? 0 : must_preserve_bytes +
          (4 * int_restored));
     if (flags->version > 2) {
-      fprintf(asm_file, "%s %d\n", ASM_LONG, frame_upper_bytes);
+      fprintf(asm_file, "%s %d\n", long_op, frame_upper_bytes);
       if (flags->version > 3)
-       fprintf(asm_file, "%s %d\n", ASM_LONG, frame_lower_bytes);
+       fprintf(asm_file, "%s %d\n", long_op, frame_lower_bytes);
     }
   }
   tdesc_section();
-  fprintf(asm_file, "%s ", ASM_LONG);
+  fprintf(asm_file, "%s ", long_op);
   assemble_name(asm_file, current_function_original_name);
-  fprintf(asm_file, "\n%s ", ASM_LONG);
+  fprintf(asm_file, "\n%s ", long_op);
   assemble_name(asm_file, current_function_original_name);
   fputs(".TDESC\n", asm_file);
   text_section();
index 106d512b06801cb6943aa1ed29c065c117ba78c6..aec2f2c0a759861573b4098507b45bbfa065f295 100644 (file)
@@ -614,11 +614,11 @@ struct cumulative_args { int ints, floats; };
      or #BOTTOM_OF_STATIC,r29,r29  */
 #define TRAMPOLINE_TEMPLATE(FILE)                                      \
 {                                                                      \
-  ASM_OUTPUT_INT (FILE, GEN_INT (0xec1f0000)); \
-  ASM_OUTPUT_INT (FILE, GEN_INT (0xe7ff0000)); \
-  ASM_OUTPUT_INT (FILE, GEN_INT (0xec1d0000)); \
-  ASM_OUTPUT_INT (FILE, GEN_INT (0x4000f800)); \
-  ASM_OUTPUT_INT (FILE, GEN_INT (0xe7bd0000)); \
+  assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0xec1f0000));     \
+  assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0xe7ff0000));     \
+  assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0xec1d0000));     \
+  assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0x4000f800));     \
+  assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0xe7bd0000));     \
 }
 
 /* Length in units of the trampoline for entering a nested function.  */
@@ -975,9 +975,6 @@ struct cumulative_args { int ints, floats; };
 
 /* Assembler pseudos to introduce constants of various size.  */
 
-#define ASM_BYTE_OP "\t.byte\t"
-#define ASM_SHORT "\t.short"
-#define ASM_LONG "\t.long"
 #define ASM_DOUBLE "\t.double"
 
 /* Output at beginning of assembler file.  */
@@ -1085,30 +1082,6 @@ do { ASM_OUTPUT_ALIGN ((FILE), 2);                                       \
 #define ASM_OUTPUT_FLOAT(FILE,VALUE)  \
   fprintf (FILE, "\t.float %.12e\n", (VALUE))
 
-/* 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.short "),                 \
-  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", (VALUE))
-
 /* This is how to output code to push a register on the stack.
    It need not be very fast code.  */
 
index f0f925bcb4a3427d5c8e524bd8a800b8a6dd9c71..2a374fc5ff6b75fdc694dc8df88fd1f48b1f2182 100644 (file)
@@ -133,7 +133,7 @@ Boston, MA 02111-1307, USA.  */
                  fprintf ((FILE), "\"\n");                     \
                  bytes_in_chunk = 0;                           \
                }                                               \
-             fprintf ((FILE), "%s%d\n", ASM_BYTE_OP, ch);      \
+             assemble_aligned_integer (1, GEN_INT (ch));       \
            }                                                   \
           else                                                 \
            {                                                   \
index 840da5a0dff43c13e23b718067b1d2ba9aa1fe6f..cc26176c963383483ce807db35a2eaa8c3812eeb 100644 (file)
@@ -113,7 +113,7 @@ extern const char *current_function_original_name;
                  fprintf ((FILE), "\"\n");                             \
                  bytes_in_chunk = 0;                                   \
                }                                                       \
-             fprintf ((FILE), "%s%d\n", ASM_BYTE_OP, ch);              \
+             assemble_aligned_integer (1, GEN_INT (ch));               \
            }                                                           \
           else                                                         \
            {                                                           \
index 68d9edac69dccdf0443fd9dc492dabc2a51f42c2..ffa28d58161f41368a7f881726bb5f0b1d0a8bac 100644 (file)
@@ -93,6 +93,9 @@ static int ret_label = 0;
  || current_function_varargs)
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE i960_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
index 11842959987b6150212ae7a4130bdd29e58cce7b..12cf09c787ff57aba087ae191692dabe5beca600 100644 (file)
@@ -1401,30 +1401,6 @@ extern struct rtx_def *i960_compare_op0, *i960_compare_op1;
 
 #define ASM_OUTPUT_FLOAT(FILE,VALUE)  i960_output_float(FILE, VALUE)
 
-/* This is how to output an assembler line defining an `int' constant.  */
-
-#define ASM_OUTPUT_INT(FILE,VALUE)  \
-( fprintf (FILE, "\t.word "),                  \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "\n"))
-
-/* Likewise for `char' and `short' constants.  */
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE)  \
-( fprintf (FILE, "\t.short "),                 \
-  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", (VALUE))
-
 #define ASM_OUTPUT_REG_PUSH(FILE,REGNO)  \
   fprintf (FILE, "\tst\t%s,(sp)\n\taddo\t4,sp,sp\n", reg_names[REGNO])
 
@@ -1558,11 +1534,11 @@ extern struct rtx_def *i960_compare_op0, *i960_compare_op1;
 
 #define TRAMPOLINE_TEMPLATE(FILE)                                      \
 {                                                                      \
-  ASM_OUTPUT_INT (FILE, GEN_INT (0x8C203000)); \
-  ASM_OUTPUT_INT (FILE, GEN_INT (0x00000000)); \
-  ASM_OUTPUT_INT (FILE, GEN_INT (0x8CE03000)); \
-  ASM_OUTPUT_INT (FILE, GEN_INT (0x00000000)); \
-  ASM_OUTPUT_INT (FILE, GEN_INT (0x84212000)); \
+  assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0x8C203000));     \
+  assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0x00000000));     \
+  assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0x8CE03000));     \
+  assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0x00000000));     \
+  assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0x84212000));     \
 }
 
 /* Length in units of the trampoline for entering a nested function.  */
index b7d3919bd4b9e4b9103824ab439a5f8907fe2ead..c46fe1262ca0547a3e36936ae188c3b66bf9ae36 100644 (file)
@@ -139,6 +139,7 @@ static rtx ia64_expand_lock_test_and_set PARAMS ((enum machine_mode,
                                                  tree, rtx));
 static rtx ia64_expand_lock_release PARAMS ((enum machine_mode, tree, rtx));
 const struct attribute_spec ia64_attribute_table[];
+static bool ia64_assemble_integer PARAMS ((rtx, unsigned int, int));
 static void ia64_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void ia64_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 static void ia64_output_function_end_prologue PARAMS ((FILE *));
@@ -165,6 +166,23 @@ static rtx ia64_cycle_display PARAMS ((int, rtx));
 #undef TARGET_EXPAND_BUILTIN
 #define TARGET_EXPAND_BUILTIN ia64_expand_builtin
 
+#undef TARGET_ASM_BYTE_OP
+#define TARGET_ASM_BYTE_OP "\tdata1\t"
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\tdata2\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\tdata4\t"
+#undef TARGET_ASM_ALIGNED_DI_OP
+#define TARGET_ASM_ALIGNED_DI_OP "\tdata8\t"
+#undef TARGET_ASM_UNALIGNED_HI_OP
+#define TARGET_ASM_UNALIGNED_HI_OP "\tdata2.ua\t"
+#undef TARGET_ASM_UNALIGNED_SI_OP
+#define TARGET_ASM_UNALIGNED_SI_OP "\tdata4.ua\t"
+#undef TARGET_ASM_UNALIGNED_DI_OP
+#define TARGET_ASM_UNALIGNED_DI_OP "\tdata8.ua\t"
+#undef TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER ia64_assemble_integer
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE ia64_output_function_prologue
 #undef TARGET_ASM_FUNCTION_END_PROLOGUE
@@ -2589,6 +2607,28 @@ ia64_hard_regno_rename_ok (from, to)
   return 1;
 }
 
+/* Target hook for assembling integer objects.  Handle word-sized
+   aligned objects and detect the cases when @fptr is needed.  */
+
+static bool
+ia64_assemble_integer (x, size, aligned_p)
+     rtx x;
+     unsigned int size;
+     int aligned_p;
+{
+  if (size == UNITS_PER_WORD && aligned_p
+      && !(TARGET_NO_PIC || TARGET_AUTO_PIC)
+      && GET_CODE (x) == SYMBOL_REF
+      && SYMBOL_REF_FLAG (x))
+    {
+      fputs ("\tdata8\t@fptr(", asm_out_file);
+      output_addr_const (asm_out_file, x);
+      fputs (")\n", asm_out_file);
+      return true;
+    }
+  return default_assemble_integer (x, size, aligned_p);
+}
+
 /* Emit the function prologue.  */
 
 static void
index 49e50a44ff550b8b46c0a460aef3c74e8ebe679f..24fdba1483d016ff75f920cb45381216ec7e98d1 100644 (file)
@@ -1944,54 +1944,6 @@ do {                                                             \
     fprintf (FILE, "\tdata4 0x%lx\n", t & 0xffffffff);         \
 } while (0)
   
-/* A C statement to output to the stdio stream STREAM an assembler instruction
-   to assemble an integer of 1, 2, 4, or 8 bytes, respectively, whose value
-   is VALUE.  */
-
-/* This is how to output an assembler line defining a `char' constant.  */
-
-#define ASM_OUTPUT_CHAR(FILE, VALUE)                                   \
-do {                                                                   \
-  fprintf (FILE, "%s", ASM_BYTE_OP);                                   \
-  output_addr_const (FILE, (VALUE));                                   \
-  fprintf (FILE, "\n");                                                        \
-} while (0)
-
-/* This is how to output an assembler line defining a `short' constant.  */
-
-#define ASM_OUTPUT_SHORT(FILE, VALUE)                                  \
-do {                                                                   \
-  fprintf (FILE, "\tdata2\t");                                         \
-  output_addr_const (FILE, (VALUE));                                   \
-  fprintf (FILE, "\n");                                                        \
-} while (0)
-
-/* This is how to output an assembler line defining an `int' constant.
-   We also handle symbol output here.  */
-
-/* ??? For ILP32, also need to handle function addresses here.  */
-
-#define ASM_OUTPUT_INT(FILE, VALUE)                                    \
-do {                                                                   \
-  fprintf (FILE, "\tdata4\t");                                         \
-  output_addr_const (FILE, (VALUE));                                   \
-  fprintf (FILE, "\n");                                                        \
-} while (0)
-
-/* This is how to output an assembler line defining a `long' constant.
-   We also handle symbol output here.  */
-
-#define ASM_OUTPUT_DOUBLE_INT(FILE, VALUE)                             \
-do {                                                                   \
-  fprintf (FILE, "\tdata8\t");                                         \
-  if (!(TARGET_NO_PIC || TARGET_AUTO_PIC) && SYMBOL_REF_FLAG (VALUE))  \
-    fprintf (FILE, "@fptr(");                                          \
-  output_addr_const (FILE, (VALUE));                                   \
-  if (!(TARGET_NO_PIC || TARGET_AUTO_PIC) && SYMBOL_REF_FLAG (VALUE))  \
-    fprintf (FILE, ")");                                               \
-  fprintf (FILE, "\n");                                                        \
-} while (0)
-
 /* This is how to output an assembler line defining a `char' constant
    to an xdata segment.  */
 
@@ -2044,12 +1996,6 @@ do {                                                                     \
 } while (0)
 
 
-/* A C statement to output to the stdio stream STREAM an assembler instruction
-   to assemble a single byte containing the number VALUE.  */
-
-#define ASM_OUTPUT_BYTE(STREAM, VALUE) \
-  fprintf (STREAM, "%s0x%x\n", ASM_BYTE_OP, (int)(VALUE) & 0xff)
-
 \f
 /* Output of Uninitialized Variables.  */
 
@@ -2361,9 +2307,7 @@ do {                                                                      \
       reltag = "@gprel(";                                              \
     if (reltag)                                                                \
       {                                                                        \
-       fputs (((SIZE) == 4 ? UNALIGNED_INT_ASM_OP                      \
-               : (SIZE) == 8 ? UNALIGNED_DOUBLE_INT_ASM_OP             \
-               : (abort (), "")), FILE);                               \
+       fputs (integer_asm_op (SIZE, FALSE), FILE);                     \
        fputs (reltag, FILE);                                           \
        assemble_name (FILE, XSTR (ADDR, 0));                           \
        fputc (')', FILE);                                              \
@@ -2425,13 +2369,6 @@ do {                                                                     \
 
 #define DWARF2_DEBUGGING_INFO
 
-/* C string constants giving the pseudo-op to use for a sequence of
-   2, 4, and 8 byte unaligned constants.  dwarf2out.c needs these.  */
-
-#define UNALIGNED_SHORT_ASM_OP         "\tdata2.ua\t"
-#define UNALIGNED_INT_ASM_OP           "\tdata4.ua\t"
-#define UNALIGNED_DOUBLE_INT_ASM_OP    "\tdata8.ua\t"
-
 #define DWARF2_ASM_LINE_DEBUG_INFO (TARGET_DWARF2_ASM)
 
 /* Use tags for debug info labels, so that they don't break instruction
@@ -2447,9 +2384,7 @@ do {                                                                      \
    proper relocations for them.  */
 #define ASM_OUTPUT_DWARF_OFFSET(FILE, SIZE, LABEL)     \
   do {                                                 \
-    fputs (((SIZE) == 4 ? UNALIGNED_INT_ASM_OP         \
-           : (SIZE) == 8 ? UNALIGNED_DOUBLE_INT_ASM_OP \
-           : (abort (), "")), FILE);                   \
+    fputs (integer_asm_op (SIZE, FALSE), FILE);                \
     fputs ("@secrel(", FILE);                          \
     assemble_name (FILE, LABEL);                       \
     fputc (')', FILE);                                 \
@@ -2458,9 +2393,7 @@ do {                                                                      \
 /* Emit a PC-relative relocation.  */
 #define ASM_OUTPUT_DWARF_PCREL(FILE, SIZE, LABEL)      \
   do {                                                 \
-    fputs (((SIZE) == 4 ? UNALIGNED_INT_ASM_OP         \
-           : (SIZE) == 8 ? UNALIGNED_DOUBLE_INT_ASM_OP \
-           : (abort (), "")), FILE);                   \
+    fputs (integer_asm_op (SIZE, FALSE), FILE);                \
     fputs ("@pcrel(", FILE);                           \
     assemble_name (FILE, LABEL);                       \
     fputc (')', FILE);                                 \
index 8159d54a1fb471127b0b4127f5dddb56904fd375..1b5d4691efcde94151462fff074a58f3f7150a25 100644 (file)
@@ -10,9 +10,6 @@
 /* Various pseudo-ops for which the Intel assembler uses non-standard
    definitions.  */
 
-#undef ASM_BYTE_OP
-#define ASM_BYTE_OP "\tdata1\t"
-
 #undef STRING_ASM_OP
 #define STRING_ASM_OP "\tstringz\t"
 
index cdb3f257d8c3755ed2b713fc0c96a1ee36c9bf1f..2b1dc75d33379f84238e72863688567865a20bc6 100644 (file)
@@ -79,6 +79,11 @@ static int    m32r_issue_rate           PARAMS ((void));
 #undef TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE m32r_attribute_table
 
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE m32r_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
index 614caa0c3d753d7895f6dee8dfd743433881a036..4741849f7946645e1ca3db4d839a954270f8e4e1 100644 (file)
@@ -1719,37 +1719,6 @@ do {                                                     \
    no longer contain unusual constructs.  */
 #define ASM_APP_OFF ""
 
-/* This is how to output an assembler line defining a `char' constant.  */
-#define ASM_OUTPUT_CHAR(FILE, VALUE)           \
-  do                                           \
-    {                                          \
-      fprintf (FILE, "\t.byte\t");             \
-      output_addr_const (FILE, (VALUE));       \
-      fprintf (FILE, "\n");                    \
-    }                                          \
-  while (0)
-
-/* This is how to output an assembler line defining a `short' constant.  */
-#define ASM_OUTPUT_SHORT(FILE, VALUE)          \
-  do                                           \
-    {                                          \
-      fprintf (FILE, "\t.hword\t");            \
-      output_addr_const (FILE, (VALUE));       \
-      fprintf (FILE, "\n");                    \
-    }                                          \
-  while (0)
-
-/* This is how to output an assembler line defining an `int' constant.
-   We also handle symbol output here.  */
-#define ASM_OUTPUT_INT(FILE, VALUE)            \
-  do                                           \
-    {                                          \
-      fprintf (FILE, "\t.word\t");             \
-      output_addr_const (FILE, (VALUE));       \
-      fprintf (FILE, "\n");                    \
-    }                                          \
-  while (0)
-
 /* This is how to output an assembler line defining a `float' constant.  */
 #define ASM_OUTPUT_FLOAT(FILE, VALUE)                  \
   do                                                   \
@@ -1776,10 +1745,6 @@ do {                                                     \
     }                                                          \
   while (0)
 
-/* This is how to output an assembler line for a numeric constant byte.  */
-#define ASM_OUTPUT_BYTE(FILE, VALUE)                           \
-  fprintf (FILE, "%s0x%x\n", ASM_BYTE_OP, (VALUE))
-
 /* This is how to output the definition of a user-level label named NAME,
    such as the label on a static function or variable NAME.  */
 /* On the M32R we need to ensure the next instruction starts on a 32 bit
index dd3c3080f1b4e575c588c3e2c8ea236a1b824131..b0e82dcedd49972bb0c904afccaf778cf6337cbc 100644 (file)
@@ -213,6 +213,9 @@ static int nb_soft_regs;
 #undef TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE m68hc11_attribute_table
 
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
+
 #undef TARGET_ASM_FUNCTION_EPILOGUE
 #define TARGET_ASM_FUNCTION_EPILOGUE m68hc11_output_function_epilogue
 
index 73b38fb6f070e72a97b2eadde21e0401f75de016..c2603c5967026391d1730568b31d01b34d69892b 100644 (file)
@@ -1579,7 +1579,8 @@ do {                                                                    \
 #define ASM_OUTPUT_DOUBLE(FILE,VALUE)                                  \
 do { long l[2];                                                                \
      REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l);                           \
-     fprintf (FILE, "\t%s\t0x%lx,0x%lx\n", ASM_LONG, l[0], l[1]);      \
+     fprintf (FILE, "\t%s\t0x%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.  */
@@ -1587,30 +1588,9 @@ do { long l[2];                                                          \
 #define ASM_OUTPUT_FLOAT(FILE,VALUE)                   \
 do { long l;                                           \
      REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);           \
-     fprintf ((FILE), "\t%s\t0x%lx\n", ASM_LONG, l);   \
+     assemble_aligned_integer (4, GEN_INT (l));                \
    } while (0)
 
-/* This is how to output an assembler line defining a `long' constant.  */
-#define ASM_OUTPUT_INT(FILE,VALUE)                     \
-( fprintf (FILE, "\t%s\t", ASM_LONG),                  \
-  output_addr_const (FILE, (VALUE)),                   \
-  fprintf (FILE, "\n"))
-
-/* Likewise for `char' and `short' constants.  */
-#define ASM_OUTPUT_SHORT(FILE,VALUE)                   \
-( fprintf (FILE, "\t%s\t", ASM_SHORT),                 \
-  output_addr_const (FILE, (VALUE)),                   \
-  fprintf (FILE, "\n"))
-
-/* This is how to output an assembler line for a numeric constant byte.  */
-#define ASM_OUTPUT_CHAR(FILE,VALUE)                    \
-( fprintf (FILE, "%s", ASM_BYTE_OP),                   \
-  output_addr_const (FILE, (VALUE)),                   \
-  putc ('\n', FILE))
-
-#define ASM_OUTPUT_BYTE(FILE,VALUE)                    \
-  fprintf ((FILE), "%s0x%x\n", ASM_BYTE_OP, (VALUE))
-
 /* This is how to output the definition of a user-level label named NAME,
    such as the label on a static function or variable NAME.  */
 
@@ -1700,11 +1680,11 @@ do { long l;                                            \
 /* This is how to output an element of a case-vector that is relative.  */
 
 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  asm_fprintf (FILE, "\t%s\tL%d-L%d\n", ASM_SHORT, VALUE, REL)
+  asm_fprintf (FILE, "\t%s\tL%d-L%d\n", integer_asm_op (2, TRUE), VALUE, REL)
 
 /* This is how to output an element of a case-vector that is absolute.  */
 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
-  asm_fprintf (FILE, "\t%s\t.L%d\n", ASM_SHORT, VALUE)
+  asm_fprintf (FILE, "\t%s\t.L%d\n", integer_asm_op (2, TRUE), VALUE)
 
 /* This is how to output an assembler line that says to advance the
    location counter to a multiple of 2**LOG bytes.  */
@@ -1733,8 +1713,6 @@ do { long l;                                              \
 /* The prefix for immediate operands.  */
 #define IMMEDIATE_PREFIX "#"
 #define GLOBAL_ASM_OP   "\t.globl\t"
-#define ASM_LONG        ".long"
-#define ASM_SHORT       ".word"
 
 \f
 /* Miscellaneous Parameters.  */
index d1968c028d3581a10834a2bc705093d5ea7f8fd7..998240eb3869a74fb3aec53731f8183c50b2714e 100644 (file)
@@ -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                                                    \
          {                                                     \
index 322058ec1e76d42f831e675842f8f568aa6d6d45..12b106a4be5ea7f6cbe987c2a21acfd0d226fc5e 100644 (file)
@@ -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                                                    \
          {                                                     \
index 3f368c7734552bc0226ab917430e15f2d0c4fd52..86d9853c3f00041a0141282970b949d1760c2405 100644 (file)
@@ -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)),                          \
index 27aa342cb50427aafe0a58ea14dd31774c8912cf..b23792930319e508e0a1e332db64b61faaf3ca6e 100644 (file)
@@ -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.)  */
index 812f6f7cd7eaf84b70977663d0ec08c24e5c0be9..8fa6b42ac333d73547bddee33c8e82bbbc68033a 100644 (file)
@@ -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 */
index 403e4d17dedba4ede46f3b6785ee5b80d3ed55d6..11784c7ca9f3534555d7cdfc734084dd66c33f5e 100644 (file)
@@ -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)
 
index 92bded348548fbe2defd14d6e22a49293c8ac732..31415b97ad2d20ef9a5b560c665ceb0d25753c0f 100644 (file)
@@ -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.  */
index f8932037775a3afc2cc334725ab8300a8d72835c..228d98f1043cff420a57aa2059e9b675af1a3c5d 100644 (file)
@@ -88,6 +88,35 @@ int m68k_align_funcs;
 int m68k_last_compare_had_fp_operands;
 \f
 /* 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
index 65a34eeba2654a17926df2cb102f2dd57b9bc129..4637d812249aea8253d32ea5f76fbac6bb33d928 100644 (file)
@@ -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.  */
 
index ae47c195dfe43a0af1069be770b7a67d6ce9c226..88154fc7a7f8b85caa35e0aeac46ca9c7532b033 100644 (file)
@@ -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                                                    \
          {                                                     \
index 7b1f0e72fd2aa902a03f7a561ed54de5167fe3bd..d2bb108bd992fdb32387a4d6b43bfdcd9818d279 100644 (file)
@@ -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 */
index 1c8da7a98c7ee6226d9ce67e8a9da1f90a2cc934..6801f6b53eac72f3944afd87eacddd2e951b1b30 100644 (file)
@@ -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
 
index 5e4c212c691f8c5ceb5b004ec9e21d665e601ceb..7f44b2682093cde5e9c1080c6ddcc9daa3f27620 100644 (file)
@@ -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.  */
index 927e92d0af683da9507951b58461d8a1e95ba798..f9009df0083b3b2f41bba29633ade36bb91f9525 100644 (file)
@@ -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
index df5019655c7b0f8d22e5fef5647ce7cb7891eabf..e3ce288da618315e5fcf0f50792b4ac0b6f28e0f 100644 (file)
@@ -76,6 +76,17 @@ static void m88k_svr3_asm_out_destructor PARAMS ((rtx, int));
 static int m88k_adjust_cost PARAMS ((rtx, rtx, rtx, int));
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_BYTE_OP
+#define TARGET_ASM_BYTE_OP "\tbyte\t"
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\thalf\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\tword\t"
+#undef TARGET_ASM_UNALIGNED_HI_OP
+#define TARGET_ASM_UNALIGNED_HI_OP "\tuahalf\t"
+#undef TARGET_ASM_UNALIGNED_SI_OP
+#define TARGET_ASM_UNALIGNED_SI_OP "\tuaword\t"
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE m88k_output_function_prologue
 #undef TARGET_ASM_FUNCTION_END_PROLOGUE
@@ -2364,7 +2375,8 @@ output_tdesc (file, offset)
 
   tdesc_section ();
 
-  fprintf (file, "%s%d,%d", ASM_LONG, /* 8:0,22:(20 or 16),2:2 */
+  /* 8:0,22:(20 or 16),2:2 */
+  fprintf (file, "%s%d,%d", integer_asm_op (4, TRUE),
           (((xmask != 0) ? 20 : 16) << 2) | 2,
           flag_pic ? 2 : 1);
 
index c47619d742c8597c084b3dfc5635bdaa26c614e9..47c49b822cdbb8c85c92194895ce9a8d0942c721 100644 (file)
@@ -1154,9 +1154,9 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
   /* Restore r10 and load the static chain register.  */               \
   fprintf (FILE, "\tld.d\t %s,%s,24\n", reg_names[10], reg_names[10]); \
   /* Storage: r10 save area, static chain, function address.  */       \
-  ASM_OUTPUT_INT (FILE, const0_rtx);                                   \
-  ASM_OUTPUT_INT (FILE, const0_rtx);                                   \
-  ASM_OUTPUT_INT (FILE, const0_rtx);                                   \
+  assemble_aligned_integer (UNITS_PER_WORD, const0_rtx);               \
+  assemble_aligned_integer (UNITS_PER_WORD, const0_rtx);               \
+  assemble_aligned_integer (UNITS_PER_WORD, const0_rtx);               \
 }
 
 /* Length in units of the trampoline for entering a nested function.
@@ -1687,9 +1687,6 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
 #define BSS_ASM_OP             "\tbss\t"
 #define FLOAT_ASM_OP           "\tfloat\t"
 #define DOUBLE_ASM_OP          "\tdouble\t"
-#define ASM_LONG               "\tword\t"
-#define SHORT_ASM_OP           "\thalf\t"
-#define CHAR_ASM_OP            "\tbyte\t"
 #define ASCII_DATA_ASM_OP      "\tstring\t"
 
 /* These are particular to the global pool optimization.  */
@@ -1715,8 +1712,6 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
 /* These are specific to version 03.00 assembler syntax.  */
 #define INTERNAL_ASM_OP                "\tlocal\t"
 #define VERSION_ASM_OP         "\tversion\t"
-#define UNALIGNED_SHORT_ASM_OP "\tuahalf\t"
-#define UNALIGNED_INT_ASM_OP   "\tuaword\t"
 #define PUSHSECTION_ASM_OP     "\tsection\t"
 #define POPSECTION_ASM_OP      "\tprevious"
 
@@ -2035,7 +2030,8 @@ do {                                                                       \
   do {                                                                 \
     union { REAL_VALUE_TYPE d; long l[2]; } x;                         \
     x.d = (VALUE);                                                     \
-    fprintf (FILE, "%s0x%.8lx, 0x%.8lx\n", ASM_LONG,                   \
+    fprintf (FILE, "%s0x%.8lx, 0x%.8lx\n",                             \
+            integer_asm_op (4, TRUE),                                  \
             (long) x.l[0], (long) x.l[1]);                             \
   } while (0)
 
@@ -2044,32 +2040,10 @@ do {                                                                     \
   do {                                                                 \
     int i;                                                             \
     FLOAT_TO_INT_INTERNAL (VALUE, i);                                  \
-    fprintf (FILE, "%s0x%.8x\n", ASM_LONG, i);                 \
+    assemble_aligned_integer (4, GEN_INT (i));                         \
   } while (0)
 
-/* Likewise for `int', `short', and `char' constants.  */
-#define ASM_OUTPUT_INT(FILE,VALUE)                                     \
-( fprintf (FILE, "%s", ASM_LONG),                                      \
-  output_addr_const (FILE, (VALUE)),                                   \
-  fprintf (FILE, "\n"))
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE)                                   \
-( fprintf (FILE, "%s", SHORT_ASM_OP),                                  \
-  output_addr_const (FILE, (VALUE)),                                   \
-  fprintf (FILE, "\n"))
-
-#define ASM_OUTPUT_CHAR(FILE,VALUE)                                    \
-( fprintf (FILE, "%s", CHAR_ASM_OP),                                   \
-  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, "%s0x%x\n", CHAR_ASM_OP, (int)(VALUE))
-
 /* The single-byte pseudo-op is the default.  Override svr[34].h.  */
-#undef ASM_BYTE_OP
-#define ASM_BYTE_OP "\tbyte\t"
 #undef ASM_OUTPUT_ASCII
 #define ASM_OUTPUT_ASCII(FILE, P, SIZE)  \
   output_ascii (FILE, ASCII_DATA_ASM_OP, 48, P, SIZE)
index ef1feedea1b6605d3ff367e78085d1a001eac11e..45cb3e86df1415cb33d3d57e8fe78c7e97406efd 100644 (file)
@@ -40,11 +40,6 @@ Boston, MA 02111-1307, USA.  */
 #define DWARF_DEBUGGING_INFO 1
 #endif
 
-/* MCore defines .long and .short to NOT force any alignment.
-   This lets you misalign as much as you wish.  */
-#define        UNALIGNED_INT_ASM_OP    "\t.long\t"
-#define        UNALIGNED_SHORT_ASM_OP  "\t.short\t"
-
 #define EXPORTS_SECTION_ASM_OP "\t.section .exports"
 
 #define SUBTARGET_EXTRA_SECTIONS in_const, in_exports
index a367a557c5ccc43458634c35f76024a36b9b65dd..2b47e24e82ddf827b3521238610dbd2970cc6ce5 100644 (file)
@@ -144,6 +144,13 @@ static void          mcore_asm_named_section      PARAMS ((const char *,
 #define TARGET_MERGE_DECL_ATTRIBUTES merge_dllimport_decl_attributes
 #endif
 
+#ifdef OBJECT_FORMAT_ELF
+#undef TARGET_ASM_UNALIGNED_HI_OP
+#define TARGET_ASM_UNALIGNED_HI_OP "\t.short\t"
+#undef TARGET_ASM_UNALIGNED_SI_OP
+#define TARGET_ASM_UNALIGNED_SI_OP "\t.long\t"
+#endif
+
 #undef TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE mcore_attribute_table
 
index 7bced8ea8b505360b9967203787b42ed21b867f3..2709c578aabf63bbc794521afc6a11e8e0df8dc0 100644 (file)
@@ -1266,24 +1266,6 @@ extern long mcore_current_compilation_timestamp;
     }                                                  \
   while (0)
 
-#define ASM_OUTPUT_INT(STREAM, EXP)    \
-  (fprintf (STREAM, "\t.long\t"),              \
-   output_addr_const (STREAM, (EXP)),          \
-   fputc ('\n', STREAM))               
-
-#define ASM_OUTPUT_SHORT(STREAM, EXP)  \
-  (fprintf (STREAM, "\t.short\t"),     \
-   output_addr_const (STREAM, (EXP)),  \
-   fputc ('\n', STREAM))               
-
-#define ASM_OUTPUT_CHAR(STREAM, EXP)   \
-  (fprintf (STREAM, "\t.byte\t"),              \
-   output_addr_const (STREAM, (EXP)),          \
-   fputc ('\n', STREAM))
-
-#define ASM_OUTPUT_BYTE(STREAM, VALUE)         \
-  fprintf (STREAM, "\t.byte\t%d\n", VALUE)     \
-
 /* This is how to output an assembler line
    that says to advance the location counter by SIZE bytes.  */
 #undef  ASM_OUTPUT_SKIP
index 7e3efa0a1f37ad34f696c19a8b03d8fdcccfb8bb..2c8fd83dd74c13e489d9b042abad5487d310fea8 100644 (file)
@@ -19,6 +19,8 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+#define TARGET_IRIX5 1
+
 #ifndef TARGET_DEFAULT
 #define        TARGET_DEFAULT  MASK_ABICALLS
 #endif
@@ -155,10 +157,6 @@ do {                                               \
   fputs (" .text\n", FILE);                    \
 } while (0)
 
-/* To get unaligned data, we have to turn off auto alignment.  */
-#define UNALIGNED_SHORT_ASM_OP         "\t.align 0\n\t.half\t"
-#define UNALIGNED_INT_ASM_OP           "\t.align 0\n\t.word\t"
-
 /* Also do this for libcalls.  */
 #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
   mips_output_external_libcall (FILE, XSTR (FUN, 0))
index d7a989ad007f73d395d9781de37665b1244a2da5..776434a8d59b430a41f4bd7567c14e4c97fcbe16 100644 (file)
@@ -159,8 +159,6 @@ Boston, MA 02111-1307, USA.  */
 #undef ASM_OUTPUT_UNDEF_FUNCTION
 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
 #undef ASM_DECLARE_FUNCTION_SIZE
-#undef UNALIGNED_SHORT_ASM_OP
-#undef UNALIGNED_INT_ASM_OP
 
 /* Stuff we need for Irix 6 that isn't in Irix 5.  */
 
index 1d79f8ed3f830eb8108b2f886644ba67ea2bd7d8..9601efb946d9549e8997bc2733e8eefa331275a4 100644 (file)
@@ -118,6 +118,7 @@ static void abort_with_insn                 PARAMS ((rtx, const char *))
   ATTRIBUTE_NORETURN;
 static int symbolic_expression_p                PARAMS ((rtx));
 static void mips_add_gc_roots                   PARAMS ((void));
+static bool mips_assemble_integer        PARAMS ((rtx, unsigned int, int));
 static void mips_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 static void mips_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static enum processor_type mips_parse_cpu       PARAMS ((const char *));
@@ -456,6 +457,20 @@ enum reg_class mips_char_to_class[256] =
 };
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.half\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
+#undef TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER mips_assemble_integer
+
+#if TARGET_IRIX5 && !TARGET_IRIX6
+#undef TARGET_ASM_UNALIGNED_HI_OP
+#define TARGET_ASM_UNALIGNED_HI_OP "\t.align 0\n\t.half\t"
+#undef TARGET_ASM_UNALIGNED_SI_OP
+#define TARGET_ASM_UNALIGNED_SI_OP "\t.align 0\n\t.word\t"
+#endif
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE mips_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
@@ -5788,7 +5803,29 @@ print_operand_address (file, addr)
        break;
     }
 }
+\f
+/* Target hook for assembling integer objects.  It appears that the Irix
+   6 assembler can't handle 64-bit decimal integers, so avoid printing
+   such an integer here.  */
 
+static bool
+mips_assemble_integer (x, size, aligned_p)
+     rtx x;
+     unsigned int size;
+     int aligned_p;
+{
+  if ((TARGET_64BIT || TARGET_GAS) && size == 8 && aligned_p)
+    {
+      fputs ("\t.dword\t", asm_out_file);
+      if (HOST_BITS_PER_WIDE_INT < 64 || GET_CODE (x) != CONST_INT)
+       output_addr_const (asm_out_file, x);
+      else
+       print_operand (asm_out_file, x, 'X');
+      fputc ('\n', asm_out_file);
+      return true;
+    }
+  return default_assemble_integer (x, size, aligned_p);
+}
 \f
 /* If optimizing for the global pointer, keep track of all of the externs, so
    that at the end of the file, we can emit the appropriate .extern
index b0415087fafc614de7095149040b0a21bfde748c..c877fd15adc026362bb330ae7dfeb3cdc572e28a 100644 (file)
@@ -4396,69 +4396,6 @@ do {                                                     \
   mips_output_float (STREAM, VALUE)
 
 
-/* This is how to output an assembler line defining an `int' constant.  */
-
-#define ASM_OUTPUT_INT(STREAM,VALUE)                                   \
-do {                                                                   \
-  fprintf (STREAM, "\t.word\t");                                       \
-  output_addr_const (STREAM, (VALUE));                                 \
-  fprintf (STREAM, "\n");                                              \
-} while (0)
-
-/* Likewise for 64 bit, `char' and `short' constants.
-
-   FIXME: operand_subword can't handle some complex constant expressions
-   that output_addr_const can (for example it does not call
-   simplify_subtraction).  Since GAS can handle dword, even for mipsII,
-   rely on that to avoid operand_subword for most of the cases where this
-   matters.  Try gcc.c-torture/compile/930326-1.c with -mips2 -mlong64,
-   or the same case with the type of 'i' changed to long long.
-
-*/
-
-#define ASM_OUTPUT_DOUBLE_INT(STREAM,VALUE)                            \
-do {                                                                   \
-  if (TARGET_64BIT || TARGET_GAS)                                      \
-    {                                                                  \
-      fprintf (STREAM, "\t.dword\t");                                  \
-      if (HOST_BITS_PER_WIDE_INT < 64 || GET_CODE (VALUE) != CONST_INT)        \
-       /* We can't use 'X' for negative numbers, because then we won't \
-          get the right value for the upper 32 bits.  */               \
-        output_addr_const (STREAM, VALUE);                             \
-      else                                                             \
-       /* We must use 'X', because otherwise LONG_MIN will print as    \
-          a number that the Irix 6 assembler won't accept.  */         \
-        print_operand (STREAM, VALUE, 'X');                            \
-      fprintf (STREAM, "\n");                                          \
-    }                                                                  \
-  else                                                                 \
-    {                                                                  \
-      assemble_integer (operand_subword ((VALUE), 0, 0, DImode),       \
-                       UNITS_PER_WORD, BITS_PER_WORD, 1);              \
-      assemble_integer (operand_subword ((VALUE), 1, 0, DImode),       \
-                       UNITS_PER_WORD, BITS_PER_WORD, 1);              \
-    }                                                                  \
-} while (0)
-
-#define ASM_OUTPUT_SHORT(STREAM,VALUE)                                 \
-{                                                                      \
-  fprintf (STREAM, "\t.half\t");                                       \
-  output_addr_const (STREAM, (VALUE));                                 \
-  fprintf (STREAM, "\n");                                              \
-}
-
-#define ASM_OUTPUT_CHAR(STREAM,VALUE)                                  \
-{                                                                      \
-  fprintf (STREAM, "\t.byte\t");                                       \
-  output_addr_const (STREAM, (VALUE));                                 \
-  fprintf (STREAM, "\n");                                              \
-}
-
-/* This is how to output an assembler line for a numeric constant byte.  */
-
-#define ASM_OUTPUT_BYTE(STREAM,VALUE)                                  \
-  fprintf (STREAM, "\t.byte\t0x%x\n", (int)(VALUE))
-
 /* This is how to output an element of a case-vector that is absolute.  */
 
 #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE)                         \
index 1df69745f21191a465b9e95c8693f747c7c5c80b..e178355649005461c38ad545c754a036ac91a0c6 100644 (file)
@@ -68,7 +68,6 @@ Boston, MA 02111-1307, USA.  */
 
 #define NM_FLAGS       "-p"
 
-#define ASM_LONG       ".word\t"
 #define ASM_GLOBAL     ".rdata\n\t\t.globl\t"
 
 #include "mips/mips.h"
index e1b11a3aaf2554a66a648d4c5622cb1d6c245598..0a3aca1ca803d549f1c41d15dac888e11e1e21f7 100644 (file)
@@ -122,7 +122,6 @@ extern void mmix_canonicalize_comparison PARAMS ((RTX_CODE *, rtx *, rtx *));
 extern int mmix_rtx_cost_recalculated
   PARAMS ((rtx, RTX_CODE, RTX_CODE, int *));
 extern int mmix_address_cost PARAMS ((rtx));
-extern void mmix_asm_output_double_int PARAMS ((FILE *, rtx, int));
 extern void mmix_print_operand PARAMS ((FILE *, rtx, int));
 extern void mmix_print_operand_address PARAMS ((FILE *, rtx));
 extern int mmix_valid_comparison PARAMS ((RTX_CODE, enum machine_mode, rtx));
index 6d1c72d2e9044bd404edaaa7c7fd369e1e74956e..9ba6c2d2b409bd0b337bcd5f9662514ca9547083 100644 (file)
@@ -87,6 +87,7 @@ static void mmix_output_shifted_value PARAMS ((FILE *, HOST_WIDEST_INT));
 static void mmix_output_condition PARAMS ((FILE *, rtx, int));
 static HOST_WIDEST_INT mmix_intval PARAMS ((rtx));
 static void mmix_output_octa PARAMS ((FILE *, HOST_WIDEST_INT, int));
+static bool mmix_assemble_integer PARAMS ((rtx, unsigned int, int));
 static void mmix_init_machine_status PARAMS ((struct function *));
 
 extern void mmix_target_asm_function_prologue
@@ -100,6 +101,17 @@ extern void mmix_target_asm_function_epilogue
 
 /* Node: Function Entry */
 
+#undef TARGET_ASM_BYTE_OP
+#define TARGET_ASM_BYTE_OP NULL
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP NULL
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP NULL
+#undef TARGET_ASM_ALIGNED_DI_OP
+#define TARGET_ASM_ALIGNED_DI_OP NULL
+#undef TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER mmix_assemble_integer
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE mmix_target_asm_function_prologue
 
@@ -1911,31 +1923,45 @@ mmix_asm_output_float (stream, valuep)
                               + 1)));
 }
 
-/* ASM_OUTPUT_DOUBLE_INT.  */
+/* Target hook for assembling integer objects.  Use mmix_print_operand
+   for WYDE and TETRA.  Use mmix_output_octa to output 8-byte
+   CONST_DOUBLEs.  */
 
-void
-mmix_asm_output_double_int (stream, value, do_begin_end)
-     FILE * stream;
-     rtx value;
-     int do_begin_end;
+static bool
+mmix_assemble_integer (x, size, aligned_p)
+     rtx x;
+     unsigned int size;
+     int aligned_p;
 {
-  if (do_begin_end)
-    fprintf (stream, "\tOCTA ");
-
-  if (GET_CODE (value) == CONST_DOUBLE)
-    {
-      /* Get the bit representation of this number.  */
-      HOST_WIDE_INT wval = mmix_intval (value);
-      mmix_output_octa (stream, wval, 0);
-    }
-  else
-    /* FIXME: We scrap the '@' symbol-modifier since it's not used
-       anymore; we used to jump through lots of hoops, attempting to get
-       mmixal-compatible symbols; defined before use (still failed).  */
-    output_addr_const (stream, value);
-
-  if (do_begin_end)
-    fprintf (stream, "\n");
+  if (aligned_p)
+    switch (size)
+      {
+      case 1:
+       fputs ("\tBYTE\t", asm_out_file);
+       mmix_print_operand (asm_out_file, x, 'B');
+       fputc ('\n', asm_out_file);
+       return true;
+
+      case 2:
+       fputs ("\tWYDE\t", asm_out_file);
+       mmix_print_operand (asm_out_file, x, 'W');
+       fputc ('\n', asm_out_file);
+       return true;
+
+      case 4:
+       fputs ("\tTETRA\t", asm_out_file);
+       mmix_print_operand (asm_out_file, x, 'L');
+       fputc ('\n', asm_out_file);
+       return true;
+
+      case 8:
+       if (GET_CODE (x) == CONST_DOUBLE)
+         mmix_output_octa (asm_out_file, mmix_intval (x), 0);
+       else
+         assemble_integer_with_op ("\tOCTA\t", x);
+       return true;
+      }
+  return default_assemble_integer (x, size, aligned_p);
 }
 
 /* ASM_OUTPUT_ASCII.  */
@@ -2301,7 +2327,7 @@ mmix_print_operand (stream, x, code)
 
     case CONST_DOUBLE:
       /* Do somewhat as CONST_INT.  */
-      mmix_asm_output_double_int (stream, modified_x, 0);
+      mmix_output_octa (stream, mmix_intval (modified_x), 0);
       return;
 
     case CONST:
index 4fcc27ec2f915fee1ec704acaee3a24ee2d5b127..8cb14e29f8ac32be8220deb97e3db1cbad86674b 100644 (file)
@@ -972,42 +972,6 @@ const_section ()                                           \
 #define ASM_OUTPUT_FLOAT(STREAM, VALUE) \
  mmix_asm_output_float (STREAM, &VALUE)
 
-#define ASM_OUTPUT_DOUBLE_INT(STREAM, EXP) \
- mmix_asm_output_double_int (STREAM, EXP, 1)
-
-#define ASM_OUTPUT_INT(STREAM, EXP)            \
- do {                                          \
-  fprintf (STREAM, "\tTETRA ");                        \
-  mmix_print_operand (STREAM, EXP, 'L');       \
-  fprintf (STREAM, "\n");                      \
- } while (0)
-
-#define ASM_OUTPUT_SHORT(STREAM, EXP) \
- do {                                          \
-  fprintf (STREAM, "\tWYDE ");                 \
-  mmix_print_operand (STREAM, EXP, 'W');       \
-  fprintf (STREAM, "\n");                      \
- } while (0)
-
-#define ASM_OUTPUT_CHAR(STREAM, EXP) \
- do {                                          \
-  fprintf (STREAM, "\tBYTE ");                 \
-  mmix_print_operand (STREAM, EXP, 'B');       \
-  fprintf (STREAM, "\n");                      \
- } while (0)
-
-#define ASM_OUTPUT_BYTE(STREAM, VALUE) \
- fprintf (STREAM, "\tBYTE %d\n", (int) (VALUE) & 255)
-
-#define ASM_BYTE_OP "\tBYTE\t"
-
-/* We need these for DWARF2 EH data.  If we don't define them, the
-   ordinary BYTE, WYDE, TETRA and OCTA will be used, and those are
-   aligning.  */
-#define UNALIGNED_SHORT_ASM_OP "\t.2byte\t"
-#define UNALIGNED_INT_ASM_OP "\t.4byte\t"
-#define UNALIGNED_DOUBLE_INT_ASM_OP "\t.8byte\t"
-
 #define ASM_OUTPUT_ASCII(STREAM, PTR, LEN) \
  mmix_asm_output_ascii (STREAM, PTR, LEN)
 
@@ -1150,12 +1114,6 @@ const_section ()                                         \
  mmix_asm_output_addr_vec_elt (STREAM, VALUE)
 
 
-/* FIXME: Add to docs; It is not mentioned at all that
-   ASM_OUTPUT_ADDR_VEC_ELT is used if relative elements are
-   used, and that the default expects an undocumented macro
-   "ASM_LONG".  */
-#define ASM_LONG "OCTA"
-
 /* Node: Exception Region Output */
 /* (empty) */
 
index 5f286e5ca6357c0a4120b1299b78ffd3230d60d8..bbe25b61aa25b53f9dfd5ec0ca2c89fab91af71c 100644 (file)
@@ -67,6 +67,8 @@ static void count_tst_insns PARAMS ((int *));
 static int out_of_line_epilogue;
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
 
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
index ffc5c7cca5262b7a3912425c933f310f883c5abb..3aa38cf80f9dfd67dbfc4170ebeb5e73f5b33940 100644 (file)
@@ -834,29 +834,6 @@ do { char dstr[30];                                        \
      fprintf (FILE, "\t.float %s\n", dstr);            \
    } 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.hword "),                 \
-  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", (VALUE))
-
 /* This says how to output the assembler to define a global
    uninitialized but not common symbol.
    Try to use asm_output_bss to implement this macro.  */
index 23fe80ff67483f84ac7c2bf6f052932391bce552..54bf0409262edbbaad468765782df16712e85603 100644 (file)
@@ -53,6 +53,8 @@ Boston, MA 02111-1307, USA.  */
                                || regs_ever_live[16] || regs_ever_live[17]))
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
 
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
index db77f064acab68cc46fe10c1cbb3da532361283a..4adf82372c741141a21c4fec0918f34a43eaf3b0 100644 (file)
@@ -918,29 +918,6 @@ do { char dstr[30];                                        \
      fprintf (FILE, "\t.float %s\n", dstr);            \
    } 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.hword "),                 \
-  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", (VALUE))
-
 /* This says how to output the assembler to define a global
    uninitialized but not common symbol.
    Try to use asm_output_bss to implement this macro.  */
index dd7c14be60fc8dd9e52816b66416dcb0fa85dd07..3a1515cdde5e7c22c9e0395005b42ceb191fd45a 100644 (file)
@@ -40,7 +40,6 @@ Boston, MA 02111-1307, USA.  */
 #undef ASM_OUTPUT_ALIGN
 #undef ASM_OUTPUT_ASCII
 #undef ASM_OUTPUT_DOUBLE
-#undef ASM_OUTPUT_INT
 #undef ASM_OUTPUT_INTERNAL_LABEL
 #undef ASM_OUTPUT_LOCAL
 #undef CPP_PREDEFINES
@@ -98,11 +97,6 @@ output_file_directive ((FILE), main_input_filename)
  *  uninitialized locals.
  */
 
-#define ASM_OUTPUT_INT(FILE,VALUE)                             \
-( fprintf (FILE, "\t.double "),                                        \
-  output_addr_const (FILE, (VALUE)),                           \
-  fprintf (FILE, "\n"))
-
 #define ASM_OUTPUT_LABELREF_AS_INT(STREAM, NAME)                       \
 do {                                                                   \
   fprintf (STREAM, "\t.double\t");                                     \
index 264245e3c2a3ddb416287388cd62cbf0a369d9eb..3802675f981214895b4a8b812bc3478ebf1b4b48 100644 (file)
@@ -74,6 +74,14 @@ static void ns32k_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 #undef TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE ns32k_attribute_table
 
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
+
+#ifdef ENCORE_ASM
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\t.double\t"
+#endif
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE ns32k_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
index f4d52b2fc1bd8c1781de28b85ff0245983ca9a1f..8bd64f6a2efef8aa07ce7427cf3b2599179257eb 100644 (file)
@@ -736,8 +736,8 @@ operands on the 32k are stored).  */
   fprintf (FILE, "\tjump " );                                          \
   PUT_ABSOLUTE_PREFIX (FILE);                                          \
   fprintf (FILE, "__trampoline\n" );                                   \
-  ASM_OUTPUT_INT (FILE, const0_rtx);                                   \
-  ASM_OUTPUT_INT (FILE, const0_rtx);                                   \
+  assemble_aligned_integer (UNITS_PER_WORD, const0_rtx);               \
+  assemble_aligned_integer (UNITS_PER_WORD, const0_rtx);               \
 }
 
 /* Length in units of the trampoline for entering a nested function.  */
@@ -1295,28 +1295,6 @@ 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", (VALUE))
-
 /* This is how to output an assembler line defining an external/static
    address which is not in tree format (for collect.c).  */
 
index a79567af7f50255bd5ecc680703fc92eaa3437a7..416e079511a1adf3ff0c9b45d4effd33ad92bd52 100644 (file)
@@ -91,20 +91,6 @@ Boston, MA 02111-1307, USA.  */
 #undef STATIC_CHAIN_REGNUM
 #define STATIC_CHAIN_REGNUM 31
 
-/* This is not needed for correct operation in 32bit mode, and since
-   older versions of gas and the hpux assembler do not accept .dword
-   we put this here instead of the more logical location, pa.h.  */
-#define ASM_OUTPUT_DOUBLE_INT(FILE,VALUE) \
-  do                                                           \
-    {                                                          \
-      fputs ("\t.dword ", FILE);                               \
-      if (function_label_operand (VALUE, VOIDmode))            \
-       fputs ("P%", FILE);                                     \
-      output_addr_const (FILE, (VALUE));                       \
-      fputs ("\n", FILE);                                      \
-    }                                                          \
-  while (0)
-
 /* Nonzero if we do not know how to pass TYPE solely in registers.  */
 #define MUST_PASS_IN_STACK(MODE,TYPE) \
   ((TYPE) != 0                                                 \
index 27d2d79423fc8f3548b74c2fff290888de03cda0..6234a3356f44da9b04ecf21b286c30e81c3bd082 100644 (file)
@@ -64,6 +64,7 @@ static void pa_add_gc_roots PARAMS ((void));
 static void mark_deferred_plabels PARAMS ((void *));
 static void compute_zdepwi_operands PARAMS ((unsigned HOST_WIDE_INT, unsigned *));
 static int compute_movstrsi_length PARAMS ((rtx));
+static bool pa_assemble_integer PARAMS ((rtx, unsigned int, int));
 static void remove_useless_addtr_insns PARAMS ((rtx, int));
 static rtx store_reg PARAMS ((int, int, int));
 static rtx load_reg PARAMS ((int, int, int));
@@ -113,6 +114,22 @@ struct deferred_plabel
 int n_deferred_plabels = 0;
 \f
 /* Initialize the GCC target structure.  */
+
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.half\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
+#undef TARGET_ASM_ALIGNED_DI_OP
+#define TARGET_ASM_ALIGNED_DI_OP "\t.dword\t"
+#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_UNALIGNED_DI_OP
+#define TARGET_ASM_UNALIGNED_DI_OP TARGET_ASM_ALIGNED_DI_OP
+#undef TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER pa_assemble_integer
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE pa_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
@@ -209,6 +226,18 @@ override_options ()
   if (flag_pic == 1 || TARGET_64BIT)
     flag_pic = 2;
 
+  /* We can't guarantee that .dword is available for 32-bit targets.  */
+  if (UNITS_PER_WORD == 4)
+    targetm.asm_out.aligned_op.di = NULL;
+
+  /* The unaligned ops are only available when using GAS.  */
+  if (!TARGET_GAS)
+    {
+      targetm.asm_out.unaligned_op.hi = NULL;
+      targetm.asm_out.unaligned_op.si = NULL;
+      targetm.asm_out.unaligned_op.di = NULL;
+    }
+
   /* Register global variables with the garbage collector.  */
   pa_add_gc_roots ();
 }
@@ -2513,6 +2542,27 @@ output_64bit_ior (operands)
   return "depdi -1,%2,%3,%0";
 }
 \f
+/* Target hook for assembling integer objects.  This code handles
+   aligned SI and DI integers specially, since function references must
+   be preceded by P%.  */
+
+static bool
+pa_assemble_integer (x, size, aligned_p)
+     rtx x;
+     unsigned int size;
+     int aligned_p;
+{
+  if (size == UNITS_PER_WORD && aligned_p
+      && function_label_operand (x, VOIDmode))
+    {
+      fputs (size == 8? "\t.dword\tP%" : "\t.word\tP%", asm_out_file);
+      output_addr_const (asm_out_file, x);
+      fputc ('\n', asm_out_file);
+      return true;
+    }
+  return default_assemble_integer (x, size, aligned_p);
+}
+\f
 /* Output an ascii string.  */
 void
 output_ascii (file, p, size)
index f6255fae0fe63418d7a666f9e15dd471ac9081da..525a9420d2d65bae034e1d347641f1afe3b1d207 100644 (file)
@@ -1751,43 +1751,6 @@ while (0)
        fprintf (FILE, "\t.word 0x%lx\n", l);                           \
      } while (0)
 
-/* This is how to output an assembler line defining an `int' constant. 
-
-   This is made more complicated by the fact that functions must be
-   prefixed by a P% as well as code label references for the exception
-   table -- otherwise the linker chokes.  */
-
-#define ASM_OUTPUT_INT(FILE,VALUE)  \
-{ fputs ("\t.word ", FILE);                    \
-  if (function_label_operand (VALUE, VOIDmode))        \
-    fputs ("P%", FILE);                                \
-  output_addr_const (FILE, (VALUE));           \
-  fputs ("\n", FILE);}
-
-/* Likewise for `short' and `char' constants.  */
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE)  \
-( fputs ("\t.half ", FILE),                    \
-  output_addr_const (FILE, (VALUE)),           \
-  fputs ("\n", FILE))
-
-#define ASM_OUTPUT_CHAR(FILE,VALUE)  \
-( fputs ("\t.byte ", FILE),                    \
-  output_addr_const (FILE, (VALUE)),           \
-  fputs ("\n", FILE))
-
-/* 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))
-
-/* C string constants giving the pseudo-op to use for a sequence of
-   2, 4, and 8 byte unaligned constants.  dwarf2out.c needs these.  */
-
-#define UNALIGNED_SHORT_ASM_OP         (TARGET_GAS ? "\t.half " : NULL)
-#define UNALIGNED_INT_ASM_OP           (TARGET_GAS ? "\t.word " : NULL)
-#define UNALIGNED_DOUBLE_INT_ASM_OP    (TARGET_GAS ? "\t.dword " : NULL)
-
 #define ASM_GLOBALIZE_LABEL(FILE, NAME)                                        \
   do {                                                                 \
     /* We only handle DATA objects here, functions are globalized in   \
index 03e596c5afe327d17afb4801864a729146a7cd8b..505456550bd72a0e0b718e6e593564f7b64aeaef 100644 (file)
@@ -53,11 +53,21 @@ int current_first_parm_offset;
 /* rtx cc0_reg_rtx; - no longer needed? */
 
 static rtx find_addr_reg PARAMS ((rtx)); 
-static const char *singlemove_string PARAMS ((rtx *)); 
+static const char *singlemove_string PARAMS ((rtx *));
+static bool pdp11_assemble_integer PARAMS ((rtx, unsigned int, int));
 static void pdp11_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void pdp11_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_BYTE_OP
+#define TARGET_ASM_BYTE_OP NULL
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP NULL
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP NULL
+#undef TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER pdp11_assemble_integer
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE pdp11_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
@@ -944,6 +954,34 @@ print_operand_address (file, addr)
     }
 }
 
+/* Target hook to assemble integer objects.  We need to use the
+   pdp-specific version of output_addr_const.  */
+
+static bool
+pdp11_assemble_integer (x, size, aligned_p)
+     rtx x;
+     unsigned int size;
+     int aligned_p;
+{
+  if (aligned_p)
+    switch (size)
+      {
+      case 1:
+       fprintf (asm_out_file, "\t.byte\t");
+       output_addr_const_pdp11 (asm_out_file, x);
+       fprintf (asm_out_file, " /* char */\n");
+       return true;
+
+      case 2:
+       fprintf (asm_out_file, TARGET_UNIX_ASM ? "\t" : "\t.word\t");
+       output_addr_const_pdp11 (asm_out_file, x);
+       fprintf (asm_out_file, " /* short */\n");
+       return true;
+      }
+  return default_assemble_integer (x, size, aligned_p);
+}
+
+
 /* register move costs, indexed by regs */
 
 static int move_costs[N_REG_CLASSES][N_REG_CLASSES] = 
index 5f8d968c2b3f8b2c6e69891bec6f80a7b74a4b82..61327e748f583ad256b108b36bde263c709d06e8 100644 (file)
@@ -1099,25 +1099,6 @@ fprintf (FILE, "$help$: . = .+8 ; space for tmp moves!\n")       \
 #define ASM_OUTPUT_FLOAT(FILE,VALUE)  \
   fprintf (FILE, "\tfloat %.12e\n", (VALUE))
 
-/* Likewise for `short' and `char' constants.  */
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE)  \
-( fprintf (FILE, TARGET_UNIX_ASM ? "\t" : "\t.word "), \
-  output_addr_const_pdp11 (FILE, (VALUE)),             \
-  fprintf (FILE, " /*short*/\n"))
-
-#define ASM_OUTPUT_CHAR(FILE,VALUE)  \
-( fprintf (FILE, "\t.byte "),                  \
-  output_addr_const_pdp11 (FILE, (VALUE)),             \
-  fprintf (FILE, " /* char */\n"))
-
-/* This is how to output an assembler line for a numeric constant byte.
-   This won't actually be used since we define ASM_OUTPUT_CHAR.
-*/
-
-#define ASM_OUTPUT_BYTE(FILE,VALUE)  \
-  fprintf (FILE, "\t.byte %o\n", (VALUE))
-
 #define ASM_OUTPUT_ASCII(FILE, P, SIZE)  \
   output_ascii (FILE, P, SIZE)
 
@@ -1228,10 +1209,10 @@ JMP     FUNCTION        0x0058  0x0000 <- FUNCTION
   if (TARGET_SPLIT)                    \
     abort();                           \
                                        \
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x9400+STATIC_CHAIN_REGNUM)); \
-  ASM_OUTPUT_SHORT (FILE, const0_rtx);                         \
-  ASM_OUTPUT_SHORT (FILE, GEN_INT(0x0058));                    \
-  ASM_OUTPUT_SHORT (FILE, const0_rtx);                         \
+  assemble_aligned_integer (2, GEN_INT (0x9400+STATIC_CHAIN_REGNUM));  \
+  assemble_aligned_integer (2, const0_rtx);                            \
+  assemble_aligned_integer (2, GEN_INT(0x0058));                       \
+  assemble_aligned_integer (2, const0_rtx);                            \
 }
 
 #define TRAMPOLINE_SIZE 8
index 115062d725724c1102653c03d400f50e9f8f85b7..11c6aad9d61d6d30ed46b99131e9959a26c1b530 100644 (file)
@@ -1049,7 +1049,6 @@ struct pj_args
   fprintf (FILE,"\t! %s\n", TARGET_LITTLE_ENDIAN ? ".little" : ".big");      \
   fprintf (FILE,"\t.align 4\n");
 
-#define ASM_LONG ".long"
 #define ASM_APP_ON              ""
 #define ASM_APP_OFF             ""
 #define FILE_ASM_OP             "\t.file\n"
@@ -1201,24 +1200,6 @@ do { char dstr[30];                                     \
      fprintf ((FILE), "\t.float %s\n", dstr);           \
    } while (0)
 
-#define ASM_OUTPUT_INT(STREAM, EXP)             \
-  (fprintf ((STREAM), "\t.long\t"),             \
-   output_addr_const ((STREAM), (EXP)),         \
-   fputc ('\n', (STREAM)))
-
-#define ASM_OUTPUT_SHORT(STREAM, EXP)   \
-  (fprintf ((STREAM), "\t.short\t"),    \
-   output_addr_const ((STREAM), (EXP)), \
-   fputc ('\n', (STREAM)))
-
-#define ASM_OUTPUT_CHAR(STREAM, EXP)            \
-  (fprintf ((STREAM), "\t.byte\t"),             \
-   output_addr_const ((STREAM), (EXP)),         \
-   fputc ('\n', (STREAM)))
-
-#define ASM_OUTPUT_BYTE(STREAM, VALUE)          \
-  fprintf ((STREAM), "\t.byte\t%d\n", (VALUE))  
-
 /* This is how to output an assembler line
    that says to advance the location counter by SIZE bytes.  */
 
index 2a1cd2b12a4f15ec98f6e6f5bb7b1f9bab812dfa..f9b7e9d89895ba62e633fff518782c8705d7505c 100644 (file)
@@ -1404,30 +1404,6 @@ struct rt_cargs {int gregs, fregs; };
        fprintf (FILE, "\t.long 0x%x\n", u_i_f.i);\
      } 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.short "),                 \
-  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", (VALUE))
-
 /* This is how to output code to push a register on the stack.
    It need not be very fast code.  */
 
index 785ee88ebb0d9071071361a714edede1c0c277d6..80a4c8abae46f39f8a98d938ad6fb78d021b4b9e 100644 (file)
@@ -274,29 +274,8 @@ do {                                               \
               || (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT          \
                   && ! TARGET_NO_FP_IN_TOC)))))
 
-/* This is how to output an assembler line defining an `int'
-   constant.  */
-#undef  ASM_OUTPUT_INT
-#define ASM_OUTPUT_INT(FILE, VALUE)            \
-  do                                           \
-    {                                          \
-      fputs ("\t.long ", (FILE));              \
-      output_addr_const ((FILE), (VALUE));     \
-      putc ('\n', (FILE));                     \
-    }                                          \
-  while (0)
-
-/* This is how to output an assembler line defining a `double int'
-   constant.  */
-#undef  ASM_OUTPUT_DOUBLE_INT
-#define ASM_OUTPUT_DOUBLE_INT(FILE, VALUE)     \
-  do                                           \
-    {                                          \
-      fputs (DOUBLE_INT_ASM_OP, (FILE));       \
-      output_addr_const ((FILE), (VALUE));     \
-      putc ('\n', (FILE));                     \
-    }                                          \
-  while (0)
-
 #undef  ASM_DEFAULT_SPEC
 #define        ASM_DEFAULT_SPEC "-mppc64"
+
+/* We don't need to generate entries in .fixup.  */
+#undef RELOCATABLE_NEEDS_FIXUP
index 5b4c86eec5b1c807185b04cf2ac7e5ee107d660b..b2abd819cf7192d230919905d8034dfef769a2d1 100644 (file)
@@ -135,6 +135,7 @@ static void toc_hash_mark_table PARAMS ((void *));
 static int constant_pool_expr_1 PARAMS ((rtx, int *, int *));
 static void rs6000_free_machine_status PARAMS ((struct function *));
 static void rs6000_init_machine_status PARAMS ((struct function *));
+static bool rs6000_assemble_integer PARAMS ((rtx, unsigned int, int));
 static int rs6000_ra_ever_killed PARAMS ((void));
 static tree rs6000_handle_longcall_attribute PARAMS ((tree *, tree, tree, int, bool *));
 const struct attribute_spec rs6000_attribute_table[];
@@ -222,6 +223,35 @@ static const char alt_reg_names[][8] =
 #undef TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE rs6000_attribute_table
 
+#undef TARGET_ASM_ALIGNED_DI_OP
+#define TARGET_ASM_ALIGNED_DI_OP DOUBLE_INT_ASM_OP
+
+/* Default unaligned ops are only provided for ELF.  Find the ops needed
+   for non-ELF systems.  */
+#ifndef OBJECT_FORMAT_ELF
+#ifdef OBJECT_FORMAT_COFF
+/* For ECOFF.  rs6000_assemble_integer will handle unaligned DIs on
+   64-bit targets.  */
+#undef TARGET_ASM_UNALIGNED_HI_OP
+#define TARGET_ASM_UNALIGNED_HI_OP "\t.vbyte\t2,"
+#undef TARGET_ASM_UNALIGNED_SI_OP
+#define TARGET_ASM_UNALIGNED_SI_OP "\t.vbyte\t4,"
+#undef TARGET_ASM_UNALIGNED_DI_OP
+#define TARGET_ASM_UNALIGNED_DI_OP "\t.vbyte\t8,"
+#else
+/* For Darwin.  */
+#undef TARGET_ASM_UNALIGNED_HI_OP
+#define TARGET_ASM_UNALIGNED_HI_OP "\t.short\t"
+#undef TARGET_ASM_UNALIGNED_SI_OP
+#define TARGET_ASM_UNALIGNED_SI_OP "\t.long\t"
+#endif
+#endif
+
+/* This hook deals with fixups for relocatable code and DI-mode objects
+   in 64-bit code.  */
+#undef TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER rs6000_assemble_integer
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE rs6000_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
@@ -532,6 +562,14 @@ rs6000_override_options (default_cpu)
   if (TARGET_TOC) 
     ASM_GENERATE_INTERNAL_LABEL (toc_label_name, "LCTOC", 1);
 
+  /* We can only guarantee the availability of DI pseudo-ops when
+     assembling for 64-bit targets.  */
+  if (!TARGET_POWERPC64)
+    {
+      targetm.asm_out.aligned_op.di = NULL;
+      targetm.asm_out.unaligned_op.di = NULL;
+    }
+
   /* Arrange to save and restore machine status around nested functions.  */
   init_machine_status = rs6000_init_machine_status;
   free_machine_status = rs6000_free_machine_status;
@@ -6019,6 +6057,70 @@ print_operand_address (file, x)
     abort ();
 }
 \f
+/* Target hook for assembling integer objects.  The powerpc version has
+   to handle fixup entries for relocatable code if RELOCATABLE_NEEDS_FIXUP
+   is defined.  It also needs to handle DI-mode objects on 64-bit
+   targets.  */
+
+static bool
+rs6000_assemble_integer (x, size, aligned_p)
+     rtx x;
+     unsigned int size;
+     int aligned_p;
+{
+#ifdef RELOCATABLE_NEEDS_FIXUP
+  /* Special handling for SI values.  */
+  if (size == 4 && aligned_p)
+    {
+      extern int in_toc_section PARAMS ((void));
+      static int recurse = 0;
+      
+      /* For -mrelocatable, we mark all addresses that need to be fixed up
+        in the .fixup section.  */
+      if (TARGET_RELOCATABLE
+         && !in_toc_section ()
+         && !in_text_section ()
+         && !recurse
+         && GET_CODE (x) != CONST_INT
+         && GET_CODE (x) != CONST_DOUBLE
+         && CONSTANT_P (x))
+       {
+         char buf[256];
+
+         recurse = 1;
+         ASM_GENERATE_INTERNAL_LABEL (buf, "LCP", fixuplabelno);
+         fixuplabelno++;
+         ASM_OUTPUT_LABEL (asm_out_file, buf);
+         fprintf (asm_out_file, "\t.long\t(");
+         output_addr_const (asm_out_file, x);
+         fprintf (asm_out_file, ")@fixup\n");
+         fprintf (asm_out_file, "\t.section\t\".fixup\",\"aw\"\n");
+         ASM_OUTPUT_ALIGN (asm_out_file, 2);
+         fprintf (asm_out_file, "\t.long\t");
+         assemble_name (asm_out_file, buf);
+         fprintf (asm_out_file, "\n\t.previous\n");
+         recurse = 0;
+         return true;
+       }
+      /* Remove initial .'s to turn a -mcall-aixdesc function
+        address into the address of the descriptor, not the function
+        itself.  */
+      else if (GET_CODE (x) == SYMBOL_REF
+              && XSTR (x, 0)[0] == '.'
+              && DEFAULT_ABI == ABI_AIX)
+       {
+         const char *name = XSTR (x, 0);
+         while (*name == '.')
+           name++;
+
+         fprintf (asm_out_file, "\t.long\t%s\n", name);
+         return true;
+       }
+    }
+#endif /* RELOCATABLE_NEEDS_FIXUP */
+  return default_assemble_integer (x, size, aligned_p);
+}
+\f
 enum rtx_code
 rs6000_reverse_condition (mode, code)
      enum machine_mode mode;
index d84706e9911d3082a95636014626de9ee313b9ae..8669324b126dd5e40012c085c37d0405246f2426 100644 (file)
@@ -2727,50 +2727,6 @@ extern char rs6000_reg_names[][8];       /* register names (0 vs. %r0).  */
     fprintf (FILE, "\t.long 0x%lx\n", t & 0xffffffff); \
   }
 
-/* This is how to output an assembler line defining an `int' constant.  */
-
-#define ASM_OUTPUT_DOUBLE_INT(FILE,VALUE)                              \
-do {                                                                   \
-  if (TARGET_32BIT)                                                    \
-    {                                                                  \
-      assemble_integer (operand_subword ((VALUE), 0, 0, DImode),       \
-                        UNITS_PER_WORD, BITS_PER_WORD, 1);             \
-      assemble_integer (operand_subword ((VALUE), 1, 0, DImode),       \
-                        UNITS_PER_WORD, BITS_PER_WORD, 1);             \
-    }                                                                  \
-  else                                                                 \
-    {                                                                  \
-      fprintf (FILE, "%s", DOUBLE_INT_ASM_OP);                         \
-      output_addr_const (FILE, (VALUE));                               \
-      putc ('\n', FILE);                                               \
-    }                                                                  \
-} while (0)
-
-#define ASM_OUTPUT_INT(FILE,VALUE)  \
-( fputs ("\t.long ", FILE),                    \
-  output_addr_const (FILE, (VALUE)),           \
-  putc ('\n', FILE))
-
-/* Likewise for `char' and `short' constants.  */
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE)  \
-( fputs ("\t.short ", FILE),                   \
-  output_addr_const (FILE, (VALUE)),           \
-  putc ('\n', FILE))
-
-#define ASM_OUTPUT_CHAR(FILE,VALUE)  \
-( fputs ("\t.byte ", FILE),                    \
-  output_addr_const (FILE, (VALUE)),           \
-  putc ('\n', FILE))
-
-/* 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 used by the definition of ASM_OUTPUT_ADDR_ELT in defaults.h.  */
-#define ASM_LONG (TARGET_32BIT ? ".long" : DOUBLE_INT_ASM_OP)
-
 /* This is how to output an element of a case-vector that is relative.  */
 
 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
index 56e16ba7877599ee90852f95b725a843f9402151..e5abf8e9b139e5498c7d7af0dddf7a01c5660025 100644 (file)
@@ -485,6 +485,12 @@ toc_section ()                                                             \
            }                                                           \
        }                                                               \
     }                                                                  \
+}                                                                      \
+                                                                       \
+extern int in_toc_section PARAMS ((void));                             \
+int in_toc_section ()                                                  \
+{                                                                      \
+  return in_section == in_toc;                                         \
 }
 
 #define        SDATA_SECTION_FUNCTION                                          \
@@ -788,59 +794,6 @@ extern int fixuplabelno;
 #define TARGET_ASM_CONSTRUCTOR  rs6000_elf_asm_out_constructor
 #define TARGET_ASM_DESTRUCTOR   rs6000_elf_asm_out_destructor
 
-/* This is how to output an assembler line defining an `int' constant.
-   For -mrelocatable, we mark all addresses that need to be fixed up
-   in the .fixup section.  */
-/* Override rs6000.h definition.  */
-#undef ASM_OUTPUT_INT
-#define ASM_OUTPUT_INT(FILE,VALUE)                                     \
-do {                                                                   \
-  static int recurse = 0;                                              \
-  if (TARGET_RELOCATABLE                                               \
-      && in_section != in_toc                                          \
-      && in_section != in_text                                         \
-      && !recurse                                                      \
-      && GET_CODE (VALUE) != CONST_INT                                 \
-      && GET_CODE (VALUE) != CONST_DOUBLE                              \
-      && CONSTANT_P (VALUE))                                           \
-    {                                                                  \
-      char buf[256];                                                   \
-                                                                       \
-      recurse = 1;                                                     \
-      ASM_GENERATE_INTERNAL_LABEL (buf, "LCP", fixuplabelno);          \
-      fixuplabelno++;                                                  \
-      ASM_OUTPUT_LABEL (FILE, buf);                                    \
-      fprintf (FILE, "\t.long (");                                     \
-      output_addr_const (FILE, (VALUE));                               \
-      fprintf (FILE, ")@fixup\n");                                     \
-      fprintf (FILE, "\t.section\t\".fixup\",\"aw\"\n");               \
-      ASM_OUTPUT_ALIGN (FILE, 2);                                      \
-      fprintf (FILE, "\t.long\t");                                     \
-      assemble_name (FILE, buf);                                       \
-      fprintf (FILE, "\n\t.previous\n");                               \
-      recurse = 0;                                                     \
-    }                                                                  \
-  /* Remove initial .'s to turn a -mcall-aixdesc function              \
-     address into the address of the descriptor, not the function      \
-     itself.  */                                                       \
-  else if (GET_CODE (VALUE) == SYMBOL_REF                              \
-          && XSTR (VALUE, 0)[0] == '.'                                 \
-          && DEFAULT_ABI == ABI_AIX)                                   \
-    {                                                                  \
-      const char *name = XSTR (VALUE, 0);                              \
-      while (*name == '.')                                             \
-       name++;                                                         \
-                                                                       \
-      fprintf (FILE, "\t.long %s\n", name);                            \
-    }                                                                  \
-  else                                                                 \
-    {                                                                  \
-      fprintf (FILE, "\t.long ");                                      \
-      output_addr_const (FILE, (VALUE));                               \
-      fprintf (FILE, "\n");                                            \
-    }                                                                  \
-} while (0)
-
 /* This is the end of what might become sysv4.h.  */
 
 /* Use DWARF 2 debugging information by default.  */
@@ -1497,3 +1450,6 @@ ncrtn.o%s"
 #define TARGET_ASM_EXCEPTION_SECTION readonly_data_section
 
 #define DOUBLE_INT_ASM_OP "\t.quad\t"
+
+/* Generate entries in .fixup for relocatable addresses.  */
+#define RELOCATABLE_NEEDS_FIXUP
index 246e9d9d593059934f9c954d8467b88074f3547a..095a5663ea845b679284c9985a9727df78cc21b1 100644 (file)
@@ -472,17 +472,8 @@ toc_section ()                                             \
 /* This is how we tell the assembler that two symbols have the same value.  */
 #define SET_ASM_OP "\t.set "
 
-/* Used by definition of ASM_OUTPUT_DOUBLE_INT */
-#define DOUBLE_INT_ASM_OP "\t.llong "
-
-/* These are various definitions for DWARF output.  They could just
-   use '.long' or '.word', but that aligns to a 4-byte boundary which
-   is not what is required.  So we define a million macros...  */
-
-#define UNALIGNED_SHORT_ASM_OP         "\t.vbyte\t2,"
-#define UNALIGNED_INT_ASM_OP           "\t.vbyte\t4,"
-/* Only define if alignment greater than 4.  */
-#define UNALIGNED_DOUBLE_INT_ASM_OP    (TARGET_64BIT ? "\t.vbyte\t8," : NULL)
+/* Used by rs6000_assemble_integer, among others.  */
+#define DOUBLE_INT_ASM_OP "\t.llong\t"
 
 /* Output before instructions.  */
 #define TEXT_SECTION_ASM_OP "\t.csect .text[PR]"
index ce1477e1944bdea651caf8e790307fb01d661f99..25bae58d475eb5e3b779993b62c4b4f9e5c04946 100644 (file)
@@ -76,9 +76,6 @@ Boston, MA 02111-1307, USA.  */
 
 /* Assembler pseudos to introduce constants of various size.  */
 
-#define ASM_SHORT "\t.word"
-#define ASM_LONG "\t.long"
-#define ASM_QUAD "\t.quad"
 #define ASM_DOUBLE "\t.double"
 
 
@@ -130,44 +127,6 @@ Boston, MA 02111-1307, USA.  */
   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
 
 
-#define ASM_OUTPUT_DOUBLE_INT(FILE, VALUE)                             \
-do { fprintf ((FILE), "%s\t", ASM_QUAD);                               \
-  /* Work around bug in some GNU as versions */                                \
-  if (GET_CODE (VALUE) == CONST_INT && INTVAL (VALUE) < INT_MIN)       \
-    fprintf ((FILE), HOST_WIDE_INT_PRINT_HEX, INTVAL (x));             \
-  else                                                                 \
-    output_addr_const ((FILE), (VALUE));                               \
-  putc ('\n', (FILE));                                                 \
- } while (0)
-
-
-/* This is how to output an assembler line defining an `int' constant.  */
-
-#undef ASM_OUTPUT_INT
-#define ASM_OUTPUT_INT(FILE, VALUE)             \
-do { fprintf (FILE, "%s\t", ASM_LONG);          \
-  output_addr_const (FILE, (VALUE));            \
-  putc ('\n',FILE);                             \
- } while (0)
-
-/* Likewise for `char' and `short' constants. 
-   is this supposed to do align too?? */
-
-#define ASM_OUTPUT_SHORT(FILE, VALUE)           \
-( fprintf (FILE, "%s\t", ASM_SHORT),            \
-  output_addr_const (FILE, (VALUE)),            \
-  putc ('\n',FILE))
-
-#define ASM_OUTPUT_CHAR(FILE, VALUE)            \
-( fprintf (FILE, "\t%s\t", ASM_BYTE_OP),        \
-  output_addr_const (FILE, (VALUE)),            \
-  putc ('\n', FILE))
-
-/* This is how to output an assembler line for a numeric constant byte.  */
-
-#define ASM_OUTPUT_BYTE(FILE, VALUE)  \
-  fprintf ((FILE), "\t%s\t0x%x\n", ASM_BYTE_OP, (int)(VALUE))
-
      /* internal macro to output long */
 #define _ASM_OUTPUT_LONG(FILE, VALUE)                                   \
       fprintf (FILE, "\t.long\t0x%lX\n", VALUE);
@@ -176,13 +135,13 @@ do { fprintf (FILE, "%s\t", ASM_LONG);          \
 /* This is how to output an element of a case-vector that is absolute.  */
 
 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)                   \
-  fprintf (FILE, "%s\t%s%d\n", TARGET_64BIT?ASM_QUAD:ASM_LONG,         \
+  fprintf (FILE, "%s%s%d\n", integer_asm_op (UNITS_PER_WORD, TRUE), \
           LPREFIX, VALUE)
 
 /* This is how to output an element of a case-vector that is relative.  */
 
 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL)               \
-  fprintf (FILE, "%s\t%s%d-%s%d\n", TARGET_64BIT?ASM_QUAD:ASM_LONG,    \
+  fprintf (FILE, "%s%s%d-%s%d\n", integer_asm_op (UNITS_PER_WORD, TRUE), \
           LPREFIX, VALUE, LPREFIX, REL)
 
 
index 743276c4da25a2b10b4121d9829c95f79a8a228b..83e02a8a845ba8ae2b872fed6224efbc9ff7e353 100644 (file)
@@ -46,9 +46,17 @@ Boston, MA 02111-1307, USA.  */
 #include "debug.h"
 
 
+static bool s390_assemble_integer PARAMS ((rtx, unsigned int, int));
 static int s390_adjust_cost PARAMS ((rtx, rtx, rtx, int));
 static int s390_adjust_priority PARAMS ((rtx, int));
 
+#undef  TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
+#undef  TARGET_ASM_ALIGNED_DI_OP
+#define TARGET_ASM_ALIGNED_DI_OP "\t.quad\t"
+#undef  TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER s390_assemble_integer
+
 #undef  TARGET_ASM_FUNCTION_PROLOGUE 
 #define TARGET_ASM_FUNCTION_PROLOGUE s390_function_prologue
 
@@ -1951,6 +1959,28 @@ print_operand (file, x, code)
     }
 }
 
+/* Target hook for assembling integer objects.  We need to define it
+   here to work a round a bug in some versions of GAS, which couldn't
+   handle values smaller than INT_MIN when printed in decimal.  */
+
+static bool
+s390_assemble_integer (x, size, aligned_p)
+     rtx x;
+     unsigned int size;
+     int aligned_p;
+{
+  if (size == 8 && aligned_p
+      && GET_CODE (x) == CONST_INT && INTVAL (x) < INT_MIN)
+    {
+      fputs ("\t.quad\t", asm_out_file);
+      fprintf (asm_out_file, HOST_WIDE_INT_PRINT_HEX, INTVAL (x));
+      putc ('\n', asm_out_file);
+      return true;
+    }
+  return default_assemble_integer (x, size, aligned_p);
+}
+
+
 #define DEBUG_SCHED 0
 
 /* Returns true if register REGNO is used  for forming 
index 988d7e26563820b93d87065e389f9a860b7d0837..9b85fb4d0fb87846fabb544ff612f535680d3183 100644 (file)
@@ -1413,7 +1413,7 @@ extern int s390_nr_constants;
              || GET_CODE (EXP) == SYMBOL_REF                               \
              || GET_CODE (EXP) == LABEL_REF ))                             \
         {                                                                  \
-          fprintf (FILE, "%s\t",TARGET_64BIT ? ASM_QUAD : ASM_LONG);       \
+         fputs (integer_asm_op (UNITS_PER_WORD, TRUE), FILE);              \
           s390_output_symbolic_const (FILE, EXP);                          \
           fputc ('\n', (FILE));                                                    \
        }                                                                   \
index 322de210a1805f1a07e3f35662fad1c193556c52..d08100d257eea5b6ec1b4c42f228b59aec3cb009 100644 (file)
@@ -170,6 +170,12 @@ static int sh_adjust_cost PARAMS ((rtx, rtx, rtx, int));
 #undef TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE sh_attribute_table
 
+/* The next two are used for debug info when compiling with -gdwarf.  */
+#undef TARGET_ASM_UNALIGNED_HI_OP
+#define TARGET_ASM_UNALIGNED_HI_OP "\t.uaword\t"
+#undef TARGET_ASM_UNALIGNED_SI_OP
+#define TARGET_ASM_UNALIGNED_SI_OP "\t.ualong\t"
+
 #undef TARGET_ASM_FUNCTION_EPILOGUE
 #define TARGET_ASM_FUNCTION_EPILOGUE sh_output_function_epilogue
 
index cdb25c89ec2fa3fcfc355510b4e811ce9823997b..b2dd8f9bcc681a012e6329f6848ea6fca15ee1bb 100644 (file)
@@ -2087,28 +2087,6 @@ do { char dstr[30];                                      \
      fprintf ((FILE), "\t.float %s\n", dstr);          \
    } while (0)
 
-#define ASM_OUTPUT_INT(STREAM, EXP)            \
-  (fprintf ((STREAM), "\t.long\t"),            \
-   output_addr_const ((STREAM), (EXP)),        \
-   fputc ('\n', (STREAM)))
-
-#define ASM_OUTPUT_SHORT(STREAM, EXP)  \
-  (fprintf ((STREAM), "\t.short\t"),   \
-   output_addr_const ((STREAM), (EXP)),        \
-   fputc ('\n', (STREAM)))
-
-#define ASM_OUTPUT_CHAR(STREAM, EXP)           \
-  (fprintf ((STREAM), "\t.byte\t"),            \
-   output_addr_const ((STREAM), (EXP)),        \
-   fputc ('\n', (STREAM)))
-
-#define ASM_OUTPUT_BYTE(STREAM, VALUE)         \
-  fprintf ((STREAM), "\t.byte\t%d\n", (VALUE))         \
-
-/* The next two are used for debug info when compiling with -gdwarf.  */
-#define UNALIGNED_SHORT_ASM_OP "\t.uaword\t"
-#define UNALIGNED_INT_ASM_OP   "\t.ualong\t"
-
 /* Loop alignment is now done in machine_dependent_reorg, so that
    branch shortening can know about it.  */
 
index 54b672e826f70a434078cd54df744cfe80173581..613844654774b145a2ddce1bed9ad0adba2d20db 100644 (file)
@@ -353,14 +353,6 @@ do {                                                                       \
 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)  \
   sprintf (LABEL, "*.L%s%ld", PREFIX, (long)(NUM))
 
-/* Define the names of various pseudo-ops used by the Sparc/svr4 assembler.
-   ??? If ints are 64 bits then UNALIGNED_INT_ASM_OP (defined elsewhere) is
-   misnamed.  These should all refer to explicit sizes (half/word/xword?),
-   anything other than short/int/long/etc.  */
-
-#undef  UNALIGNED_DOUBLE_INT_ASM_OP
-#define UNALIGNED_DOUBLE_INT_ASM_OP    "\t.uaxword\t"
-
 /* DWARF bits.  */
 
 /* Follow Irix 6 and not the Dwarf2 draft in using 64-bit offsets. 
index 9f6e38c25960e45359d8ee94e1b2f832766fee91..82f7d32ab225ff2229ee38b9525b9fee4367de31 100644 (file)
@@ -95,13 +95,6 @@ Boston, MA 02111-1307, USA.  */
 #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
   fprintf (FILE, "\t.skip %u\n", (SIZE))
 
-/* Use .uahalf/.uaword so packed structure members don't generate
-   assembler errors when using the native assembler.  */
-#undef ASM_SHORT
-#define ASM_SHORT ".uahalf"
-#undef ASM_LONG
-#define ASM_LONG ".uaword"
-
 /* This is how to output a definition of an internal numbered label where
    PREFIX is the class of label and NUM is the number within the class.  */
 
index 40d18dfac97f9e02cef38ec473fd93697efd6441..3bd2a53f562fb3fe3edb47d021cefb1114b51db5 100644 (file)
@@ -114,8 +114,3 @@ crtbegin.o%s \
 
 #undef PREFERRED_DEBUGGING_TYPE
 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-
-/* Define the names of various pseudo-ops used by the Sparc/svr4 assembler.  */
-
-#undef UNALIGNED_DOUBLE_INT_ASM_OP
-#define UNALIGNED_DOUBLE_INT_ASM_OP    "\t.uaxword\t"
index 7e0e1fcad9b9b4decf623506cfd1ce0bb233de6d..b0778eb85ef739ed0e556e482bfe98165e77c355 100644 (file)
@@ -90,7 +90,6 @@ extern const char *output_return PARAMS ((rtx *));
 extern const char *output_sibcall PARAMS ((rtx, rtx));
 extern char *output_v9branch PARAMS ((rtx, int, int, int, int, int, rtx));
 extern void emit_v9_brxx_insn PARAMS ((enum rtx_code, rtx, rtx));
-extern void output_double_int PARAMS ((FILE *, rtx));
 extern void print_operand PARAMS ((FILE *, rtx, int));
 extern int mems_ok_for_ldd_peep PARAMS ((rtx, rtx));
 extern int arith_double_4096_operand PARAMS ((rtx, enum machine_mode));
index 48906d46bf4e9b689e52992d21169300e36db2e3..d93f57c92c24fb0fce30fe77c28fd59c8c779427 100644 (file)
@@ -151,6 +151,7 @@ static void sparc_add_gc_roots    PARAMS ((void));
 static void mark_ultrasparc_pipeline_state PARAMS ((void *));
 static int check_return_regs PARAMS ((rtx));
 static int epilogue_renumber PARAMS ((rtx *, int));
+static bool sparc_assemble_integer PARAMS ((rtx, unsigned int, int));
 static int ultra_cmove_results_ready_p PARAMS ((rtx));
 static int ultra_fpmode_conflict_exists PARAMS ((enum machine_mode));
 static rtx *ultra_find_type PARAMS ((int, rtx *, int));
@@ -202,6 +203,27 @@ struct sparc_cpu_select sparc_select[] =
 enum processor_type sparc_cpu;
 \f
 /* Initialize the GCC target structure.  */
+
+/* The sparc default is to use .half rather than .short for aligned
+   HI objects.  Use .word instead of .long on non-ELF systems.  */
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.half\t"
+#ifndef OBJECT_FORMAT_ELF
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
+#endif
+
+#undef TARGET_ASM_UNALIGNED_HI_OP
+#define TARGET_ASM_UNALIGNED_HI_OP "\t.uahalf\t"
+#undef TARGET_ASM_UNALIGNED_SI_OP
+#define TARGET_ASM_UNALIGNED_SI_OP "\t.uaword\t"
+#undef TARGET_ASM_UNALIGNED_DI_OP
+#define TARGET_ASM_UNALIGNED_DI_OP "\t.uaxword\t"
+
+/* The target hook has to handle DI-mode values.  */
+#undef TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER sparc_assemble_integer
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE sparc_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
@@ -401,6 +423,10 @@ sparc_override_options ()
   if (flag_pcc_struct_return == DEFAULT_PCC_STRUCT_RETURN)
     flag_pcc_struct_return = (TARGET_ARCH64 ? 0 : 1);
 
+  /* Only use .uaxword when compiling for a 64-bit target.  */
+  if (!TARGET_ARCH64)
+    targetm.asm_out.unaligned_op.di = NULL;
+
   /* Do various machine dependent initializations.  */
   sparc_init_modes ();
 
@@ -6008,65 +6034,33 @@ print_operand (file, x, code)
   else { output_addr_const (file, x); }
 }
 \f
-/* This function outputs assembler code for VALUE to FILE, where VALUE is
-   a 64 bit (DImode) value.  */
+/* Target hook for assembling integer objects.  The sparc version has
+   special handling for aligned DI-mode objects.  */
 
-/* ??? If there is a 64 bit counterpart to .word that the assembler
-   understands, then using that would simply this code greatly.  */
-/* ??? We only output .xword's for symbols and only then in environments
-   where the assembler can handle them.  */
-
-void
-output_double_int (file, value)
-     FILE *file;
-     rtx value;
+static bool
+sparc_assemble_integer (x, size, aligned_p)
+     rtx x;
+     unsigned int size;
+     int aligned_p;
 {
-  if (GET_CODE (value) == CONST_INT)
-    {
-      /* ??? This has endianness issues.  */
-#if HOST_BITS_PER_WIDE_INT == 64
-      HOST_WIDE_INT xword = INTVAL (value);
-      HOST_WIDE_INT high, low;
-
-      high = (xword >> 32) & 0xffffffff;
-      low  = xword & 0xffffffff;
-      ASM_OUTPUT_INT (file, GEN_INT (high));
-      ASM_OUTPUT_INT (file, GEN_INT (low));
-#else
-      if (INTVAL (value) < 0)
-       ASM_OUTPUT_INT (file, constm1_rtx);
-      else
-       ASM_OUTPUT_INT (file, const0_rtx);
-      ASM_OUTPUT_INT (file, value);
-#endif
-    }
-  else if (GET_CODE (value) == CONST_DOUBLE)
+  /* ??? We only output .xword's for symbols and only then in environments
+     where the assembler can handle them.  */
+  if (aligned_p && size == 8
+      && (GET_CODE (x) != CONST_INT && GET_CODE (x) != CONST_DOUBLE))
     {
-      ASM_OUTPUT_INT (file, GEN_INT (CONST_DOUBLE_HIGH (value)));
-      ASM_OUTPUT_INT (file, GEN_INT (CONST_DOUBLE_LOW (value)));
-    }
-  else if (GET_CODE (value) == SYMBOL_REF
-          || GET_CODE (value) == CONST
-          || GET_CODE (value) == PLUS
-          || (TARGET_ARCH64 &&
-              (GET_CODE (value) == LABEL_REF
-               || GET_CODE (value) == CODE_LABEL
-               || GET_CODE (value) == MINUS)))
-    {
-      if (! TARGET_V9)
+      if (TARGET_V9)
        {
-         ASM_OUTPUT_INT (file, const0_rtx);
-         ASM_OUTPUT_INT (file, value);
+         assemble_integer_with_op ("\t.xword\t", x);
+         return true;
        }
       else
        {
-         fprintf (file, "\t%s\t", ASM_LONGLONG);
-         output_addr_const (file, value);
-         fprintf (file, "\n");
+         assemble_aligned_integer (4, const0_rtx);
+         assemble_aligned_integer (4, x);
+         return true;
        }
     }
-  else
-    abort ();
+  return default_assemble_integer (x, size, aligned_p);
 }
 \f
 /* Return the value of a code used in the .proc pseudo-op that says
index 4d88325d940970708d7f49d35e88a3ed00f659f3..358027537465065dd7f652a1c2c11e964991952d 100644 (file)
@@ -2652,10 +2652,6 @@ do {                                                                     \
 
 /* ??? Try to make the style consistent here (_OP?).  */
 
-#define ASM_LONGLONG   ".xword"
-#define ASM_LONG       ".word"
-#define ASM_SHORT      ".half"
-#define ASM_BYTE_OP    "\t.byte\t"
 #define ASM_FLOAT      ".single"
 #define ASM_DOUBLE     ".double"
 #define ASM_LONGDOUBLE ".xxx"          /* ??? Not known (or used yet).  */
@@ -2732,7 +2728,8 @@ do {                                                                      \
     char str[30];                                              \
     REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t);                  \
     REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str);             \
-    fprintf (FILE, "\t%s\t0x%lx %s ~%s\n", ASM_LONG, t,                \
+    fprintf (FILE, "\t%s\t0x%lx %s ~%s\n",                     \
+            integer_asm_op (4, TRUE), t,                       \
             ASM_COMMENT_START, str);                           \
   }                                                            \
 
@@ -2745,11 +2742,12 @@ do {                                                                    \
   {                                                            \
     long t[2];                                                 \
     char str[30];                                              \
+    const char *long_op = integer_asm_op (4, TRUE);            \
     REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t);                  \
     REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str);             \
-    fprintf (FILE, "\t%s\t0x%lx %s ~%s\n", ASM_LONG, t[0],     \
+    fprintf (FILE, "\t%s\t0x%lx %s ~%s\n", long_op, t[0],      \
             ASM_COMMENT_START, str);                           \
-    fprintf (FILE, "\t%s\t0x%lx\n", ASM_LONG, t[1]);           \
+    fprintf (FILE, "\t%s\t0x%lx\n", long_op, t[1]);            \
   }
 
 /* This is how to output an assembler line defining a `long double'
@@ -2759,43 +2757,16 @@ do {                                                                    \
   {                                                            \
     long t[4];                                                 \
     char str[30];                                              \
+    const char *long_op = integer_asm_op (4, TRUE);            \
     REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), t);             \
     REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str);             \
-    fprintf (FILE, "\t%s\t0x%lx %s ~%s\n", ASM_LONG, t[0],     \
+    fprintf (FILE, "\t%s\t0x%lx %s ~%s\n", long_op, t[0],      \
             ASM_COMMENT_START, str);                           \
-    fprintf (FILE, "\t%s\t0x%lx\n", ASM_LONG, t[1]);           \
-    fprintf (FILE, "\t%s\t0x%lx\n", ASM_LONG, t[2]);           \
-    fprintf (FILE, "\t%s\t0x%lx\n", ASM_LONG, t[3]);           \
+    fprintf (FILE, "\t%s\t0x%lx\n", long_op, t[1]);            \
+    fprintf (FILE, "\t%s\t0x%lx\n", long_op, t[2]);            \
+    fprintf (FILE, "\t%s\t0x%lx\n", long_op, t[3]);            \
   }
 
-/* This is how to output an assembler line defining an `int' constant.  */
-
-#define ASM_OUTPUT_INT(FILE,VALUE)  \
-( fprintf (FILE, "\t%s\t", ASM_LONG),          \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "\n"))
-
-/* This is how to output an assembler line defining a DImode constant.  */
-#define ASM_OUTPUT_DOUBLE_INT(FILE,VALUE)  \
-  output_double_int (FILE, VALUE)
-
-/* Likewise for `char' and `short' constants.  */
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE)  \
-( fprintf (FILE, "\t%s\t", ASM_SHORT),         \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "\n"))
-
-#define ASM_OUTPUT_CHAR(FILE,VALUE)  \
-( fprintf (FILE, "%s", ASM_BYTE_OP),   \
-  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, "%s0x%x\n", ASM_BYTE_OP, (int)(VALUE))
-
 /* This is how we hook in and defer the case-vector until the end of
    the function.  */
 #define ASM_OUTPUT_ADDR_VEC(LAB,VEC) \
index 0848ecd11acaf538b3bab10ab91ec0bcc512c6a6..7f4f7dbbc803edfffc56eee157670047072160e7 100644 (file)
@@ -18,10 +18,5 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* gas supports unaligned data.  */
-#define UNALIGNED_DOUBLE_INT_ASM_OP "\t.uaxword\t"
-#define UNALIGNED_INT_ASM_OP   "\t.uaword\t"
-#define UNALIGNED_SHORT_ASM_OP "\t.uahalf\t"
-
 /* defaults.h will define DWARF2_UNWIND_INFO for us.  */
 #undef DWARF2_UNWIND_INFO
index be10190ff265de72f37cdc5a277129f932226577..a4c7f915c2e9985a372c77f2c5e65f8591eeaf7d 100644 (file)
@@ -87,16 +87,9 @@ Boston, MA 02111-1307, USA.  */
 #define STRING_ASM_OP          "\t.asciz\t"
 #define COMMON_ASM_OP          "\t.common\t"
 #define SKIP_ASM_OP            "\t.skip\t"
-#define UNALIGNED_DOUBLE_INT_ASM_OP (TARGET_ARCH64 ? "\t.uaxword\t" : NULL)
-#define UNALIGNED_INT_ASM_OP   "\t.uaword\t"
-#define UNALIGNED_SHORT_ASM_OP "\t.uahalf\t"
 #define PUSHSECTION_ASM_OP     "\t.pushsection\t"
 #define POPSECTION_ASM_OP      "\t.popsection"
 
-/* This is defined in sparc.h but is not used by svr4.h.  */
-#undef ASM_LONG
-#define ASM_LONG ".long"
-
 /* This is the format used to print the second operand of a .type pseudo-op
    for the Sparc/svr4 assembler.  */
 
index 2f92367e3961764808c91b2869f77d0614a8cb54..a8906c63828b936cd3a0705833041a518133b37e 100644 (file)
@@ -2003,4 +2003,9 @@ xstormy16_handle_interrupt_attribute (node, name, args, flags, no_add_attrs)
   return NULL_TREE;
 }
 \f
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
+
 struct gcc_target targetm = TARGET_INITIALIZER;
index 7ad9c55b63f131f465ccaf4354fa639088fdd650..4f71d53e66ee209a42c348c56da468f6c5dc7013 100644 (file)
@@ -3571,57 +3571,6 @@ do { char dstr[30];                                     \
 /* #define ASM_OUTPUT_SHORT_FLOAT(STREAM, VALUE) */
 /* #define ASM_OUTPUT_BYTE_FLOAT(STREAM, VALUE) */
 
-/* A C statement to output to the stdio stream STREAM an assembler instruction
-   to assemble an integer of 16, 8, 4, 2 or 1 bytes, respectively, whose value
-   is VALUE.  The argument EXP will be an RTL expression which represents a
-   constant value.  Use `output_addr_const (STREAM, EXP)' to output this value
-   as an assembler expression.
-
-   For sizes larger than `UNITS_PER_WORD', if the action of a macro would be
-   identical to repeatedly calling the macro corresponding to a size of
-   `UNITS_PER_WORD', once for each word, you need not define the macro.  */
-/* #define ASM_OUTPUT_QUADRUPLE_INT(STREAM, EXP) */
-/* #define ASM_OUTPUT_DOUBLE_INT(STREAM, EXP) */
-
-/* This is how to output an assembler line defining a `char' constant.  */
-#define ASM_OUTPUT_CHAR(FILE, VALUE)                                   \
-do {                                                                   \
-  fprintf (FILE, "\t.byte\t");                                         \
-  output_addr_const (FILE, (VALUE));                                   \
-  fprintf (FILE, "\n");                                                        \
-} while (0)
-
-/* This is how to output an assembler line defining a `short' constant.  */
-#define ASM_OUTPUT_SHORT(FILE, VALUE)                                  \
-do {                                                                   \
-  fprintf (FILE, "\t.hword\t");                                                \
-  output_addr_const (FILE, (VALUE));                                   \
-  fprintf (FILE, "\n");                                                        \
-} while (0)
-
-/* This is how to output an assembler line defining an `int' constant.
-   We also handle symbol output here.  */
-#define ASM_OUTPUT_INT(FILE, VALUE)                                    \
-do {                                                                   \
-  fprintf (FILE, "\t.word\t");                                         \
-  output_addr_const (FILE, (VALUE));                                   \
-  fprintf (FILE, "\n");                                                        \
-} while (0)
-
-/* A C statement to output to the stdio stream STREAM an assembler instruction
-   to assemble a single byte containing the number VALUE.
-
-   This declaration must be present.  */
-#define ASM_OUTPUT_BYTE(STREAM, VALUE) \
-  fprintf (STREAM, "\t%s\t0x%x\n", ASM_BYTE_OP, (VALUE))
-
-/* A C string constant giving the pseudo-op to use for a sequence of
-   single-byte constants.  If this macro is not defined, the default
-   is `"byte"'.
-
-   Defined in svr4.h.  */
-/* #define ASM_BYTE_OP */
-
 /* A C statement to output to the stdio stream STREAM an assembler instruction
    to assemble a string constant containing the LEN bytes at PTR.  PTR will be
    a C expression of type `char *' and LEN a C expression of type `int'.
@@ -4397,8 +4346,7 @@ do {                                                                      \
 /* Define this macro to 0 if your target supports DWARF 2 frame unwind
    information, but it does not yet work with exception handling.  Otherwise,
    if your target supports this information (if it defines
-   `INCOMING_RETURN_ADDR_RTX' and either `UNALIGNED_INT_ASM_OP' or
-   `OBJECT_FORMAT_ELF'), GCC will provide a default definition of 1.
+   `INCOMING_RETURN_ADDR_RTX'), GCC will provide a default definition of 1.
 
    If this macro is defined to 1, the DWARF 2 unwinder will be the default
    exception handling mechanism; otherwise, setjmp/longjmp will be used by
index 3e17c653bd7f9fddc46f57e6fc1f1a140bddde35..4de6f52670c866bc0bfc7a7e56b7f3b1ce4ef9e6 100644 (file)
@@ -154,12 +154,6 @@ Boston, MA 02111-1307, USA.
 #undef WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE BITS_PER_WORD
 
-/* Assembler pseudos to introduce constants of various size.  These
-   definitions should work for most svr3 systems.  */
-
-#undef ASM_BYTE_OP
-#define ASM_BYTE_OP "\t.byte\t"
-
 /* The prefix to add to user-visible assembler symbols.
 
    For System V Release 3 the convention is to prepend a leading
index 0d45ac97b5bba43320941a40b99f4d55c95af19e..3c9ac92e23bbfaa21bb5a0202436321202ea7902 100644 (file)
@@ -87,6 +87,9 @@ static int v850_interrupt_cache_p = FALSE;
 static int v850_interrupt_p = FALSE;
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
+
 #undef TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE v850_attribute_table
 
index 834ab52ce0a3d7f8305563e5f9c02e13fbccc107..cb3d1459f512857d27a777bb3aa94974124757a1 100644 (file)
@@ -1246,7 +1246,7 @@ do {                                                                      \
 #undef  USER_LABEL_PREFIX
 #define USER_LABEL_PREFIX "_"
 
-/* When ASM_OUTPUT_SHORT is used to emit the offsets for a switch
+/* When assemble_integer is used to emit the offsets for a switch
    table it can encounter (TRUNCATE:HI (MINUS:SI (LABEL_REF:SI) (LABEL_REF:SI))).
    output_addr_const will normally barf at this, but it is OK to omit
    the truncate and just emit the difference of the two labels.  The
@@ -1275,29 +1275,6 @@ do { char dstr[30];                                      \
      fprintf (FILE, "\t.float %s\n", dstr);            \
    } 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.hword "),                 \
-  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", (VALUE))
-
 /* This says how to output the assembler to define a global
    uninitialized but not common symbol.  */
 
index 1e6820ae26624158aa8c36595319bc5adf8fc506..ccaee768bb07a97d37b10ac01a274ce1039fa75d 100644 (file)
@@ -45,6 +45,9 @@ static void vms_asm_out_destructor PARAMS ((rtx, int));
 #endif
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE vax_output_function_prologue
 
index 0edc824f420ed2d5747a748a82ca6883cbb54d11..7d0608e46cfbf58d30f90d4732238c4b63790b47 100644 (file)
@@ -504,14 +504,14 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };
      movl $STATIC,r0   (store the functions static chain)
      jmp  *$FUNCTION   (jump to function code at address FUNCTION)  */
 
-#define TRAMPOLINE_TEMPLATE(FILE)                      \
-{                                                      \
-  ASM_OUTPUT_SHORT (FILE, const0_rtx);                 \
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x8fd0));           \
-  ASM_OUTPUT_INT (FILE, const0_rtx);                   \
-  ASM_OUTPUT_BYTE  (FILE, 0x50 + STATIC_CHAIN_REGNUM); \
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x9f17));           \
-  ASM_OUTPUT_INT (FILE, const0_rtx);                   \
+#define TRAMPOLINE_TEMPLATE(FILE)                                      \
+{                                                                      \
+  assemble_aligned_integer (2, const0_rtx);                            \
+  assemble_aligned_integer (2, GEN_INT (0x8fd0));                      \
+  assemble_aligned_integer (4, const0_rtx);                            \
+  assemble_aligned_integer (1, GEN_INT (0x50 + STATIC_CHAIN_REGNUM));  \
+  assemble_aligned_integer (2, GEN_INT (0x9f17));                      \
+  assemble_aligned_integer (4, const0_rtx);                            \
 }
 
 /* Length in units of the trampoline for entering a nested function.  */
@@ -1123,30 +1123,6 @@ do { char dstr[30];                                                      \
        REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr);           \
        fprintf (FILE, "\t.float 0f%s\n", dstr); } 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", (VALUE))
-
 /* This is how to output an insn to push a register on the stack.
    It need not be very fast code.  */
 
index 32d6bb184b279d8d709814f7e5ce027812225731..5813b2a44bb5b2fde616f03dc789bdc210109c2f 100644 (file)
@@ -40,6 +40,11 @@ static void we32k_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void we32k_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 \f
 /* Initialize the GCC target structure.  */
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.half\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
+
 #undef TARGET_ASM_FUNCTION_PROLOGUE
 #define TARGET_ASM_FUNCTION_PROLOGUE we32k_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
index 9e15f706a92f378b2e2374a17fac85cb63295530..0cc12caf20efa4ca86309767e15d8844330e1e39 100644 (file)
@@ -439,15 +439,15 @@ enum reg_class { NO_REGS, GENERAL_REGS,
      mov #STATIC,%r8
      jmp #FUNCTION */
 
-#define TRAMPOLINE_TEMPLATE(FILE)              \
-{                                              \
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x844f));   \
-  ASM_OUTPUT_SHORT (FILE, const0_rtx);         \
-  ASM_OUTPUT_SHORT (FILE, const0_rtx);         \
-  ASM_OUTPUT_CHAR  (FILE, GEN_INT (0x48));     \
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x247f));   \
-  ASM_OUTPUT_SHORT (FILE, const0_rtx);         \
-  ASM_OUTPUT_SHORT (FILE, const0_rtx);         \
+#define TRAMPOLINE_TEMPLATE(FILE)                      \
+{                                                      \
+  assemble_aligned_integer (2, GEN_INT (0x844f));      \
+  assemble_aligned_integer (2, const0_rtx);            \
+  assemble_aligned_integer (2, const0_rtx);            \
+  assemble_aligned_integer (1, GEN_INT (0x48));                \
+  assemble_aligned_integer (2, GEN_INT (0x247f));      \
+  assemble_aligned_integer (2, const0_rtx);            \
+  assemble_aligned_integer (2, const0_rtx);            \
 }
 
 /* Length in units of the trampoline for entering a nested function.  */
@@ -755,10 +755,6 @@ enum reg_class { NO_REGS, GENERAL_REGS,
     ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM);     \
   } while (0)
 
-/* Assembler pseudo to introduce byte constants.  */
-
-#define ASM_BYTE_OP "\t.byte\t"
-
 /* This is how to output an assembler line defining a `double' constant.  */
 
 /* This is how to output an assembler line defining a `float' constant.  */
@@ -790,30 +786,6 @@ do { union { float f; long l;} tem;                                \
 
 #endif /* not CROSS_COMPILE */
 
-/* This is how to output an assembler line defining an `int' constant.  */
-
-#define ASM_OUTPUT_INT(FILE,VALUE)  \
-( fprintf (FILE, "\t.word "),                  \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "\n"))
-
-/* Likewise for `char' and `short' constants.  */
-
-#define ASM_OUTPUT_SHORT(FILE,VALUE)  \
-( fprintf (FILE, "\t.half "),                  \
-  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", (VALUE))
-
 #define ASM_OUTPUT_ASCII(FILE,PTR,LEN)  \
 do {                                                   \
   const unsigned char *s;                              \
index ecfcedaaae2b69bedfa7ca3e117f5a649452e7ce..91962d4ea803e30fc87c4524925bdcefd806d781 100644 (file)
@@ -62,7 +62,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 #ifndef ASM_OUTPUT_ADDR_VEC_ELT
 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
-do { fprintf (FILE, "\t%s\t", ASM_LONG);                               \
+do { fputs (integer_asm_op (POINTER_SIZE / UNITS_PER_WORD, TRUE), FILE); \
      ASM_OUTPUT_INTERNAL_LABEL (FILE, "L", (VALUE));                   \
      fputc ('\n', FILE);                                               \
    } while (0)
@@ -400,23 +400,6 @@ do {                                                               \
 #define TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER true
 #endif
 
-/* GAS and SYSV4 assemblers accept these.  */
-#if defined (OBJECT_FORMAT_ELF) || defined (OBJECT_FORMAT_ROSE)
-#ifndef UNALIGNED_SHORT_ASM_OP
-#define UNALIGNED_SHORT_ASM_OP         "\t.2byte\t"
-#endif
-#ifndef UNALIGNED_INT_ASM_OP
-#define UNALIGNED_INT_ASM_OP           "\t.4byte\t"
-#endif
-#ifndef UNALIGNED_DOUBLE_INT_ASM_OP
-#define UNALIGNED_DOUBLE_INT_ASM_OP    "\t.8byte\t"
-#endif
-#endif /* OBJECT_FORMAT_ELF || OBJECT_FORMAT_ROSE */
-
-#ifndef ASM_BYTE_OP
-#define ASM_BYTE_OP                    "\t.byte\t"
-#endif
-
 #ifndef DEFAULT_GDB_EXTENSIONS
 #define DEFAULT_GDB_EXTENSIONS 1
 #endif
index c0105a84017ce171988d13de5de6d254de77ff23..da3b4d543dc12dad8a4911a550a5999c3718cf08 100644 (file)
@@ -5810,8 +5810,39 @@ set via @code{__attribute__}.
 @node Data Output
 @subsection Output of Data
 
-@c prevent bad page break with this line
-This describes data output.
+
+@deftypevr {Target Hook} {const char *} TARGET_ASM_BYTE_OP
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_HI_OP
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_SI_OP
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_DI_OP
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_TI_OP
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_HI_OP
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_SI_OP
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_DI_OP
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_TI_OP
+These hooks specify assembly directives for creating certain kinds
+of integer object.  The @code{TARGET_ASM_BYTE_OP} directive creates a
+byte-sized object, the @code{TARGET_ASM_ALIGNED_HI_OP} one creates an
+aligned two-byte object, and so on.  Any of the hooks may be
+@code{NULL}, indicating that no suitable directive is available.
+
+The compiler will print these strings at the start of a new line,
+followed immediately by the object's initial value.  In most cases,
+the string should contain a tab, a pseudo-op, and then another tab.
+@end deftypevr
+
+@deftypefn {Target Hook} bool TARGET_ASM_INTEGER (rtx @var{x}, unsigned int @var{size}, int @var{aligned_p})
+The @code{assemble_integer} function uses this hook to output an
+integer object.  @var{x} is the object's value, @var{size} is its size
+in bytes and @var{aligned_p} indicates whether it is aligned.  The
+function should return @code{true} if it was able to output the
+object.  If it returns false, @code{assemble_integer} will try to
+split the object into smaller parts.
+
+The default implementation of this hook will use the
+@code{TARGET_ASM_BYTE_OP} family of strings, returning @code{false}
+when the relevant string is @code{NULL}.
+@end deftypefn
 
 @table @code
 @findex ASM_OUTPUT_LONG_DOUBLE
@@ -5831,29 +5862,6 @@ will be a C expression of type @code{REAL_VALUE_TYPE}.  Macros such as
 @code{REAL_VALUE_TO_TARGET_DOUBLE} are useful for writing these
 definitions.
 
-@findex ASM_OUTPUT_QUADRUPLE_INT
-@findex ASM_OUTPUT_DOUBLE_INT
-@findex ASM_OUTPUT_INT
-@findex ASM_OUTPUT_SHORT
-@findex ASM_OUTPUT_CHAR
-@findex output_addr_const
-@item ASM_OUTPUT_QUADRUPLE_INT (@var{stream}, @var{exp})
-@itemx ASM_OUTPUT_DOUBLE_INT (@var{stream}, @var{exp})
-@itemx ASM_OUTPUT_INT (@var{stream}, @var{exp})
-@itemx ASM_OUTPUT_SHORT (@var{stream}, @var{exp})
-@itemx ASM_OUTPUT_CHAR (@var{stream}, @var{exp})
-A C statement to output to the stdio stream @var{stream} an assembler
-instruction to assemble an integer of 16, 8, 4, 2 or 1 bytes,
-respectively, whose value is @var{value}.  The argument @var{exp} will
-be an RTL expression which represents a constant value.  Use
-@samp{output_addr_const (@var{stream}, @var{exp})} to output this value
-as an assembler expression.
-
-For sizes larger than @code{UNITS_PER_WORD}, if the action of a macro
-would be identical to repeatedly calling the macro corresponding to
-a size of @code{UNITS_PER_WORD}, once for each word, you need not define
-the macro.
-
 @findex OUTPUT_ADDR_CONST_EXTRA
 @item OUTPUT_ADDR_CONST_EXTRA (@var{stream}, @var{x}, @var{fail})
 A C statement to recognize @var{rtx} patterns that
@@ -5866,29 +5874,6 @@ If @code{OUTPUT_ADDR_CONST_EXTRA} fails to recognize a pattern, it must
 prints an error message itself, by calling, for example,
 @code{output_operand_lossage}, it may just complete normally.
 
-@findex ASM_OUTPUT_BYTE
-@item ASM_OUTPUT_BYTE (@var{stream}, @var{value})
-A C statement to output to the stdio stream @var{stream} an assembler
-instruction to assemble a single byte containing the number @var{value}.
-
-@findex ASM_BYTE_OP
-@item ASM_BYTE_OP
-A C string constant, including spacing, giving the pseudo-op to use for a
-sequence of single-byte constants.  If this macro is not defined, the
-default is @code{"\t.byte\t"}.
-
-@findex UNALIGNED_SHORT_ASM_OP
-@findex UNALIGNED_INT_ASM_OP
-@findex UNALIGNED_DOUBLE_INT_ASM_OP
-@item UNALIGNED_SHORT_ASM_OP
-@itemx UNALIGNED_INT_ASM_OP
-@itemx UNALIGNED_DOUBLE_INT_ASM_OP
-A C string constant, including spacing, giving the pseudo-op to use
-to assemble 16-, 32-, and 64-bit integers respectively @emph{without}
-adding implicit padding or alignment.  These macros are required if
-DWARF 2 frame unwind is used.  On ELF systems, these will default
-to @code{.2byte}, @code{.4byte}, and @code{.8byte}.
-
 @findex ASM_OUTPUT_ASCII
 @item ASM_OUTPUT_ASCII (@var{stream}, @var{ptr}, @var{len})
 A C statement to output to the stdio stream @var{stream} an assembler
index 94f0e967be0adde3b2a663ec122716b4c4d8e29d..f2cc3c1e947a453a5bd213b31e0f56e12d3a4907 100644 (file)
@@ -25,6 +25,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "tree.h"
 #include "rtl.h"
 #include "output.h"
+#include "target.h"
 #include "dwarf2asm.h"
 #include "dwarf2.h"
 #include "splay-tree.h"
@@ -37,50 +38,29 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #define ASM_COMMENT_START ";#"
 #endif
 
-/* We don't have unaligned support, let's hope the normal output works for
-   .debug_frame.  But we know it won't work for .debug_info.  */
-#if !defined(UNALIGNED_INT_ASM_OP) && defined(DWARF2_DEBUGGING_INFO)
- #error DWARF2_DEBUGGING_INFO requires UNALIGNED_INT_ASM_OP.
-#endif
-
 \f
-/* Despite the fact that assemble_integer handles unaligned data,
-   continue emitting things by hand when possible, since that makes
-   the assembler commentary come out prettier.  */
-#ifdef UNALIGNED_INT_ASM_OP
-static const char * unaligned_integer_asm_op  PARAMS ((int));
-
-static inline const char *
-unaligned_integer_asm_op (size)
+/* Output an unaligned integer with the given value and size.  Prefer not
+   to print a newline, since the caller may want to add a comment.  */
+
+void
+dw2_assemble_integer (size, x)
      int size;
+     rtx x;
 {
-  const char *op = NULL;
-  switch (size)
+  const char *op = integer_asm_op (size, FALSE);
+
+  if (op)
     {
-    case 1:
-      op = ASM_BYTE_OP;
-      break;
-    case 2:
-      op = UNALIGNED_SHORT_ASM_OP;
-      break;
-    case 4:
-      op = UNALIGNED_INT_ASM_OP;
-      break;
-    case 8:
-#ifdef UNALIGNED_DOUBLE_INT_ASM_OP
-      op = UNALIGNED_DOUBLE_INT_ASM_OP;
-      break;
-#endif
-    default:
-      abort ();
+      fputs (op, asm_out_file);
+      if (GET_CODE (x) == CONST_INT)
+       fprintf (asm_out_file, HOST_WIDE_INT_PRINT_HEX, INTVAL (x));
+      else
+       output_addr_const (asm_out_file, x);
     }
-
-  if (! op)
-    abort ();
-
-  return op;
+  else
+    assemble_integer (x, size, BITS_PER_UNIT, 1);
 }
-#endif /* UNALIGNED_INT_ASM_OP */
+     
 
 /* Output an immediate constant in a given size.  */
 
@@ -96,12 +76,7 @@ dw2_asm_output_data VPARAMS ((int size, unsigned HOST_WIDE_INT value,
   if (size * 8 < HOST_BITS_PER_WIDE_INT)
     value &= ~(~(unsigned HOST_WIDE_INT)0 << (size * 8));
 
-#ifdef UNALIGNED_INT_ASM_OP
-  fputs (unaligned_integer_asm_op (size), asm_out_file);
-  fprintf (asm_out_file, HOST_WIDE_INT_PRINT_HEX, value);
-#else
-  assemble_integer (GEN_INT (value), size, BITS_PER_UNIT, 1);
-#endif
+  dw2_assemble_integer (size, GEN_INT (value));
 
   if (flag_debug_asm && comment)
     {
@@ -129,16 +104,10 @@ dw2_asm_output_delta VPARAMS ((int size, const char *lab1, const char *lab2,
   VA_FIXEDARG (ap, const char *, lab2);
   VA_FIXEDARG (ap, const char *, comment);
 
-#ifdef UNALIGNED_INT_ASM_OP
-  fputs (unaligned_integer_asm_op (size), asm_out_file);
-  assemble_name (asm_out_file, lab1);
-  fputc ('-', asm_out_file);
-  assemble_name (asm_out_file, lab2);
-#else
-  assemble_integer (gen_rtx_MINUS (Pmode, gen_rtx_SYMBOL_REF (Pmode, lab1),
-                                  gen_rtx_SYMBOL_REF (Pmode, lab2)),
-                   size, BITS_PER_UNIT, 1);
-#endif
+  dw2_assemble_integer (size,
+                       gen_rtx_MINUS (Pmode,
+                                      gen_rtx_SYMBOL_REF (Pmode, lab1),
+                                      gen_rtx_SYMBOL_REF (Pmode, lab2)));
 
   if (flag_debug_asm && comment)
     {
@@ -168,12 +137,7 @@ dw2_asm_output_offset VPARAMS ((int size, const char *label,
 #ifdef ASM_OUTPUT_DWARF_OFFSET
   ASM_OUTPUT_DWARF_OFFSET (asm_out_file, size, label);
 #else
-#ifdef UNALIGNED_INT_ASM_OP
-  fputs (unaligned_integer_asm_op (size), asm_out_file);
-  assemble_name (asm_out_file, label);
-#else
-  assemble_integer (gen_rtx_SYMBOL_REF (Pmode, label), size, BITS_PER_UNIT, 1);
-#endif
+  dw2_assemble_integer (size, gen_rtx_SYMBOL_REF (Pmode, label));
 #endif
 
   if (flag_debug_asm && comment)
@@ -202,14 +166,10 @@ dw2_asm_output_pcrel VPARAMS ((int size ATTRIBUTE_UNUSED,
 #ifdef ASM_OUTPUT_DWARF_PCREL
   ASM_OUTPUT_DWARF_PCREL (asm_out_file, size, label);
 #else
-#ifdef UNALIGNED_INT_ASM_OP
-  fputs (unaligned_integer_asm_op (size), asm_out_file);
-  assemble_name (asm_out_file, label);
-  fputc ('-', asm_out_file);
-  fputc ('.', asm_out_file);
-#else
-  abort ();
-#endif
+  dw2_assemble_integer (size,
+                       gen_rtx_MINUS (Pmode,
+                                      gen_rtx_SYMBOL_REF (Pmode, label),
+                                      pc_rtx));
 #endif
 
   if (flag_debug_asm && comment)
@@ -233,12 +193,7 @@ dw2_asm_output_addr VPARAMS ((int size, const char *label,
   VA_FIXEDARG (ap, const char *, label);
   VA_FIXEDARG (ap, const char *, comment);
 
-#ifdef UNALIGNED_INT_ASM_OP
-  fputs (unaligned_integer_asm_op (size), asm_out_file);
-  assemble_name (asm_out_file, label);
-#else
-  assemble_integer (gen_rtx_SYMBOL_REF (Pmode, label), size, BITS_PER_UNIT, 1);
-#endif
+  dw2_assemble_integer (size, gen_rtx_SYMBOL_REF (Pmode, label));
 
   if (flag_debug_asm && comment)
     {
@@ -261,12 +216,7 @@ dw2_asm_output_addr_rtx VPARAMS ((int size, rtx addr,
   VA_FIXEDARG (ap, rtx, addr);
   VA_FIXEDARG (ap, const char *, comment);
 
-#ifdef UNALIGNED_INT_ASM_OP
-  fputs (unaligned_integer_asm_op (size), asm_out_file);
-  output_addr_const (asm_out_file, addr);
-#else
-  assemble_integer (addr, size, BITS_PER_UNIT, 1);
-#endif
+  dw2_assemble_integer (size, addr);
 
   if (flag_debug_asm && comment)
     {
@@ -319,7 +269,7 @@ dw2_asm_output_nstring VPARAMS ((const char *str, size_t orig_len,
        len += 1;
       ASM_OUTPUT_ASCII (asm_out_file, str, len);
       if (orig_len != (size_t) -1)
-       fprintf (asm_out_file, "%s0\n", ASM_BYTE_OP);
+       assemble_integer (const0_rtx, 1, BITS_PER_UNIT, 1);
     }
 
   VA_CLOSE (ap);
@@ -571,8 +521,10 @@ dw2_asm_output_data_uleb128 VPARAMS ((unsigned HOST_WIDE_INT value,
 #else
   {
     unsigned HOST_WIDE_INT work = value;
+    const char *byte_op = targetm.asm_out.byte_op;
 
-    fputs (ASM_BYTE_OP, asm_out_file);
+    if (byte_op)
+      fputs (byte_op, asm_out_file);
     do
       {
        int byte = (work & 0x7f);
@@ -581,9 +533,14 @@ dw2_asm_output_data_uleb128 VPARAMS ((unsigned HOST_WIDE_INT value,
          /* More bytes to follow.  */
          byte |= 0x80;
 
-       fprintf (asm_out_file, "0x%x", byte);
-       if (work != 0)
-         fputc (',', asm_out_file);
+       if (byte_op)
+         {
+           fprintf (asm_out_file, "0x%x", byte);
+           if (work != 0)
+             fputc (',', asm_out_file);
+         }
+       else
+         assemble_integer (GEN_INT (byte), 1, BITS_PER_UNIT, 1);
       }
     while (work != 0);
 
@@ -627,8 +584,10 @@ dw2_asm_output_data_sleb128 VPARAMS ((HOST_WIDE_INT value,
   {
     HOST_WIDE_INT work = value;
     int more, byte;
+    const char *byte_op = targetm.asm_out.byte_op;
 
-    fputs (ASM_BYTE_OP, asm_out_file);
+    if (byte_op)
+      fputs (byte_op, asm_out_file);
     do
       {
        byte = (work & 0x7f);
@@ -639,9 +598,14 @@ dw2_asm_output_data_sleb128 VPARAMS ((HOST_WIDE_INT value,
        if (more)
          byte |= 0x80;
 
-       fprintf (asm_out_file, "0x%x", byte);
-       if (more)
-         fputc (',', asm_out_file);
+       if (byte_op)
+         {
+           fprintf (asm_out_file, "0x%x", byte);
+           if (more)
+             fputc (',', asm_out_file);
+         }
+       else
+         assemble_integer (GEN_INT (byte), 1, BITS_PER_UNIT, 1);
       }
     while (more);
 
@@ -905,12 +869,7 @@ dw2_asm_output_encoded_addr_rtx VPARAMS ((int encoding,
       switch (encoding & 0xF0)
        {
        case DW_EH_PE_absptr:
-#ifdef UNALIGNED_INT_ASM_OP
-         fputs (unaligned_integer_asm_op (size), asm_out_file);
-         output_addr_const (asm_out_file, addr);
-#else
-         assemble_integer (addr, size, BITS_PER_UNIT, 1);
-#endif
+         dw2_assemble_integer (size, addr);
          break;
 
        case DW_EH_PE_pcrel:
@@ -919,14 +878,7 @@ dw2_asm_output_encoded_addr_rtx VPARAMS ((int encoding,
 #ifdef ASM_OUTPUT_DWARF_PCREL
          ASM_OUTPUT_DWARF_PCREL (asm_out_file, size, XSTR (addr, 0));
 #else
-#ifdef UNALIGNED_INT_ASM_OP
-         fputs (unaligned_integer_asm_op (size), asm_out_file);
-         assemble_name (asm_out_file, XSTR (addr, 0));
-         fputc ('-', asm_out_file);
-         fputc ('.', asm_out_file);
-#else
-         abort ();
-#endif
+         dw2_assemble_integer (size, gen_rtx_MINUS (Pmode, addr, pc_rtx));
 #endif
          break;
 
index 63d55e59ef4cf96a6c2429b9a97c6a2630edae3d..859883d45e3492f0193b839d265960311cb6bfb9 100644 (file)
@@ -23,6 +23,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
    the way these routines are signaled that there is no associated
    debug information.  So the attributes are commented out.  */
 
+extern void dw2_assemble_integer       PARAMS ((int, rtx));
+
 extern void dw2_asm_output_data                PARAMS ((int, unsigned HOST_WIDE_INT,
                                                 const char *, ...))
      /* ATTRIBUTE_PRINTF_3 */;
index 3edaf351906493eca1d09759e7b2efc8d13ecae6..0ff75f585f7492cb47f8c3b70fe7074e0ccd037e 100644 (file)
@@ -574,6 +574,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "insn-config.h"
 #include "reload.h"
 #include "output.h"
+#include "dwarf2asm.h"
 #include "toplev.h"
 #include "tm_p.h"
 #include "debug.h"
@@ -928,7 +929,8 @@ static void shuffle_filename_entry  PARAMS ((filename_entry *));
 static void generate_new_sfname_entry  PARAMS ((void));
 static unsigned lookup_filename                PARAMS ((const char *));
 static void generate_srcinfo_entry     PARAMS ((unsigned, unsigned));
-static void generate_macinfo_entry     PARAMS ((const char *, const char *));
+static void generate_macinfo_entry     PARAMS ((unsigned int, rtx,
+                                                const char *));
 static int is_pseudo_reg               PARAMS ((rtx));
 static tree type_main_variant          PARAMS ((tree));
 static int is_tagged_type              PARAMS ((tree));
@@ -1207,147 +1209,77 @@ static void retry_incomplete_types     PARAMS ((void));
 
 #ifndef ASM_OUTPUT_DWARF_DELTA2
 #define ASM_OUTPUT_DWARF_DELTA2(FILE,LABEL1,LABEL2)                    \
- do {  fprintf ((FILE), "%s", UNALIGNED_SHORT_ASM_OP);                 \
-       assemble_name (FILE, LABEL1);                                   \
-       fprintf (FILE, "-");                                            \
-       assemble_name (FILE, LABEL2);                                   \
-       fprintf (FILE, "\n");                                           \
-  } while (0)
+  dw2_asm_output_delta (2, LABEL1, LABEL2, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_DELTA4
 #define ASM_OUTPUT_DWARF_DELTA4(FILE,LABEL1,LABEL2)                    \
- do {  fprintf ((FILE), "%s", UNALIGNED_INT_ASM_OP);                   \
-       assemble_name (FILE, LABEL1);                                   \
-       fprintf (FILE, "-");                                            \
-       assemble_name (FILE, LABEL2);                                   \
-       fprintf (FILE, "\n");                                           \
-  } while (0)
+  dw2_asm_output_delta (4, LABEL1, LABEL2, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_TAG
 #define ASM_OUTPUT_DWARF_TAG(FILE,TAG)                                 \
-  do {                                                                 \
-    fprintf ((FILE), "%s0x%x",                                         \
-                    UNALIGNED_SHORT_ASM_OP, (unsigned) TAG);           \
-    if (flag_debug_asm)                                                        \
-      fprintf ((FILE), "\t%s %s",                                      \
-                      ASM_COMMENT_START, dwarf_tag_name (TAG));        \
-    fputc ('\n', (FILE));                                              \
-  } while (0)
+  dw2_asm_output_data (2, TAG, "%s", dwarf_tag_name (TAG));
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_ATTRIBUTE
 #define ASM_OUTPUT_DWARF_ATTRIBUTE(FILE,ATTR)                          \
-  do {                                                                 \
-    fprintf ((FILE), "%s0x%x",                                         \
-                    UNALIGNED_SHORT_ASM_OP, (unsigned) ATTR);          \
-    if (flag_debug_asm)                                                        \
-      fprintf ((FILE), "\t%s %s",                                      \
-                      ASM_COMMENT_START, dwarf_attr_name (ATTR));      \
-    fputc ('\n', (FILE));                                              \
-  } while (0)
+  dw2_asm_output_data (2, ATTR, "%s", dwarf_attr_name (ATTR))
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_STACK_OP
 #define ASM_OUTPUT_DWARF_STACK_OP(FILE,OP)                             \
-  do {                                                                 \
-    fprintf ((FILE), "%s0x%x", ASM_BYTE_OP, (unsigned) OP);            \
-    if (flag_debug_asm)                                                        \
-      fprintf ((FILE), "\t%s %s",                                      \
-                      ASM_COMMENT_START, dwarf_stack_op_name (OP));    \
-    fputc ('\n', (FILE));                                              \
-  } while (0)
+  dw2_asm_output_data (1, OP, "%s", dwarf_stack_op_name (OP))
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_FUND_TYPE
 #define ASM_OUTPUT_DWARF_FUND_TYPE(FILE,FT)                            \
-  do {                                                                 \
-    fprintf ((FILE), "%s0x%x",                                         \
-                    UNALIGNED_SHORT_ASM_OP, (unsigned) FT);            \
-    if (flag_debug_asm)                                                        \
-      fprintf ((FILE), "\t%s %s",                                      \
-                      ASM_COMMENT_START, dwarf_fund_type_name (FT));   \
-    fputc ('\n', (FILE));                                              \
-  } while (0)
+  dw2_asm_output_data (2, FT, "%s", dwarf_fund_type_name (FT))
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_FMT_BYTE
 #define ASM_OUTPUT_DWARF_FMT_BYTE(FILE,FMT)                            \
-  do {                                                                 \
-    fprintf ((FILE), "%s0x%x", ASM_BYTE_OP, (unsigned) FMT);           \
-    if (flag_debug_asm)                                                        \
-      fprintf ((FILE), "\t%s %s",                                      \
-                      ASM_COMMENT_START, dwarf_fmt_byte_name (FMT));   \
-    fputc ('\n', (FILE));                                              \
-  } while (0)
+  dw2_asm_output_data (1, FMT, "%s", dwarf_fmt_byte_name (FMT));
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_TYPE_MODIFIER
 #define ASM_OUTPUT_DWARF_TYPE_MODIFIER(FILE,MOD)                       \
-  do {                                                                 \
-    fprintf ((FILE), "%s0x%x", ASM_BYTE_OP, (unsigned) MOD);           \
-    if (flag_debug_asm)                                                        \
-      fprintf ((FILE), "\t%s %s",                                      \
-                      ASM_COMMENT_START, dwarf_typemod_name (MOD));    \
-    fputc ('\n', (FILE));                                              \
-  } while (0)
+  dw2_asm_output_data (1, MOD, "%s", dwarf_typemod_name (MOD));
 #endif
 \f
 #ifndef ASM_OUTPUT_DWARF_ADDR
 #define ASM_OUTPUT_DWARF_ADDR(FILE,LABEL)                              \
- do {  fprintf ((FILE), "%s", UNALIGNED_INT_ASM_OP);                   \
-       assemble_name (FILE, LABEL);                                    \
-       fprintf (FILE, "\n");                                           \
-  } while (0)
+  dw2_asm_output_addr (4, LABEL, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_ADDR_CONST
 #define ASM_OUTPUT_DWARF_ADDR_CONST(FILE,RTX)                          \
-  do {                                                                 \
-    fprintf ((FILE), "%s", UNALIGNED_INT_ASM_OP);                      \
-    output_addr_const ((FILE), (RTX));                                 \
-    fputc ('\n', (FILE));                                              \
-  } while (0)
+  dw2_asm_output_addr_rtx (4, RTX, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_REF
 #define ASM_OUTPUT_DWARF_REF(FILE,LABEL)                               \
- do {  fprintf ((FILE), "%s", UNALIGNED_INT_ASM_OP);                   \
-       assemble_name (FILE, LABEL);                                    \
-       fprintf (FILE, "\n");                                           \
-  } while (0)
+  dw2_asm_output_addr (4, LABEL, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_DATA1
 #define ASM_OUTPUT_DWARF_DATA1(FILE,VALUE) \
-  fprintf ((FILE), "%s0x%x\n", ASM_BYTE_OP, VALUE)
+  dw2_asm_output_data (1, VALUE, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_DATA2
 #define ASM_OUTPUT_DWARF_DATA2(FILE,VALUE) \
-  fprintf ((FILE), "%s0x%x\n", UNALIGNED_SHORT_ASM_OP, (unsigned) VALUE)
+  dw2_asm_output_data (2, VALUE, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_DATA4
 #define ASM_OUTPUT_DWARF_DATA4(FILE,VALUE) \
-  fprintf ((FILE), "%s0x%x\n", UNALIGNED_INT_ASM_OP, (unsigned) VALUE)
+  dw2_asm_output_data (4, VALUE, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_DATA8
 #define ASM_OUTPUT_DWARF_DATA8(FILE,HIGH_VALUE,LOW_VALUE)              \
-  do {                                                                 \
-    if (WORDS_BIG_ENDIAN)                                              \
-      {                                                                        \
-       fprintf ((FILE), "%s0x%x\n", UNALIGNED_INT_ASM_OP, HIGH_VALUE); \
-       fprintf ((FILE), "%s0x%x\n", UNALIGNED_INT_ASM_OP, LOW_VALUE);  \
-      }                                                                        \
-    else                                                               \
-      {                                                                        \
-       fprintf ((FILE), "%s0x%x\n", UNALIGNED_INT_ASM_OP, LOW_VALUE);  \
-       fprintf ((FILE), "%s0x%x\n", UNALIGNED_INT_ASM_OP, HIGH_VALUE); \
-      }                                                                        \
-  } while (0)
+  dw2_asm_output_data (8, VALUE, NULL)
 #endif
 
 /* ASM_OUTPUT_DWARF_STRING is defined to output an ascii string, but to
@@ -1757,11 +1689,8 @@ output_unsigned_leb128 (value)
       value >>= 7;
       if (value != 0)  /* more bytes to follow */
        byte |= 0x80;
-      fprintf (asm_out_file, "%s0x%x", ASM_BYTE_OP, (unsigned) byte);
-      if (flag_debug_asm && value == 0)
-       fprintf (asm_out_file, "\t%s ULEB128 number - value = %lu",
-                ASM_COMMENT_START, orig_value);
-      fputc ('\n', asm_out_file);
+      dw2_asm_output_data (1, byte, "\t%s ULEB128 number - value = %lu",
+                          orig_value);
     }
   while (value != 0);
 }
@@ -1789,11 +1718,8 @@ output_signed_leb128 (value)
          byte |= 0x80;
          more = 1;
        }
-      fprintf (asm_out_file, "%s0x%x", ASM_BYTE_OP, (unsigned) byte);
-      if (flag_debug_asm && more == 0)
-       fprintf (asm_out_file, "\t%s SLEB128 number - value = %ld",
-                ASM_COMMENT_START, orig_value);
-      fputc ('\n', asm_out_file);
+      dw2_asm_output_data (1, byte, "\t%s SLEB128 number - value = %ld",
+                          orig_value);
     }
   while (more);
 }
@@ -2168,8 +2094,7 @@ output_reg_number (rtl)
                         regno);
       regno = 0;
     }
-  fprintf (asm_out_file, "%s0x%x",
-          UNALIGNED_INT_ASM_OP, DBX_REGISTER_NUMBER (regno));
+  dw2_assemble_integer (4, GEN_INT (DBX_REGISTER_NUMBER (regno)));
   if (flag_debug_asm)
     {
       fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
@@ -6160,9 +6085,7 @@ dwarfout_source_line (line, filename)
           filename = tail;
       }
 
-      fprintf (asm_out_file, "%s%u\t%s %s:%u\n",
-              UNALIGNED_INT_ASM_OP, line, ASM_COMMENT_START,
-              filename, line);
+      dw2_asm_output_data (4, line, "%s:%u", filename, line);
       ASM_OUTPUT_DWARF_DATA2 (asm_out_file, 0xffff);
       ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, label, TEXT_BEGIN_LABEL);
       ASM_OUTPUT_POP_SECTION (asm_out_file);
@@ -6176,8 +6099,9 @@ dwarfout_source_line (line, filename)
 /* Generate an entry in the .debug_macinfo section.  */
 
 static void
-generate_macinfo_entry (type_and_offset, string)
-     const char *type_and_offset;
+generate_macinfo_entry (type, offset, string)
+     unsigned int type;
+     rtx offset;
      const char *string;
 {
   if (! use_gnu_debug_info_extensions)
@@ -6185,7 +6109,8 @@ generate_macinfo_entry (type_and_offset, string)
 
   fputc ('\n', asm_out_file);
   ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_MACINFO_SECTION);
-  fprintf (asm_out_file, "%s%s\n", UNALIGNED_INT_ASM_OP, type_and_offset);
+  assemble_integer (gen_rtx_PLUS (SImode, GEN_INT (type << 24), offset),
+                   4, BITS_PER_UNIT, 1);
   ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, string);
   ASM_OUTPUT_POP_SECTION (asm_out_file);
 }
@@ -6206,15 +6131,16 @@ dwarfout_start_source_file (line, filename)
      const char *filename;
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
-  char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*3];
+  const char *label1, *label2;
 
   sprintf (label, SFNAMES_ENTRY_LABEL_FMT, lookup_filename (filename));
-  sprintf (type_and_offset, "0x%08x+%s-%s",
-          ((unsigned) MACINFO_start << 24),
-          /* Hack: skip leading '*' .  */
-          (*label == '*') + label,
-          (*SFNAMES_BEGIN_LABEL == '*') + SFNAMES_BEGIN_LABEL);
-  generate_macinfo_entry (type_and_offset, "");
+  label1 = (*label == '*') + label;
+  label2 = (*SFNAMES_BEGIN_LABEL == '*') + SFNAMES_BEGIN_LABEL;
+  generate_macinfo_entry (MACINFO_start,
+                         gen_rtx_MINUS (Pmode,
+                                        gen_rtx_SYMBOL_REF (Pmode, label1),
+                                        gen_rtx_SYMBOL_REF (Pmode, label2)),
+                         "");
 }
 
 /* Wrapper for toplev.c callback to check debug info level.  */
@@ -6230,11 +6156,7 @@ static void
 dwarfout_end_source_file (lineno)
      unsigned lineno;
 {
-  char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*2];
-
-  sprintf (type_and_offset, "0x%08x+%u",
-          ((unsigned) MACINFO_resume << 24), lineno);
-  generate_macinfo_entry (type_and_offset, "");
+  generate_macinfo_entry (MACINFO_resume, GEN_INT (lineno), "");
 }
 
 /* Called from check_newline in c-parse.y.  The `buffer' parameter
@@ -6248,16 +6170,13 @@ dwarfout_define (lineno, buffer)
      const char *buffer;
 {
   static int initialized = 0;
-  char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*2];
 
   if (!initialized)
     {
       dwarfout_start_source_file (0, primary_filename);
       initialized = 1;
     }
-  sprintf (type_and_offset, "0x%08x+%u",
-          ((unsigned) MACINFO_define << 24), lineno);
-  generate_macinfo_entry (type_and_offset, buffer);
+  generate_macinfo_entry (MACINFO_define, GEN_INT (lineno), buffer);
 }
 
 /* Called from check_newline in c-parse.y.  The `buffer' parameter
@@ -6270,11 +6189,7 @@ dwarfout_undef (lineno, buffer)
      unsigned lineno;
      const char *buffer;
 {
-  char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*2];
-
-  sprintf (type_and_offset, "0x%08x+%u",
-          ((unsigned) MACINFO_undef << 24), lineno);
-  generate_macinfo_entry (type_and_offset, buffer);
+  generate_macinfo_entry (MACINFO_undef, GEN_INT (lineno), buffer);
 }
 
 /* Set up for Dwarf output at the start of compilation.         */
index 1653138ff9eab097170d16aacb318792f5babafa..e0100c18be67d35c1d5847cd498f4ff7c24e0a45 100644 (file)
@@ -3465,16 +3465,16 @@ output_addr_const (file, x)
 
       output_addr_const (file, XEXP (x, 0));
       fprintf (file, "-");
-      if ((GET_CODE (XEXP (x, 1)) == CONST_INT
-          && INTVAL (XEXP (x, 1)) < 0)
-         || GET_CODE (XEXP (x, 1)) != CONST_INT)
+      if ((GET_CODE (XEXP (x, 1)) == CONST_INT && INTVAL (XEXP (x, 1)) >= 0)
+         || GET_CODE (XEXP (x, 1)) == PC
+         || GET_CODE (XEXP (x, 1)) == SYMBOL_REF)
+       output_addr_const (file, XEXP (x, 1));
+      else
        {
          fputs (targetm.asm_out.open_paren, file);
          output_addr_const (file, XEXP (x, 1));
          fputs (targetm.asm_out.close_paren, file);
        }
-      else
-       output_addr_const (file, XEXP (x, 1));
       break;
 
     case ZERO_EXTEND:
index 4931212bdfe23cd2b1f541e1524ea7bb6f009f19..f491314f99f412b500bf45d83c725f4865689849 100644 (file)
@@ -187,7 +187,8 @@ half_pic_finish (stream)
       if (p->pointer_p)
        {
          ASM_OUTPUT_LABEL (stream, p->ref_name);
-         ASM_OUTPUT_INT (stream, gen_rtx_SYMBOL_REF (Pmode, p->real_name));
+         assemble_aligned_integer (POINTER_SIZE / BITS_PER_UNIT,
+                                   gen_rtx_SYMBOL_REF (Pmode, p->real_name));
        }
     }
 }
index d733fce0bf1d54524065b7fd3abda45b2e25ccbf..1a2eefb36ebcf8e14d55c55d6b224f3856955299 100644 (file)
@@ -315,12 +315,34 @@ extern void assemble_eh_label             PARAMS ((const char *));
    Many macros in the tm file are defined to call this function.  */
 extern void assemble_name              PARAMS ((FILE *, const char *));
 
+/* Return the assembler directive for creating a given kind of integer
+   object.  SIZE is the number of bytes in the object and ALIGNED_P
+   indicates whether it is known to be aligned.  Return NULL if the
+   assembly dialect has no such directive.
+
+   The returned string should be printed at the start of a new line and
+   be followed immediately by the object's initial value.  */
+extern const char *integer_asm_op      PARAMS ((int, int));
+
 #ifdef RTX_CODE
+/* Use directive OP to assemble an integer object X.  Print OP at the
+   start of the line, followed immediately by the value of X.  */
+extern void assemble_integer_with_op   PARAMS ((const char *, rtx));
+
+/* The default implementation of the asm_out.integer target hook.  */
+extern bool default_assemble_integer   PARAMS ((rtx, unsigned int, int));
+
 /* Assemble the integer constant X into an object of SIZE bytes.  ALIGN is
    the alignment of the integer in bits.  Return 1 if we were able to output
    the constant, otherwise 0.  If FORCE is non-zero, abort if we can't output
    the constant.  */
-extern int assemble_integer            PARAMS ((rtx, unsigned, unsigned, int));
+extern bool assemble_integer           PARAMS ((rtx, unsigned, unsigned, int));
+
+/* An interface to assemble_integer for the common case in which a value is
+   fully aligned and must be printed.  VALUE is the value of the integer
+   object and SIZE is the number of bytes it contains.  */
+#define assemble_aligned_integer(SIZE, VALUE) \
+  assemble_integer (VALUE, SIZE, (SIZE) * BITS_PER_UNIT, 1)
 
 #ifdef REAL_VALUE_TYPE
 /* Assemble the floating-point constant D into an object of size MODE.  */
index 59b5e8de0c8929f9b6d0f099301cc3845e0006d9..feeb2c7aa33161afa94142d2c3d2f8b16361ed7f 100644 (file)
@@ -32,6 +32,28 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 /* Assembler output.  */
 #define TARGET_ASM_OPEN_PAREN "("
 #define TARGET_ASM_CLOSE_PAREN ")"
+#define TARGET_ASM_BYTE_OP "\t.byte\t"
+
+#define TARGET_ASM_ALIGNED_HI_OP "\t.short\t"
+#define TARGET_ASM_ALIGNED_SI_OP "\t.long\t"
+#define TARGET_ASM_ALIGNED_DI_OP NULL
+#define TARGET_ASM_ALIGNED_TI_OP NULL
+
+/* GAS and SYSV4 assemblers accept these.  */
+#if defined (OBJECT_FORMAT_ELF) || defined (OBJECT_FORMAT_ROSE)
+#define TARGET_ASM_UNALIGNED_HI_OP "\t.2byte\t"
+#define TARGET_ASM_UNALIGNED_SI_OP "\t.4byte\t"
+#define TARGET_ASM_UNALIGNED_DI_OP "\t.8byte\t"
+#define TARGET_ASM_UNALIGNED_TI_OP NULL
+#else
+#define TARGET_ASM_UNALIGNED_HI_OP NULL
+#define TARGET_ASM_UNALIGNED_SI_OP NULL
+#define TARGET_ASM_UNALIGNED_DI_OP NULL
+#define TARGET_ASM_UNALIGNED_TI_OP NULL
+#endif /* OBJECT_FORMAT_ELF || OBJECT_FORMAT_ROSE */
+
+#define TARGET_ASM_INTEGER default_assemble_integer
+
 #define TARGET_ASM_FUNCTION_PROLOGUE default_function_pro_epilogue
 #define TARGET_ASM_FUNCTION_EPILOGUE default_function_pro_epilogue
 #define TARGET_ASM_FUNCTION_END_PROLOGUE no_asm_to_stream
@@ -84,8 +106,24 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #define TARGET_ASM_EH_FRAME_SECTION default_eh_frame_section
 #endif
 
+#define TARGET_ASM_ALIGNED_INT_OP                              \
+                      {TARGET_ASM_ALIGNED_HI_OP,               \
+                       TARGET_ASM_ALIGNED_SI_OP,               \
+                       TARGET_ASM_ALIGNED_DI_OP,               \
+                       TARGET_ASM_ALIGNED_TI_OP}
+
+#define TARGET_ASM_UNALIGNED_INT_OP                            \
+                      {TARGET_ASM_UNALIGNED_HI_OP,             \
+                       TARGET_ASM_UNALIGNED_SI_OP,             \
+                       TARGET_ASM_UNALIGNED_DI_OP,             \
+                       TARGET_ASM_UNALIGNED_TI_OP}
+
 #define TARGET_ASM_OUT {TARGET_ASM_OPEN_PAREN,                 \
                        TARGET_ASM_CLOSE_PAREN,                 \
+                       TARGET_ASM_BYTE_OP,                     \
+                       TARGET_ASM_ALIGNED_INT_OP,              \
+                       TARGET_ASM_UNALIGNED_INT_OP,            \
+                       TARGET_ASM_INTEGER,                     \
                        TARGET_ASM_FUNCTION_PROLOGUE,           \
                        TARGET_ASM_FUNCTION_END_PROLOGUE,       \
                        TARGET_ASM_FUNCTION_BEGIN_EPILOGUE,     \
index a0545800c27865011715fbc973940c8881f5068d..355a910502cc44a007ccab660009b7377bb54e3a 100644 (file)
@@ -52,6 +52,23 @@ struct gcc_target
     /* Opening and closing parentheses for asm expression grouping.  */
     const char *open_paren, *close_paren;
 
+    /* Assembler instructions for creating various kinds of integer object.  */
+    const char *byte_op;
+    struct asm_int_op
+    {
+      const char *hi;
+      const char *si;
+      const char *di;
+      const char *ti;
+    } aligned_op, unaligned_op;
+
+    /* Try to output the assembler code for an integer object whose
+       value is given by X.  SIZE is the size of the object in bytes and
+       ALIGNED_P indicates whether it is aligned.  Return true if
+       successful.  Only handles cases for which BYTE_OP, ALIGNED_OP
+       and UNALIGNED_OP are NULL.  */
+    bool (* integer) PARAMS ((rtx x, unsigned int size, int aligned_p));
+
     /* Output the assembler code for entry to a function.  */
     void (* function_prologue) PARAMS ((FILE *, HOST_WIDE_INT));
 
index 123b57c89d1617fa46f9d31d695a3eb907df294b..87d81e38ba3371d6d46ea15f2e1b41a31572fd3c 100644 (file)
@@ -1922,146 +1922,112 @@ min_align (a, b)
   return (a | b) & -(a | b);
 }
 
-/* Assemble the integer constant X into an object of SIZE bytes.  ALIGN is
-   the alignment of the integer in bits.  Return 1 if we were able to output
-   the constant, otherwise 0.  If FORCE is non-zero, abort if we can't output
-   the constant.  */
+/* Return the assembler directive for creating a given kind of integer
+   object.  SIZE is the number of bytes in the object and ALIGNED_P
+   indicates whether it is known to be aligned.  Return NULL if the
+   assembly dialect has no such directive.
 
-int
-assemble_integer (x, size, align, force)
-     rtx x;
-     unsigned int size;
-     unsigned int align;
-     int force;
+   The returned string should be printed at the start of a new line and
+   be followed immediately by the object's initial value.  */
+
+const char *
+integer_asm_op (size, aligned_p)
+     int size;
+     int aligned_p;
 {
-  /* First try to use the standard 1, 2, 4, 8, and 16 byte
-     ASM_OUTPUT... macros.  */
+  struct asm_int_op *ops;
 
-  if (align >= MIN (size * BITS_PER_UNIT, BIGGEST_ALIGNMENT))
-    switch (size)
-      {
-#ifdef ASM_OUTPUT_CHAR
-      case 1:
-       ASM_OUTPUT_CHAR (asm_out_file, x);
-       return 1;
-#endif
-#ifdef ASM_OUTPUT_SHORT
-      case 2:
-       ASM_OUTPUT_SHORT (asm_out_file, x);
-       return 1;
-#endif
-#ifdef ASM_OUTPUT_INT
-      case 4:
-       ASM_OUTPUT_INT (asm_out_file, x);
-       return 1;
-#endif
-#ifdef ASM_OUTPUT_DOUBLE_INT
-      case 8:
-       ASM_OUTPUT_DOUBLE_INT (asm_out_file, x);
-       return 1;
-#endif
-#ifdef ASM_OUTPUT_QUADRUPLE_INT
-      case 16:
-       ASM_OUTPUT_QUADRUPLE_INT (asm_out_file, x);
-       return 1;
-#endif
-      }
+  if (aligned_p)
+    ops = &targetm.asm_out.aligned_op;
   else
+    ops = &targetm.asm_out.unaligned_op;
+
+  switch (size)
     {
-      const char *asm_op = NULL;
+    case 1:
+      return targetm.asm_out.byte_op;
+    case 2:
+      return ops->hi;
+    case 4:
+      return ops->si;
+    case 8:
+      return ops->di;
+    case 16:
+      return ops->ti;
+    default:
+      return NULL;
+    }
+}
 
-      /* ??? This isn't quite as flexible as the ASM_OUTPUT_INT type hooks.
-        At present powerpc-eabi can't jump -mrelocatable hoops, so you can
-        get assembler errors from symbolic references in packed structs.  */
-      switch (size)
-       {
-#ifdef UNALIGNED_SHORT_ASM_OP
-       case 2:
-         asm_op = UNALIGNED_SHORT_ASM_OP;
-         break;
-#endif
-#ifdef UNALIGNED_INT_ASM_OP
-       case 4:
-         asm_op = UNALIGNED_INT_ASM_OP;
-         break;
-#endif
-#ifdef UNALIGNED_DOUBLE_INT_ASM_OP
-       case 8:
-         asm_op = UNALIGNED_DOUBLE_INT_ASM_OP;
-         break;
-#endif
-       }
+/* Use directive OP to assemble an integer object X.  Print OP at the
+   start of the line, followed immediately by the value of X.  */
 
-      if (asm_op)
-       {
-         fputs (asm_op, asm_out_file);
-         output_addr_const (asm_out_file, x);
-         fputc ('\n', asm_out_file);
-         return 1;
-       }
-    }
+void
+assemble_integer_with_op (op, x)
+     const char *op;
+     rtx x;
+{
+  fputs (op, asm_out_file);
+  output_addr_const (asm_out_file, x);
+  fputc ('\n', asm_out_file);
+}
 
-  /* If we couldn't do it that way, there are two other possibilities: First,
-     if the machine can output an explicit byte and this is a 1 byte constant,
-     we can use ASM_OUTPUT_BYTE.  */
+/* The default implementation of the asm_out.integer target hook.  */
 
-#ifdef ASM_OUTPUT_BYTE
-  if (size == 1 && GET_CODE (x) == CONST_INT)
-    {
-      ASM_OUTPUT_BYTE (asm_out_file, INTVAL (x));
-      return 1;
-    }
-#endif
+bool
+default_assemble_integer (x, size, aligned_p)
+     rtx x ATTRIBUTE_UNUSED;
+     unsigned int size ATTRIBUTE_UNUSED;
+     int aligned_p ATTRIBUTE_UNUSED;
+{
+  const char *op = integer_asm_op (size, aligned_p);
+  return op && (assemble_integer_with_op (op, x), true);
+}
 
-  /* If SIZE is larger than a single word, try to output the constant
-     one word at a time.  */
+/* Assemble the integer constant X into an object of SIZE bytes.  ALIGN is
+   the alignment of the integer in bits.  Return 1 if we were able to output
+   the constant, otherwise 0.  If FORCE is non-zero, abort if we can't output
+   the constant.  */
 
-  if (size > UNITS_PER_WORD)
-    {
-      enum machine_mode mode
-       = mode_for_size (size * BITS_PER_UNIT, MODE_INT, 0);
-      unsigned align2 = min_align (align, BITS_PER_WORD);
-      unsigned int i;
+bool
+assemble_integer (x, size, align, force)
+     rtx x;
+     unsigned int size;
+     unsigned int align;
+     int force;
+{
+  int aligned_p;
 
-      for (i = 0; i < size / UNITS_PER_WORD; i++)
-       {
-         rtx word = operand_subword (x, i, 0, mode);
-         if (word == 0)
-           break;
-         if (! assemble_integer (word, UNITS_PER_WORD, align2, 0))
-           break;
-       }
+  aligned_p = (align >= MIN (size * BITS_PER_UNIT, BIGGEST_ALIGNMENT));
 
-      if (i == size / UNITS_PER_WORD)
-       return 1;
-      /* If we output at least one word and then could not finish,
-        there is no valid way to continue.  */
-      if (i > 0)
-       abort ();
-    }
+  /* See if the target hook can handle this kind of object.  */
+  if ((*targetm.asm_out.integer) (x, size, aligned_p))
+    return true;
 
-  /* If unaligned, and this is a constant, emit it one byte at a time.  */
-  if (align < size * BITS_PER_UNIT)
+  /* If the object is a multi-byte one, try splitting it up.  Split
+     it into words it if is multi-word, otherwise split it into bytes.  */
+  if (size > 1)
     {
       enum machine_mode omode, imode;
-      unsigned int i;
+      unsigned int subalign;
+      unsigned int subsize, i;
 
-      omode = mode_for_size (BITS_PER_UNIT, MODE_INT, 0);
+      subsize = size > UNITS_PER_WORD? UNITS_PER_WORD : 1;
+      subalign = MIN (align, subsize * BITS_PER_UNIT);
+      omode = mode_for_size (subsize * BITS_PER_UNIT, MODE_INT, 0);
       imode = mode_for_size (size * BITS_PER_UNIT, MODE_INT, 0);
 
-      for (i = 0; i < size; i++)
+      for (i = 0; i < size; i += subsize)
        {
-         rtx byte = simplify_subreg (omode, x, imode, i);
-         if (byte == 0)
-           break;
-         if (! assemble_integer (byte, 1, BITS_PER_UNIT, 0))
+         rtx partial = simplify_subreg (omode, x, imode, i);
+         if (!partial || !assemble_integer (partial, subsize, subalign, 0))
            break;
        }
-
       if (i == size)
-       return 1;
-      /* If we output at least one byte and then could not finish,
-        there is no valid way to continue.  */
+       return true;
+
+      /* If we've printed some of it, but not all of it, there's no going
+        back now.  */
       if (i > 0)
        abort ();
     }
@@ -2069,7 +2035,7 @@ assemble_integer (x, size, align, force)
   if (force)
     abort ();
 
-  return 0;
+  return false;
 }
 \f
 /* Assemble the floating-point constant D into an object of size MODE.  */