This is the mail archive of the gcc-patches@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]

Re: Clear out /s field when deleting label


On Sun, May 28, 2000 at 07:02:40PM +0900, NIIBE Yutaka wrote:
> 	      mov.l .L2, $r1
> 	.L1:
> 	      bsrf $r1
> 	      nop
> 	...
> 	.L2: .long function@PLT+.-4-.L1
> 
> To do so, we emit the code_label for .L1.  This label may be deleted
> by the flow analysis, it will become note insn.

This isn't going to work.  Once the label is deleted, it is
no longer anchored to one spot, and may float around.  When
it does, your pc-relative offsets will break.

I'd suggest something a bit more magic.

	(parallel [(call (...))
		   (use (const_int 45))])

  emits

	bsrf $r1
    .LPLT45:
	nop

The use in the const pool could be a symbol ref, or whatever,
so long as it knows that `45' is the magic number for that call.

> 	* flow.c (flow_delete_insn_chain): Clear out /s field so that
> 	haifa-sched.c:add_dependence doesn't get confused.

Haifa shouldn't have been looking at LABEL_PRESERVE_P to begin with.


r~

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