isa, decoder, shader, ref: the four VOP2 VCC-reading integer forms through the semantic registry (#215)

v_cndmask_b32, v_add_co_ci_u32, v_sub_co_ci_u32 and v_subrev_co_ci_u32
(VOP2 e32, Wave32) read VCC_LO as the per-lane select or carry-in; the
co_ci forms write the carry-out to VCC_LO. An independent guide-derived
oracle, tests/validation/tests/vop2_vcc.rs, checks both CPU interpreters;
its native Metal half is ignored until the lead runs it.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
This commit is contained in:
elforeign committed 2026-11-24 10:06:08 -06:00
1 parent fb0544652b
commit 8e9ec8b9d1
29 files changed
+1156 -128

No files matched your search

+5 -2
View File
@@ -14,8 +14,8 @@ use xenora_isa::{
};
use xenora_isa::meta::EncodingFamily;
pub use xenora_isa::semantics::VectorBinary;
use xenora_isa::semantics::{FORM_IDS, OperandRule};
pub use xenora_isa::semantics::{VectorBinary, VectorLowering, VectorVcc};
/// Metadata forms that [`decode`] turns into an [`Instruction`] for at least one
/// operand combination: the hand-written forms below followed by every form of
@@ -417,7 +417,10 @@ fn decode_gfx1030(bytes: &[u8], offset: usize) -> Result<(Instruction, u8), Deco
let (_, src0, _) = vop2_registers(first, op.assembly_name())?;
(VectorSource::Register(src0), 4)
}
_ => vector_src0(first, bytes, op.assembly_name())?,
OperandRule::Vop2Vgpr | OperandRule::Vop2Vcc => {
vector_src0(first, bytes, op.assembly_name())?
}
_ => unreachable!("non-VOP2 operand rule for VOP2 instruction"),
};
return Ok((
Instruction::VectorAlu {