PATCH: Fix -xauto for ia64 assembler
H. J. Lu
hjl@lucon.org
Fri May 28 17:37:00 GMT 2004
More information about the Binutils mailing list
Fri May 28 17:37:00 GMT 2004
- Previous message (by thread): PATCH: Fix -xauto for ia64 assembler
- Next message (by thread): PATCH: Fix -xauto for ia64 assembler
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, May 27, 2004 at 11:09:23PM -0700, Jim Wilson wrote: > On Thu, 2004-05-27 at 22:18, H. J. Lu wrote: > > * config/tc-ia64.c (remove_marked_resource): Restore the old > > slot when inserting srlz.i/srlz.d. > > Yes, like that, except if we are copying the entire CURR_SLOT, then we > probably need to be clearing more of the fields too. Shouldn't we be > clearing all of CURR_SLOT instead of just a couple of fields? If we do > clear more fields, is there any risk of breaking anything? I don't > think so, but I can't prove it. > > This patch does work right with the tag and unwind testcases I gave > though. It doesn't seem to work right for debug info. The inserted > instruction ends up at line 2, whereas I would expect it to be at line > 1. This is perhaps arguable though. Here is the new patch. H.J. --- 2004-05-28 H.J. Lu <hongjiu.lu@intel.com> * config/tc-ia64.c (remove_marked_resource): Restore the old slot when inserting srlz.i/srlz.d. --- gas/config/tc-ia64.c.auto 2004-05-27 22:08:52.000000000 -0700 +++ gas/config/tc-ia64.c 2004-05-28 08:51:01.480217959 -0700 @@ -9560,17 +9560,15 @@ remove_marked_resource (rs) insn_group_break (1, 0, 0); if (rs->insn_srlz < STATE_SRLZ) { - int oldqp = CURR_SLOT.qp_regno; - struct ia64_opcode *oldidesc = CURR_SLOT.idesc; + struct slot oldslot = CURR_SLOT; /* Manually jam a srlz.i insn into the stream */ - CURR_SLOT.qp_regno = 0; + memset (&CURR_SLOT, 0, sizeof (CURR_SLOT)); CURR_SLOT.idesc = ia64_find_opcode ("srlz.i"); instruction_serialization (); md.curr_slot = (md.curr_slot + 1) % NUM_SLOTS; if (++md.num_slots_in_use >= NUM_SLOTS) emit_one_bundle (); - CURR_SLOT.qp_regno = oldqp; - CURR_SLOT.idesc = oldidesc; + CURR_SLOT = oldslot; } insn_group_break (1, 0, 0); break; @@ -9583,17 +9581,15 @@ remove_marked_resource (rs) if (rs->data_srlz < STATE_STOP) insn_group_break (1, 0, 0); { - int oldqp = CURR_SLOT.qp_regno; - struct ia64_opcode *oldidesc = CURR_SLOT.idesc; + struct slot oldslot = CURR_SLOT; /* Manually jam a srlz.d insn into the stream */ - CURR_SLOT.qp_regno = 0; + memset (&CURR_SLOT, 0, sizeof (CURR_SLOT)); CURR_SLOT.idesc = ia64_find_opcode ("srlz.d"); data_serialization (); md.curr_slot = (md.curr_slot + 1) % NUM_SLOTS; if (++md.num_slots_in_use >= NUM_SLOTS) emit_one_bundle (); - CURR_SLOT.qp_regno = oldqp; - CURR_SLOT.idesc = oldidesc; + CURR_SLOT = oldslot; } break; case IA64_DVS_IMPLIED:
- Previous message (by thread): PATCH: Fix -xauto for ia64 assembler
- Next message (by thread): PATCH: Fix -xauto for ia64 assembler
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list