bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/27075] [MIPS] Gas adds useless delay-slot nops to r6 compact br


From: positron at gnu dot org
Subject: [Bug gas/27075] [MIPS] Gas adds useless delay-slot nops to r6 compact branches, which have no delay slots
Date: Tue, 15 Dec 2020 19:22:31 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=27075

--- Comment #1 from Luca Saiu <positron at gnu dot org> ---
On 2020-12-15 at 18:03 +0100, Luca Saiu wrote:

> This, while not technically assembling incorrect code, does not make
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

One more remark: I was not able to reproduce this behaviour with compact
branches, but it is possible that in some cases Gas' rewrite machinery
might actually move a previous instruction past the branch instead of
inserting a nop.  That would in fact be incorrect code with compact
branches.

For example (using a traditional MIPS branch with delay slot) this:

        addu  $10, $11, $12
        beq   $13, $14, foo

may turn into:

   0:   11aeffff        beq     $13,$14,0x0
   4:   016c5021        addu    $10,$11,$12

If that happened with compact branches it would be a disaster.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]