OSDN Git Service

* target.h (asm_out.byte_op, asm_out.aligned_op, asm_out.unaligned_op,
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Dec 2001 15:05:40 +0000 (15:05 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Dec 2001 15:05:40 +0000 (15:05 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48101 138bc75d-0d04-0410-961f-82ee72b054a4

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 ff720d1..211386b 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 a5ad52a..54a2216 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 9d05863..90903c9 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 5312471..3291bab 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 27b33be..775179d 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 7dcb4a6..2588f5f 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 43dabce..db23a57 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 7c88229..7e9b4d8 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 5ecc1ec..62ed010 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 ddd989b..d7db3bd 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 387788d..01826b8 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 fbdbba0..9832eda 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 7ede666..7a5f03a 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 eefa198..6060275 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 b6f4d74..e47b7e0 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 8b7e1a1..7e20748 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 23810bf..fac7e46 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 3559652..ee878dd 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 5dd4a12..824fa2c 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 7e6bd13..96c1caa 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 1d202c0..48671b0 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 45f9264..cd625c1 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 f77ed67..bee0f17 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 c6e0255..d8fa683 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 5e29792..8d2afa8 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 38a92ae..c7e2cba 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 9eea5f5..f359d3d 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 af641b3..ebdefb5 100644 (file)
@@ -3779,53 +3779,6 @@ extern const char *d30v_branch_cost_string;
 /* #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 cfa2bd5..7988b61 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 ea1ea6b..a2f68af 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 5e67f71..5cd1012 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 215b452..af05183 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 003fca2..d09bdbc 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 7e8a24c..c2b9c57 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 16cd898..13e39d8 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 d504991..c386297 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 3c7b46b..b8f84f7 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 2df15e2..e16c54c 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 d27c987..0535d5f 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 bbe2782..81be7bd 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 044fd5a..826382f 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 2726f7b..df47f89 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 6473cae..c58db1b 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 cc4aa5c..36b4639 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 aa65281..0c60bda 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 a95a23e..b38bdca 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 42bfcd3..b7d7b3d 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 16861a8..211ca36 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 da3ad8f..ff1585e 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 0487aa5..d280d58 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 4ccd74b..0d44b1a 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 e86a91e..b12cb12 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 29ee288..dfc9f0d 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 106d512..aec2f2c 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 f0f925b..2a374fc 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 840da5a..cc26176 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 68d9eda..ffa28d5 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 1184295..12cf09c 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 b7d3919..c46fe12 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 49e50a4..24fdba1 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 8159d54..1b5d469 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 cdb3f25..2b1dc75 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 614caa0..4741849 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 dd3c308..b0e82dc 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 73b38fb..c2603c5 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 d1968c0..998240e 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 322058e..12b106a 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 3f368c7..86d9853 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 27aa342..b237929 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 812f6f7..8fa6b42 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 403e4d1..11784c7 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 92bded3..31415b9 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 f893203..228d98f 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 65a34ee..4637d81 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 ae47c19..88154fc 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 7b1f0e7..d2bb108 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 1c8da7a..6801f6b 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 5e4c212..7f44b26 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 927e92d..f9009df 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 df50196..e3ce288 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 c47619d..47c49b8 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 ef1feed..45cb3e8 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 a367a55..2b47e24 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 7bced8e..2709c57 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 7e3efa0..2c8fd83 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 d7a989a..776434a 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 1d79f8e..9601efb 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 b041508..c877fd1 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 1df6974..e178355 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 e1b11a3..0a3aca1 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 6d1c72d..9ba6c2d 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 4fcc27e..8cb14e2 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 5f286e5..bbe25b6 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 ffc5c7c..3aa38cf 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 23fe80f..54bf040 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 db77f06..4adf823 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 dd7c14b..3a1515c 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 264245e..3802675 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 f4d52b2..8bd64f6 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 a79567a..416e079 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 27d2d79..6234a33 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 f6255fa..525a942 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 03e596c..5054565 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 5f8d968..61327e7 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 115062d..11c6aad 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 2a1cd2b..f9b7e9d 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 785ee88..80a4c8a 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 5b4c86e..b2abd81 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 d84706e..8669324 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 56e16ba..e5abf8e 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 246e9d9..095a566 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 ce1477e..25bae58 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 743276c..83e02a8 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 988d7e2..9b85fb4 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 322de21..d08100d 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 cdb25c8..b2dd8f9 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 54b672e..6138446 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 9f6e38c..82f7d32 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 40d18df..3bd2a53 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 7e0e1fc..b0778eb 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 48906d4..d93f57c 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 4d88325..3580275 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 0848ecd..7f4f7db 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 be10190..a4c7f91 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 2f92367..a8906c6 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 7ad9c55..4f71d53 100644 (file)
@@ -3572,57 +3572,6 @@ do { char dstr[30];                                     \
 /* #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 3e17c65..4de6f52 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 t