mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-26 04:16:18 +00:00
shader_recompiler: Implement S_BCNT1_I32_B64 and S_FF1_I32_B64 (#1889)
* shader_recompiler: Implement S_BCNT1_I32_B64 * shader_recompiler: Implement S_FF1_I32_B64 * shader_recompiler: Implement IEqual for 64-bit. * shader_recompiler: Fix immediate type in S_FF1_I32_B32
This commit is contained in:
parent
1c5947d93b
commit
b1f74660df
9 changed files with 68 additions and 12 deletions
|
@ -1273,8 +1273,15 @@ U32 IREmitter::BitReverse(const U32& value) {
|
|||
return Inst<U32>(Opcode::BitReverse32, value);
|
||||
}
|
||||
|
||||
U32 IREmitter::BitCount(const U32& value) {
|
||||
return Inst<U32>(Opcode::BitCount32, value);
|
||||
U32 IREmitter::BitCount(const U32U64& value) {
|
||||
switch (value.Type()) {
|
||||
case Type::U32:
|
||||
return Inst<U32>(Opcode::BitCount32, value);
|
||||
case Type::U64:
|
||||
return Inst<U32>(Opcode::BitCount64, value);
|
||||
default:
|
||||
ThrowInvalidType(value.Type());
|
||||
}
|
||||
}
|
||||
|
||||
U32 IREmitter::BitwiseNot(const U32& value) {
|
||||
|
@ -1289,8 +1296,15 @@ U32 IREmitter::FindUMsb(const U32& value) {
|
|||
return Inst<U32>(Opcode::FindUMsb32, value);
|
||||
}
|
||||
|
||||
U32 IREmitter::FindILsb(const U32& value) {
|
||||
return Inst<U32>(Opcode::FindILsb32, value);
|
||||
U32 IREmitter::FindILsb(const U32U64& value) {
|
||||
switch (value.Type()) {
|
||||
case Type::U32:
|
||||
return Inst<U32>(Opcode::FindILsb32, value);
|
||||
case Type::U64:
|
||||
return Inst<U32>(Opcode::FindILsb64, value);
|
||||
default:
|
||||
ThrowInvalidType(value.Type());
|
||||
}
|
||||
}
|
||||
|
||||
U32 IREmitter::SMin(const U32& a, const U32& b) {
|
||||
|
@ -1345,7 +1359,9 @@ U1 IREmitter::IEqual(const U32U64& lhs, const U32U64& rhs) {
|
|||
}
|
||||
switch (lhs.Type()) {
|
||||
case Type::U32:
|
||||
return Inst<U1>(Opcode::IEqual, lhs, rhs);
|
||||
return Inst<U1>(Opcode::IEqual32, lhs, rhs);
|
||||
case Type::U64:
|
||||
return Inst<U1>(Opcode::IEqual64, lhs, rhs);
|
||||
default:
|
||||
ThrowInvalidType(lhs.Type());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue