mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-27 01:30:44 +00:00
isa, decoder, shader: translate the sixteen VOPC 64-bit integer compares (#215)
v_cmp_{f,lt,eq,le,gt,ne,ge,t}_{i64,u64}_e32 (opcodes 160-167, 224-231) now
compile for gfx1030: VGPR pairs, even-aligned SGPR pairs and sign-extended
inline integers, writing the Wave32 VCC mask. The 16-bit compares stay
rejected; their native Metal oracle keeps its skip.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
This commit is contained in:
1 parent
fb0544652b
commit
2c8c63cf65
20 files changed
+1387
-132
No files matched your search
@@ -657,7 +657,19 @@ fn vector_compare(
|
||||
bytes: &[u8],
|
||||
) -> Result<(Instruction, u8), DecodeErrorKind> {
|
||||
let src1 = ((first >> 9) & 0xff) as u8;
|
||||
let (src0, len) = vector_src0(first, bytes, op.assembly_name())?;
|
||||
let mnemonic = op.assembly_name();
|
||||
if op.semantics().width == 64 {
|
||||
// Guide §3.6.3 requires even SGPR bases. Reject invalid selectors
|
||||
// before reading a literal word or considering the execution mask.
|
||||
let source = first & 0x1ff;
|
||||
if src1 == 255
|
||||
|| !matches!(source, 0..=104 | 128..=208 | 256..=510)
|
||||
|| (source <= 104 && !source.is_multiple_of(2))
|
||||
{
|
||||
return Err(unsupported(mnemonic, "invalid 64-bit compare source"));
|
||||
}
|
||||
}
|
||||
let (src0, len) = vector_src0(first, bytes, mnemonic)?;
|
||||
Ok((Instruction::VectorCompare { op, src0, src1 }, len))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user