BRX

Branches, calls, returns, the control stack's pushes and pops, KIL and EXIT

fixed bit field field the encoding fixes should be

BRX

6362616059585756555453525150494847464544434241403938373635343332
111000100101words
313029282726252423222120191817161514131211109876543210
wordspred.notpredRa

bits 63:48: 1110 0010 0101 ----

Runs execute_BRX with Form() 0.

Fields

FieldBitsFrom
words43:20execute_BRX
pred.not19the decoder
pred18:16the decoder
Ra15:8RegA()

Operation Sail

BRX: the register at 8 plus the signed offset at 20, in bytes from the next instruction, as words; a target on a scheduling word goes to the instruction after it

let words = SignedWords(RegA(), UInt(Field(20, 24)));
let target0 = words + to_bits(32, InsnIndex() + 1);
let after_ten = target0 - 0x0000000a;
let aligned = (after_ten & 0x00000003) == 0x00000000;
let in_range = not_bool(UInt(target0) < 10);
let needs_skip = aligned & in_range;
let target = target0 + (if needs_skip then 0x00000001 else 0x00000000);
if Structured() then BranchTarget(target) else PcWrite(target)

Made from ScarletNX's Sail at 166ad3910f80. The Sail and the encodings' file are ScarletNX's (GPL-3.0-or-later); its encodings are from Eden's maxwell.inc (GPL-2.0-or-later).