This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
ASM_OUTPUT_OPCODE returning new string
- From: Dan Towner <dant at picochip dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 18 Jun 2002 12:11:29 +0100
- Subject: ASM_OUTPUT_OPCODE returning new string
- Organization: picoChip Designs Ltd.
Hi all,
Can I use ASM_OUTPUT_OPCODE to return a pointer to a different string
than that passed to the macro? For example, I am porting to a VLIW
processor, and I want to be able to append a `\' to the end of some
instructions in a VLIW packet:
insn1 \
insn2 \
insn3
The easiest way to do this, without completely rewriting each
instruction output template, appears to be to detect the VLIW'd packet
in ASM_OUTPUT_OPCODE, and return a new string which is the original
string, with a `\` appended to it. Is this valid, or might it break
things if the new pointer is different to the original string's pointer?
Thanks,
Dan.
=============================================================================
Daniel Towner
picoChip Designs Ltd., Riverside Buildings, 108, Walcot Street, BATH,
BA1 5BG
dant@picochip.com
07786 702589