Paired Singles

From Luma's Workshop
Revision as of 23:16, 16 February 2025 by Shibboleet (talk | contribs) (Created page with "''Paired Singles'' are a part of the Broadway / Gekko processor that allows for two single-precision floating point values to be stored in a single register. This allows for faster vector and matrix math. ''Paired Singles'' are handwritten assembly code; they cannot be generated by the compiler '''unless''' it is for pushing / popping the stack frame in a functions prologue or epilogue. The ''Super Mario Galaxy'' games do not use very many different paired single instruc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Paired Singles are a part of the Broadway / Gekko processor that allows for two single-precision floating point values to be stored in a single register. This allows for faster vector and matrix math. Paired Singles are handwritten assembly code; they cannot be generated by the compiler unless it is for pushing / popping the stack frame in a functions prologue or epilogue. The Super Mario Galaxy games do not use very many different paired single instructions, so this page only covers the ones used by the game.

Loading And Storing

psq_l

Loads a paired single into the destination register FRD.

psq_l FRD, D(RA), W, I
Name Description
FRD Destination register for the paired single loaded.
D(RA) Memory address, where D is the offset, and RA is the source register.
W Size of the paired single. 0 loads the first two floats where 1 only loads the third.
I Determines the type of register to load from. Only used as 0 (floating point).

Math

ps_madd

ps_madd FRT, FRA, FRB, FRC