diff --git a/crates/decoder/tests/gfx1030.rs b/crates/decoder/tests/gfx1030.rs index ae9f8b95..73f7110a 100644 --- a/crates/decoder/tests/gfx1030.rs +++ b/crates/decoder/tests/gfx1030.rs @@ -375,13 +375,14 @@ fn reference_op(instruction: Instruction) -> Op { reference_scalar(src0), reference_scalar(src1), ), - // The reference's VOP3 add; it is the only VOP3 variant so far. + // The reference fixture exercises only the VOP3 add. Instruction::VectorAluVop3 { op: VectorAluVop3Op::AddNcU32, dst, src0, src1, } => Op::Add(dst, src0, src1), + Instruction::VectorAluVop3 { op, .. } => panic!("no reference VOP3 mapping for {op:?}"), Instruction::ScalarMoveB32 { dst, src } => Op::ScalarMove(dst, reference_scalar(src)), Instruction::ScalarUnary { op, dst, src } => Op::ScalarUnary( match op { @@ -1040,3 +1041,80 @@ fn decode_at_resolves_branch_targets_from_the_stream_offset() { }) ); } + +// llvm-mc -triple=amdgcn -mcpu=gfx1030 -show-encoding +const VOP3_INTEGER_ENCODINGS: [(VectorAluVop3Op, u32); 11] = [ + // v_mul_i32_i24_e64 v255, v0, v127 ; encoding: [0xff,0x00,0x09,0xd5,0x00,0xff,0x02,0x02] + (VectorAluVop3Op::MulI32I24, 0xd50900ff), + // v_mul_hi_i32_i24_e64 v255, v0, v127 ; encoding: [0xff,0x00,0x0a,0xd5,0x00,0xff,0x02,0x02] + (VectorAluVop3Op::MulHiI32I24, 0xd50a00ff), + // v_mul_u32_u24_e64 v255, v0, v127 ; encoding: [0xff,0x00,0x0b,0xd5,0x00,0xff,0x02,0x02] + (VectorAluVop3Op::MulU32U24, 0xd50b00ff), + // v_mul_hi_u32_u24_e64 v255, v0, v127 ; encoding: [0xff,0x00,0x0c,0xd5,0x00,0xff,0x02,0x02] + (VectorAluVop3Op::MulHiU32U24, 0xd50c00ff), + // v_min_i32_e64 v255, v0, v127 ; encoding: [0xff,0x00,0x11,0xd5,0x00,0xff,0x02,0x02] + (VectorAluVop3Op::MinI32, 0xd51100ff), + // v_max_i32_e64 v255, v0, v127 ; encoding: [0xff,0x00,0x12,0xd5,0x00,0xff,0x02,0x02] + (VectorAluVop3Op::MaxI32, 0xd51200ff), + // v_min_u32_e64 v255, v0, v127 ; encoding: [0xff,0x00,0x13,0xd5,0x00,0xff,0x02,0x02] + (VectorAluVop3Op::MinU32, 0xd51300ff), + // v_max_u32_e64 v255, v0, v127 ; encoding: [0xff,0x00,0x14,0xd5,0x00,0xff,0x02,0x02] + (VectorAluVop3Op::MaxU32, 0xd51400ff), + // v_xnor_b32_e64 v255, v0, v127 ; encoding: [0xff,0x00,0x1e,0xd5,0x00,0xff,0x02,0x02] + (VectorAluVop3Op::XnorB32, 0xd51e00ff), + // v_sub_nc_u32_e64 v255, v0, v127 ; encoding: [0xff,0x00,0x26,0xd5,0x00,0xff,0x02,0x02] + (VectorAluVop3Op::SubNcU32, 0xd52600ff), + // v_subrev_nc_u32_e64 v255, v0, v127 ; encoding: [0xff,0x00,0x27,0xd5,0x00,0xff,0x02,0x02] + (VectorAluVop3Op::SubrevNcU32, 0xd52700ff), +]; +const VOP3_INTEGER_SOURCE_WORD: u32 = 0x0202_ff00; + +#[test] +fn decodes_registry_vop3_integer_encodings() { + for (op, first) in VOP3_INTEGER_ENCODINGS { + let bytes = [first.to_le_bytes(), VOP3_INTEGER_SOURCE_WORD.to_le_bytes()].concat(); + let decoded = decode(Architecture::Gfx1030, &bytes).unwrap(); + assert_eq!(decoded.len(), 1); + assert_eq!(decoded[0].byte_len, 8); + assert_eq!( + decoded[0].instruction, + Instruction::VectorAluVop3 { + op, + dst: 255, + src0: 0, + src1: 127, + } + ); + } +} + +#[test] +fn rejects_registry_vop3_integer_modifiers_and_other_sources() { + for (op, first) in VOP3_INTEGER_ENCODINGS { + let second = VOP3_INTEGER_SOURCE_WORD; + let reject = |first: u32, second: u32| { + let bytes = [first.to_le_bytes(), second.to_le_bytes()].concat(); + let error = decode(Architecture::Gfx1030, &bytes) + .expect_err(&format!("{op:?} accepted {first:#010x} {second:#010x}")); + assert_eq!(error.offset, 0); + assert!(matches!( + error.kind, + DecodeErrorKind::UnsupportedForm { mnemonic, .. } + if mnemonic == op.assembly_name() + )); + }; + + // First word: ABS[10:8], OP_SEL[14:11], CLAMP[15]. + for bit in 8..=15 { + reject(first | (1 << bit), second); + } + // Second word: OMOD[28:27], NEG[31:29]. + for bit in 27..=31 { + reject(first, second | (1 << bit)); + } + + reject(first, second & !0x1ff); // SRC0 = s0 + reject(first, (second & !(0x1ff << 9)) | (128 << 9)); // SRC1 = inline zero + reject(first, second | (1 << 18)); // SRC2 = inline one + } +} diff --git a/crates/isa/semantics/rdna2/vop3.toml b/crates/isa/semantics/rdna2/vop3.toml index 960e6271..29627f35 100644 --- a/crates/isa/semantics/rdna2/vop3.toml +++ b/crates/isa/semantics/rdna2/vop3.toml @@ -35,3 +35,130 @@ spec = [ { document = "guide", section = "12.7", page = 134 }, ] verify = ["reference", "independent", "metal", "llvm_encoding"] + +# ABS and NEG apply to floating-point inputs (guide 6.2.1) and OMOD +# applies to floating-point results (6.2.2). These integer forms use neither. +# OP_SEL selects 16-bit halves (13.3.4). CLAMP saturates integer results +# (6.5), which these registry forms do not declare. SGPR, inline and literal +# sources remain outside this operand rule. + +[[encoding_variant]] +of = "V_MUL_I32_I24" +family = "VOP3" +opcode = 265 +operands = "vop3_vgpr2" +spec = [ + { document = "guide", section = "12.12", page = 167 }, + { document = "guide", section = "12.7", page = 131 }, +] +verify = ["reference", "independent", "metal", "llvm_encoding"] + +[[encoding_variant]] +of = "V_MUL_HI_I32_I24" +family = "VOP3" +opcode = 266 +operands = "vop3_vgpr2" +spec = [ + { document = "guide", section = "12.12", page = 167 }, + { document = "guide", section = "12.7", page = 132 }, +] +verify = ["reference", "independent", "metal", "llvm_encoding"] + +[[encoding_variant]] +of = "V_MUL_U32_U24" +family = "VOP3" +opcode = 267 +operands = "vop3_vgpr2" +spec = [ + { document = "guide", section = "12.12", page = 167 }, + { document = "guide", section = "12.7", page = 132 }, +] +verify = ["reference", "independent", "metal", "llvm_encoding"] + +[[encoding_variant]] +of = "V_MUL_HI_U32_U24" +family = "VOP3" +opcode = 268 +operands = "vop3_vgpr2" +spec = [ + { document = "guide", section = "12.12", page = 167 }, + { document = "guide", section = "12.7", page = 132 }, +] +verify = ["reference", "independent", "metal", "llvm_encoding"] + +[[encoding_variant]] +of = "V_MIN_I32" +family = "VOP3" +opcode = 273 +operands = "vop3_vgpr2" +spec = [ + { document = "guide", section = "12.12", page = 167 }, + { document = "guide", section = "12.7", page = 133 }, +] +verify = ["reference", "independent", "metal", "llvm_encoding"] + +[[encoding_variant]] +of = "V_MAX_I32" +family = "VOP3" +opcode = 274 +operands = "vop3_vgpr2" +spec = [ + { document = "guide", section = "12.12", page = 167 }, + { document = "guide", section = "12.7", page = 133 }, +] +verify = ["reference", "independent", "metal", "llvm_encoding"] + +[[encoding_variant]] +of = "V_MIN_U32" +family = "VOP3" +opcode = 275 +operands = "vop3_vgpr2" +spec = [ + { document = "guide", section = "12.12", page = 167 }, + { document = "guide", section = "12.7", page = 133 }, +] +verify = ["reference", "independent", "metal", "llvm_encoding"] + +[[encoding_variant]] +of = "V_MAX_U32" +family = "VOP3" +opcode = 276 +operands = "vop3_vgpr2" +spec = [ + { document = "guide", section = "12.12", page = 167 }, + { document = "guide", section = "12.7", page = 133 }, +] +verify = ["reference", "independent", "metal", "llvm_encoding"] + +[[encoding_variant]] +of = "V_XNOR_B32" +family = "VOP3" +opcode = 286 +operands = "vop3_vgpr2" +spec = [ + { document = "guide", section = "12.12", page = 167 }, + { document = "guide", section = "12.7", page = 134 }, +] +verify = ["reference", "independent", "metal", "llvm_encoding"] + +[[encoding_variant]] +of = "V_SUB_NC_U32" +family = "VOP3" +opcode = 294 +operands = "vop3_vgpr2" +spec = [ + { document = "guide", section = "12.12", page = 167 }, + { document = "guide", section = "12.7", page = 134 }, +] +verify = ["reference", "independent", "metal", "llvm_encoding"] + +[[encoding_variant]] +of = "V_SUBREV_NC_U32" +family = "VOP3" +opcode = 295 +operands = "vop3_vgpr2" +spec = [ + { document = "guide", section = "12.12", page = 167 }, + { document = "guide", section = "12.7", page = 134 }, +] +verify = ["reference", "independent", "metal", "llvm_encoding"] diff --git a/crates/isa/src/semantics_gen.rs b/crates/isa/src/semantics_gen.rs index 7f25966d..3a517a1d 100644 --- a/crates/isa/src/semantics_gen.rs +++ b/crates/isa/src/semantics_gen.rs @@ -1877,12 +1877,45 @@ impl VectorCompareOp { pub enum VectorAluVop3Op { /// `v_add_nc_u32_e64` (VOP3 opcode 293). AddNcU32, + /// `v_mul_i32_i24_e64` (VOP3 opcode 265). + MulI32I24, + /// `v_mul_hi_i32_i24_e64` (VOP3 opcode 266). + MulHiI32I24, + /// `v_mul_u32_u24_e64` (VOP3 opcode 267). + MulU32U24, + /// `v_mul_hi_u32_u24_e64` (VOP3 opcode 268). + MulHiU32U24, + /// `v_min_i32_e64` (VOP3 opcode 273). + MinI32, + /// `v_max_i32_e64` (VOP3 opcode 274). + MaxI32, + /// `v_min_u32_e64` (VOP3 opcode 275). + MinU32, + /// `v_max_u32_e64` (VOP3 opcode 276). + MaxU32, + /// `v_xnor_b32_e64` (VOP3 opcode 286). + XnorB32, + /// `v_sub_nc_u32_e64` (VOP3 opcode 294). + SubNcU32, + /// `v_subrev_nc_u32_e64` (VOP3 opcode 295). + SubrevNcU32, } impl VectorAluVop3Op { /// Every variant, in registry order. - pub const ALL: [Self; 1] = [ + pub const ALL: [Self; 12] = [ Self::AddNcU32, + Self::MulI32I24, + Self::MulHiI32I24, + Self::MulU32U24, + Self::MulHiU32U24, + Self::MinI32, + Self::MaxI32, + Self::MinU32, + Self::MaxU32, + Self::XnorB32, + Self::SubNcU32, + Self::SubrevNcU32, ]; /// Selects the variant from the first word of its VOP3 encoding: the @@ -1893,7 +1926,18 @@ impl VectorAluVop3Op { return None; } match (word >> 16) & 0x3ff { + 265 => Some(Self::MulI32I24), + 266 => Some(Self::MulHiI32I24), + 267 => Some(Self::MulU32U24), + 268 => Some(Self::MulHiU32U24), + 273 => Some(Self::MinI32), + 274 => Some(Self::MaxI32), + 275 => Some(Self::MinU32), + 276 => Some(Self::MaxU32), + 286 => Some(Self::XnorB32), 293 => Some(Self::AddNcU32), + 294 => Some(Self::SubNcU32), + 295 => Some(Self::SubrevNcU32), _ => None, } } @@ -1902,6 +1946,17 @@ impl VectorAluVop3Op { pub const fn base(self) -> VectorAluOp { match self { Self::AddNcU32 => VectorAluOp::AddNcU32, + Self::MulI32I24 => VectorAluOp::MulI32I24, + Self::MulHiI32I24 => VectorAluOp::MulHiI32I24, + Self::MulU32U24 => VectorAluOp::MulU32U24, + Self::MulHiU32U24 => VectorAluOp::MulHiU32U24, + Self::MinI32 => VectorAluOp::MinI32, + Self::MaxI32 => VectorAluOp::MaxI32, + Self::MinU32 => VectorAluOp::MinU32, + Self::MaxU32 => VectorAluOp::MaxU32, + Self::XnorB32 => VectorAluOp::XnorB32, + Self::SubNcU32 => VectorAluOp::SubNcU32, + Self::SubrevNcU32 => VectorAluOp::SubrevNcU32, } } @@ -1909,6 +1964,17 @@ impl VectorAluVop3Op { pub const fn assembly_name(self) -> &'static str { match self { Self::AddNcU32 => "v_add_nc_u32_e64", + Self::MulI32I24 => "v_mul_i32_i24_e64", + Self::MulHiI32I24 => "v_mul_hi_i32_i24_e64", + Self::MulU32U24 => "v_mul_u32_u24_e64", + Self::MulHiU32U24 => "v_mul_hi_u32_u24_e64", + Self::MinI32 => "v_min_i32_e64", + Self::MaxI32 => "v_max_i32_e64", + Self::MinU32 => "v_min_u32_e64", + Self::MaxU32 => "v_max_u32_e64", + Self::XnorB32 => "v_xnor_b32_e64", + Self::SubNcU32 => "v_sub_nc_u32_e64", + Self::SubrevNcU32 => "v_subrev_nc_u32_e64", } } @@ -1916,12 +1982,23 @@ impl VectorAluVop3Op { pub fn semantics(self) -> &'static FormSemantics { &FORMS[match self { Self::AddNcU32 => 84, + Self::MulI32I24 => 85, + Self::MulHiI32I24 => 86, + Self::MulU32U24 => 87, + Self::MulHiU32U24 => 88, + Self::MinI32 => 89, + Self::MaxI32 => 90, + Self::MinU32 => 91, + Self::MaxU32 => 92, + Self::XnorB32 => 93, + Self::SubNcU32 => 94, + Self::SubrevNcU32 => 95, }] } } /// Identity of every registry form and encoding variant, in registry order. -pub const FORM_IDS: [(&str, EncodingFamily); 85] = [ +pub const FORM_IDS: [(&str, EncodingFamily); 96] = [ ("S_ADD_U32", EncodingFamily::Sop2), ("S_SUB_U32", EncodingFamily::Sop2), ("S_ADD_I32", EncodingFamily::Sop2), @@ -2007,10 +2084,21 @@ pub const FORM_IDS: [(&str, EncodingFamily); 85] = [ ("V_CMP_F_U32", EncodingFamily::Vopc), ("V_CMP_T_U32", EncodingFamily::Vopc), ("V_ADD_NC_U32", EncodingFamily::Vop3), + ("V_MUL_I32_I24", EncodingFamily::Vop3), + ("V_MUL_HI_I32_I24", EncodingFamily::Vop3), + ("V_MUL_U32_U24", EncodingFamily::Vop3), + ("V_MUL_HI_U32_U24", EncodingFamily::Vop3), + ("V_MIN_I32", EncodingFamily::Vop3), + ("V_MAX_I32", EncodingFamily::Vop3), + ("V_MIN_U32", EncodingFamily::Vop3), + ("V_MAX_U32", EncodingFamily::Vop3), + ("V_XNOR_B32", EncodingFamily::Vop3), + ("V_SUB_NC_U32", EncodingFamily::Vop3), + ("V_SUBREV_NC_U32", EncodingFamily::Vop3), ]; /// One validated row per registry form, in registry order. -pub static FORMS: [FormSemantics; 85] = [ +pub static FORMS: [FormSemantics; 96] = [ FormSemantics { name: "S_ADD_U32", family: EncodingFamily::Sop2, @@ -3796,4 +3884,235 @@ pub static FORMS: [FormSemantics; 85] = [ spec: &[SpecRef { document: Document::Guide, section: "12.12", page: 167 }, SpecRef { document: Document::Guide, section: "12.7", page: 134 }], verify: &[Evidence::Reference, Evidence::Independent, Evidence::Metal, Evidence::LlvmEncoding], }, + FormSemantics { + name: "V_MUL_I32_I24", + family: EncodingFamily::Vop3, + opcode: 265, + operation: Operation::Multiply24, + signedness: Signedness::Signed, + carry_in: CarryIn::None, + width: 32, + shift_count_bits: 0, + shift_amount: 0, + swap_sources: false, + source_bits: 32, + relation: None, + scc: SccEffect::Unchanged, + vcc: MaskEffect::Unchanged, + exec: MaskEffect::Unchanged, + wave: Wave::Any, + operands: OperandRule::Vop3Vgpr2, + spec: &[SpecRef { document: Document::Guide, section: "12.12", page: 167 }, SpecRef { document: Document::Guide, section: "12.7", page: 131 }], + verify: &[Evidence::Reference, Evidence::Independent, Evidence::Metal, Evidence::LlvmEncoding], + }, + FormSemantics { + name: "V_MUL_HI_I32_I24", + family: EncodingFamily::Vop3, + opcode: 266, + operation: Operation::MultiplyHigh24, + signedness: Signedness::Signed, + carry_in: CarryIn::None, + width: 32, + shift_count_bits: 0, + shift_amount: 0, + swap_sources: false, + source_bits: 32, + relation: None, + scc: SccEffect::Unchanged, + vcc: MaskEffect::Unchanged, + exec: MaskEffect::Unchanged, + wave: Wave::Any, + operands: OperandRule::Vop3Vgpr2, + spec: &[SpecRef { document: Document::Guide, section: "12.12", page: 167 }, SpecRef { document: Document::Guide, section: "12.7", page: 132 }], + verify: &[Evidence::Reference, Evidence::Independent, Evidence::Metal, Evidence::LlvmEncoding], + }, + FormSemantics { + name: "V_MUL_U32_U24", + family: EncodingFamily::Vop3, + opcode: 267, + operation: Operation::Multiply24, + signedness: Signedness::Unsigned, + carry_in: CarryIn::None, + width: 32, + shift_count_bits: 0, + shift_amount: 0, + swap_sources: false, + source_bits: 32, + relation: None, + scc: SccEffect::Unchanged, + vcc: MaskEffect::Unchanged, + exec: MaskEffect::Unchanged, + wave: Wave::Any, + operands: OperandRule::Vop3Vgpr2, + spec: &[SpecRef { document: Document::Guide, section: "12.12", page: 167 }, SpecRef { document: Document::Guide, section: "12.7", page: 132 }], + verify: &[Evidence::Reference, Evidence::Independent, Evidence::Metal, Evidence::LlvmEncoding], + }, + FormSemantics { + name: "V_MUL_HI_U32_U24", + family: EncodingFamily::Vop3, + opcode: 268, + operation: Operation::MultiplyHigh24, + signedness: Signedness::Unsigned, + carry_in: CarryIn::None, + width: 32, + shift_count_bits: 0, + shift_amount: 0, + swap_sources: false, + source_bits: 32, + relation: None, + scc: SccEffect::Unchanged, + vcc: MaskEffect::Unchanged, + exec: MaskEffect::Unchanged, + wave: Wave::Any, + operands: OperandRule::Vop3Vgpr2, + spec: &[SpecRef { document: Document::Guide, section: "12.12", page: 167 }, SpecRef { document: Document::Guide, section: "12.7", page: 132 }], + verify: &[Evidence::Reference, Evidence::Independent, Evidence::Metal, Evidence::LlvmEncoding], + }, + FormSemantics { + name: "V_MIN_I32", + family: EncodingFamily::Vop3, + opcode: 273, + operation: Operation::Minimum, + signedness: Signedness::Signed, + carry_in: CarryIn::None, + width: 32, + shift_count_bits: 0, + shift_amount: 0, + swap_sources: false, + source_bits: 32, + relation: None, + scc: SccEffect::Unchanged, + vcc: MaskEffect::Unchanged, + exec: MaskEffect::Unchanged, + wave: Wave::Any, + operands: OperandRule::Vop3Vgpr2, + spec: &[SpecRef { document: Document::Guide, section: "12.12", page: 167 }, SpecRef { document: Document::Guide, section: "12.7", page: 133 }], + verify: &[Evidence::Reference, Evidence::Independent, Evidence::Metal, Evidence::LlvmEncoding], + }, + FormSemantics { + name: "V_MAX_I32", + family: EncodingFamily::Vop3, + opcode: 274, + operation: Operation::Maximum, + signedness: Signedness::Signed, + carry_in: CarryIn::None, + width: 32, + shift_count_bits: 0, + shift_amount: 0, + swap_sources: false, + source_bits: 32, + relation: None, + scc: SccEffect::Unchanged, + vcc: MaskEffect::Unchanged, + exec: MaskEffect::Unchanged, + wave: Wave::Any, + operands: OperandRule::Vop3Vgpr2, + spec: &[SpecRef { document: Document::Guide, section: "12.12", page: 167 }, SpecRef { document: Document::Guide, section: "12.7", page: 133 }], + verify: &[Evidence::Reference, Evidence::Independent, Evidence::Metal, Evidence::LlvmEncoding], + }, + FormSemantics { + name: "V_MIN_U32", + family: EncodingFamily::Vop3, + opcode: 275, + operation: Operation::Minimum, + signedness: Signedness::Unsigned, + carry_in: CarryIn::None, + width: 32, + shift_count_bits: 0, + shift_amount: 0, + swap_sources: false, + source_bits: 32, + relation: None, + scc: SccEffect::Unchanged, + vcc: MaskEffect::Unchanged, + exec: MaskEffect::Unchanged, + wave: Wave::Any, + operands: OperandRule::Vop3Vgpr2, + spec: &[SpecRef { document: Document::Guide, section: "12.12", page: 167 }, SpecRef { document: Document::Guide, section: "12.7", page: 133 }], + verify: &[Evidence::Reference, Evidence::Independent, Evidence::Metal, Evidence::LlvmEncoding], + }, + FormSemantics { + name: "V_MAX_U32", + family: EncodingFamily::Vop3, + opcode: 276, + operation: Operation::Maximum, + signedness: Signedness::Unsigned, + carry_in: CarryIn::None, + width: 32, + shift_count_bits: 0, + shift_amount: 0, + swap_sources: false, + source_bits: 32, + relation: None, + scc: SccEffect::Unchanged, + vcc: MaskEffect::Unchanged, + exec: MaskEffect::Unchanged, + wave: Wave::Any, + operands: OperandRule::Vop3Vgpr2, + spec: &[SpecRef { document: Document::Guide, section: "12.12", page: 167 }, SpecRef { document: Document::Guide, section: "12.7", page: 133 }], + verify: &[Evidence::Reference, Evidence::Independent, Evidence::Metal, Evidence::LlvmEncoding], + }, + FormSemantics { + name: "V_XNOR_B32", + family: EncodingFamily::Vop3, + opcode: 286, + operation: Operation::Xnor, + signedness: Signedness::Bitwise, + carry_in: CarryIn::None, + width: 32, + shift_count_bits: 0, + shift_amount: 0, + swap_sources: false, + source_bits: 32, + relation: None, + scc: SccEffect::Unchanged, + vcc: MaskEffect::Unchanged, + exec: MaskEffect::Unchanged, + wave: Wave::Any, + operands: OperandRule::Vop3Vgpr2, + spec: &[SpecRef { document: Document::Guide, section: "12.12", page: 167 }, SpecRef { document: Document::Guide, section: "12.7", page: 134 }], + verify: &[Evidence::Reference, Evidence::Independent, Evidence::Metal, Evidence::LlvmEncoding], + }, + FormSemantics { + name: "V_SUB_NC_U32", + family: EncodingFamily::Vop3, + opcode: 294, + operation: Operation::Sub, + signedness: Signedness::Unsigned, + carry_in: CarryIn::None, + width: 32, + shift_count_bits: 0, + shift_amount: 0, + swap_sources: false, + source_bits: 32, + relation: None, + scc: SccEffect::Unchanged, + vcc: MaskEffect::Unchanged, + exec: MaskEffect::Unchanged, + wave: Wave::Any, + operands: OperandRule::Vop3Vgpr2, + spec: &[SpecRef { document: Document::Guide, section: "12.12", page: 167 }, SpecRef { document: Document::Guide, section: "12.7", page: 134 }], + verify: &[Evidence::Reference, Evidence::Independent, Evidence::Metal, Evidence::LlvmEncoding], + }, + FormSemantics { + name: "V_SUBREV_NC_U32", + family: EncodingFamily::Vop3, + opcode: 295, + operation: Operation::Sub, + signedness: Signedness::Unsigned, + carry_in: CarryIn::None, + width: 32, + shift_count_bits: 0, + shift_amount: 0, + swap_sources: true, + source_bits: 32, + relation: None, + scc: SccEffect::Unchanged, + vcc: MaskEffect::Unchanged, + exec: MaskEffect::Unchanged, + wave: Wave::Any, + operands: OperandRule::Vop3Vgpr2, + spec: &[SpecRef { document: Document::Guide, section: "12.12", page: 167 }, SpecRef { document: Document::Guide, section: "12.7", page: 134 }], + verify: &[Evidence::Reference, Evidence::Independent, Evidence::Metal, Evidence::LlvmEncoding], + }, ]; diff --git a/docs/shaders/semantic-coverage.md b/docs/shaders/semantic-coverage.md index d759c409..f4f1d081 100644 --- a/docs/shaders/semantic-coverage.md +++ b/docs/shaders/semantic-coverage.md @@ -32,11 +32,11 @@ acceptance remain outside the verified count. All results concern synthetic fixt | VINTRP | 3 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | | VOP1 | 81 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | | VOP2 | 47 | 20 | 12 | 20 | 20 | 20 | 7 | 7 | 7 | -| VOP3 | 416 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 12 | +| VOP3 | 416 | 1 | 12 | 12 | 1 | 1 | 1 | 1 | 12 | | VOP3P | 29 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | VOP3SDST | 10 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | VOPC | 190 | 16 | 16 | 16 | 16 | 16 | 0 | 0 | 7 | -| **Total** | 1465 | 104 | 85 | 108 | 104 | 104 | 18 | 18 | 56 | +| **Total** | 1465 | 104 | 96 | 119 | 104 | 104 | 18 | 18 | 56 | ## Unsupported operand variants