mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-27 13:53:18 +00:00
shader_recompiler: constant propagation bitwise operations + S_CMPK_EQ_U32 fix (#613)
* rebase on main branch impl of V_LSHL_B64 * remove V_LSHR_B64 * fix S_CMPK_EQ_u32 * fix conflicts * fix broken merge * remove duplicate cases * remove duplicate declaration
This commit is contained in:
parent
990da7edcc
commit
9f4e55a8e7
7 changed files with 29 additions and 4 deletions
|
@ -1115,8 +1115,18 @@ U32U64 IREmitter::ShiftRightArithmetic(const U32U64& base, const U32& shift) {
|
|||
}
|
||||
}
|
||||
|
||||
U32 IREmitter::BitwiseAnd(const U32& a, const U32& b) {
|
||||
return Inst<U32>(Opcode::BitwiseAnd32, a, b);
|
||||
U32U64 IREmitter::BitwiseAnd(const U32U64& a, const U32U64& b) {
|
||||
if (a.Type() != b.Type()) {
|
||||
UNREACHABLE_MSG("Mismatching types {} and {}", a.Type(), b.Type());
|
||||
}
|
||||
switch (a.Type()) {
|
||||
case Type::U32:
|
||||
return Inst<U32>(Opcode::BitwiseAnd32, a, b);
|
||||
case Type::U64:
|
||||
return Inst<U64>(Opcode::BitwiseAnd64, a, b);
|
||||
default:
|
||||
ThrowInvalidType(a.Type());
|
||||
}
|
||||
}
|
||||
|
||||
U32U64 IREmitter::BitwiseOr(const U32U64& a, const U32U64& b) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue