mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 06:15:46 +00:00
shader_decode: Use BitfieldExtract instead of shift + and
This commit is contained in:
parent
26d519c0f6
commit
44fce20a01
8 changed files with 37 additions and 48 deletions
|
@ -28,13 +28,8 @@ u32 ShaderIR::DecodeBfi(BasicBlock& bb, u32 pc) {
|
|||
}
|
||||
}();
|
||||
const Node insert = GetRegister(instr.gpr8);
|
||||
|
||||
const Node offset =
|
||||
Operation(OperationCode::UBitwiseAnd, NO_PRECISE, packed_shift, Immediate(0xff));
|
||||
|
||||
Node bits =
|
||||
Operation(OperationCode::ULogicalShiftRight, NO_PRECISE, packed_shift, Immediate(8));
|
||||
bits = Operation(OperationCode::UBitwiseAnd, NO_PRECISE, bits, Immediate(0xff));
|
||||
const Node offset = BitfieldExtract(packed_shift, 0, 8);
|
||||
const Node bits = BitfieldExtract(packed_shift, 8, 8);
|
||||
|
||||
const Node value =
|
||||
Operation(OperationCode::UBitfieldInsert, PRECISE, base, insert, offset, bits);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue