This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Using get_attr_type in final_prescan_insn
- From: Dan Towner <dant at picochip dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 31 Oct 2002 17:56:41 +0000
- Subject: Using get_attr_type in final_prescan_insn
- Organization: picoChip Designs Ltd.
Hi all,
My 16-bit VLIW port uses the final_prescan_insn hook. Whenever a new
VLIW packet starts (i.e., the instruction has TImode), I scan ahead
through the instructions in the same packet, and for each instruction, I
see if it has certain attributes, using get_attr_type. However, I have
discovered that get_attr_type changes recog_data.insn, which results in
a later call to asm_output_opcode failing (it uses recog_data.operands
to output VLIW'd packets using the current operands).
Is there any way in which I can get the attribute type without changing
recog_data.insn, or will I have to save and restore the recog_data value
while I am reading the attributes?
Thanks,
Dan.
=============================================================================
Daniel Towner
picoChip Designs Ltd., Riverside Buildings, 108, Walcot Street, BATH,
BA1 5BG
dant@picochip.com
07786 702589