[MIPS] avoiding certain instruction in delay slots
Sven Anderson
sven@anderson.de
Mon Feb 3 23:11:00 GMT 2014
Am 03.02.2014 um 16:14 schrieb Maciej W. Rozycki <macro@linux-mips.org>:
> 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.
Is it really like that? I assumed the dependency would trigger a hazard and the branch would wait for $2 to be ready?
BR
Sven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4130 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20140203/af79c8be/attachment.p7s>
More information about the Binutils
mailing list