Good morning! Today, the last part of the #OpenBSD/sgi story is available.

In this episode, hardware conditions documented as "Can't happen" happen, and support for one particular CPU model "everyone agrees will never get supported by free software" gets nevertheless written.

Read it at:
http://miod.online.fr/software/openbsd/stories/sgi6.html

You can also now read the whole story in one page:
http://miod.online.fr/software/openbsd/stories/sgiall.html

I'll return to the usual "new material on wednesdays" schedule next week.

OpenBSD on SGI, 6/6: The last challenges

@miodvallat hhwhuh?

the assembler will do an optimization pass itself and reorder instructions to get faster code.

The assembler? Its job is to assemble, not to optimise… does gas really do that?

FWIW, little-endian MIPS (o32 and n64) lived on in Debian until bookworm (released 2023-06-10), and for about a year and a half more in unstable; big-endian MIPS did indeed get removed earlier. Pity.

@mirabilos MIPS defines many assembler instructions which are actually macros, which expansion will depend on the actual operands. In other words, the assembly output of the compiler is in fact an intermediate ("high-level") assembly language, which as(1) compiles into real assembly language.
@miodvallat yes, of course, but would it reorder instructions?
@mirabilos To fill delay slots. The assembler can either let you handle delay slots in "noreorder" mode, or let you work as if they did not exist, and will reorder instructions so as to fill them as best as it can. This can be useful for beginners.

@miodvallat … ah.

I vaguely remember seeing them, but…

`move' `reorder' `volatile' These control whether and how the assembler may re-order instructions. Accepted for compatibility with the OSF/1 assembler, but `as' does not do instruction scheduling, so these features are ignored.

… and I only ever worked in “no reorder” mode in SPARC and what bit of MIPS assembly I hacked around back in FreeWRT days.

Delay slots did require some time to get used to them, mind-bending at first, but they are quite nice. (On SPARC, anyway.)

@mirabilos That part of the documentation you're quoting applies to Alpha, not MIPS.
@miodvallat ah, but I cannot find anything else about reorder in the docs…
@mirabilos This only shows that the documentation is incomplete. Good thing we also have the source code, don't we? In this case, gas/config/tc-mips.c