mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-04-19 10:51:18 +00:00
Use __builtin_clz instead of __lzcnt32 for cntlzw instruction.
This commit is contained in:
parent
3280a7cf9f
commit
73b75e197a
@ -688,11 +688,11 @@ bool Recompiler::Recompile(
|
||||
break;
|
||||
|
||||
case PPC_INST_CNTLZD:
|
||||
println("\t{}.u64 = __lzcnt64({}.u64);", r(insn.operands[0]), r(insn.operands[1]));
|
||||
println("\t{0}.u64 = {1}.u64 == 0 ? 64 : __builtin_clzll({1}.u64);", r(insn.operands[0]), r(insn.operands[1]));
|
||||
break;
|
||||
|
||||
case PPC_INST_CNTLZW:
|
||||
println("\t{}.u64 = __lzcnt32({}.u32);", r(insn.operands[0]), r(insn.operands[1]));
|
||||
println("\t{0}.u64 = {1}.u32 == 0 ? 32 : __builtin_clz({1}.u32);", r(insn.operands[0]), r(insn.operands[1]));
|
||||
break;
|
||||
|
||||
case PPC_INST_DB16CYC:
|
||||
|
Loading…
x
Reference in New Issue
Block a user