[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MIPS] Gas adds useless delay-slot nops to r6 compact branches, whic
From: |
Luca Saiu |
Subject: |
Re: [MIPS] Gas adds useless delay-slot nops to r6 compact branches, which have no delay slots |
Date: |
Tue, 15 Dec 2020 20:16:15 +0100 |
User-agent: |
Gnus (Gnus v5.13), GNU Emacs 27.0.50, x86_64-pc-linux-gnu |
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:
--8<---------------cut here---------------start------------->8---
addu $10, $11, $12
beq $13, $14, foo
--8<---------------cut here---------------end--------------->8---
may turn into:
--8<---------------cut here---------------start------------->8---
0: 11aeffff beq $13,$14,0x0
4: 016c5021 addu $10,$11,$12
--8<---------------cut here---------------end--------------->8---
If that happened with compact branches it would be a disaster.
I am adding a report to Bugzilla.
--
Luca Saiu
* My personal web site: http://ageinghacker.net
* GNU epsilon: http://www.gnu.org/software/epsilon
* Jitter: http://ageinghacker.net/projects/jitter
I support everyone's freedom of mocking any opinion or belief, no
matter how deeply held, with open disrespect and the same unrelented
enthusiasm of a toddler who has just learned the word "poo".
signature.asc
Description: PGP signature