CSET

Integer, logic, video and predicate instructions

fixed bit field field the encoding fixes should be

CSET

6362616059585756555453525150494847464544434241403938373635343332
0101000010011
313029282726252423222120191817161514131211109876543210
pred.notpredRd

bits 63:48: 0101 0000 1001 1---

Runs execute_CSETP with Form() 1.

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
[47]47execute_CSETP
yes46:45execute_CSETP
truth44execute_CSETP
condition42execute_CSETP
condition41:39execute_CSETP
pred.not19the decoder
pred18:16the decoder
test12:8execute_CSETP
Rd7:0Dst()
[5:3]5:3execute_CSETP
[2:0]2:0execute_CSETP

Operation Sail

CSETP and CSET: the condition code's test (8-12) combined with the predicate at 39

let test = CcTest(UInt(Field(8, 5)));
let condition = PredRead(UInt(Field(39, 3)), UInt(Field(42, 1)));
let yes = Combine53(UInt(Field(45, 2)), test, condition);
if Form() == 1 then {
    let truth = Bits32(if Field(44, 1) == 0b1 then 0x3f800000 else 0xffffffff);
    let result = RawSelect(yes, truth, 0x00000000);
    if Field(47, 1) == 0b1 then FlagsLogic(result);
    R_write(Dst(), result)
} else {
    PredWrite(UInt(Field(3, 3)), yes);
    PredWrite(UInt(Field(0, 3)), Combine53(UInt(Field(45, 2)), not_bool(test), condition))
}

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