FLO

Integer, logic, video and predicate instructions

fixed bit field field the encoding fixes should be

FLO (reg)

6362616059585756555453525150494847464544434241403938373635343332
0101110000110
313029282726252423222120191817161514131211109876543210
Rbpred.notpredRd

bits 63:48: 0101 1100 0011 0---

Runs execute_FLO with Form() 0.

FLO (cbuf)

6362616059585756555453525150494847464544434241403938373635343332
0100110000110cbuf.bankcbuf.offset
313029282726252423222120191817161514131211109876543210
cbuf.offsetpred.notpredRd

bits 63:48: 0100 1100 0011 0---

Runs execute_FLO with Form() 1.

FLO (imm)

6362616059585756555453525150494847464544434241403938373635343332
0011100imm.sign00110imm
313029282726252423222120191817161514131211109876543210
immpred.notpredRd

bits 63:48: 0011 100- 0011 0---

Runs execute_FLO with Form() 2.

Fields

The operation reads some of these fields in some forms alone (it chooses by Form()), so the diagrams show only the decoder's.

FieldBitsFrom
[48]48execute_FLO
[41]41execute_FLO
[40]40execute_FLO
Rb27:20the right operand
pred.not19the decoder
pred18:16the decoder
Rd7:0Dst()

Operation Sail

FLO: the highest bit set (of the inverse with bit 40; of a negative value's inverse when signed, 48), its distance from 31 with bit 41 (none: 0xffffffff), from the bits spread below it and counted

var value : bits(32) = RightOf(Form());
if Field(40, 1) == 0b1 then { value = not_vec(value) };
if Field(48, 1) == 0b1 then {
    let negative = Negative(value);
    value = if negative then not_vec(value) else value
};
var spread : bits(32) = value;
foreach (k from 0 to 4) { spread = spread | (spread >> to_bits(32, 2 ^ k)) };
let index = PopCount(spread) - 0x00000001;
if Field(41, 1) == 0b1 then {
    let found = value != 0x00000000;
    R_write(Dst(), if found then 0x0000001f - index else index)
} else R_write(Dst(), index)

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).