ASM_OUTPUT_OPCODE returning new string

Dan Towner dant@picochip.com
Tue Jun 18 07:33:00 GMT 2002


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



More information about the Gcc mailing list