This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Re: [MIPS] avoiding certain instruction in delay slots


On Mon, 3 Feb 2014, Richard Sandiford wrote:

> If this particular errata applies specifically to delay slots though,
> you'd need to handle it differently from -mfix-24k.  You'd need to teach
> both GCC and GAS about the restrictions.  In the GCC case this would be
> by setting the "can_delay" attribute to "no" for the problem cases,
> while for GAS it would be making can_swap_branch_p return false.

 You'd have to teach GAS to bail out on delay slots already scheduled 
manually in handcoded assembly too, e.g.:

	.set	noreorder
	beqz	$2, foo
	 lw	$2, 8($sp)

cannot be resolved automatically (the two instructions cannot be swapped 
and NOP inserted in the delay slot instead; not that GAS already supports 
it anyway) because of a data dependency on $2 and you do want to make the 
user aware of this issue so that they can rewrite code instead.

  Maciej


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