This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ASM_OUTPUT_OPCODE returning new string


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]