mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 07:00:43 +02:00
Merge pull request #3084 from Sonicadvance1/optimize_bswap
OpcodeDispatcher: Optimize 32-bit bswap
This commit is contained in:
2 files changed
+4
-5
No files matched your search
@@ -4337,7 +4337,7 @@ void OpDispatchBuilder::BSWAPOp(OpcodeArgs) {
|
|||||||
Dest = _Constant(0);
|
Dest = _Constant(0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Dest = LoadSource(GPRClass, Op, Op->Dest, Op->Flags, -1);
|
Dest = LoadSource_WithOpSize(GPRClass, Op, Op->Dest, CTX->GetGPRSize(), Op->Flags, -1);
|
||||||
Dest = _Rev(IR::SizeToOpSize(Size), Dest);
|
Dest = _Rev(IR::SizeToOpSize(Size), Dest);
|
||||||
}
|
}
|
||||||
StoreResult(GPRClass, Op, Dest, -1);
|
StoreResult(GPRClass, Op, Dest, -1);
|
||||||
|
|||||||
@@ -3705,12 +3705,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"bswap eax": {
|
"bswap eax": {
|
||||||
"ExpectedInstructionCount": 2,
|
"ExpectedInstructionCount": 1,
|
||||||
"Optimal": "No",
|
"Optimal": "Yes",
|
||||||
"Comment": "0x0f 0xc8",
|
"Comment": "0x0f 0xc8",
|
||||||
"ExpectedArm64ASM": [
|
"ExpectedArm64ASM": [
|
||||||
"lsr w20, w4, #0",
|
"rev w4, w4"
|
||||||
"rev w4, w20"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"bswap rax": {
|
"bswap rax": {
|
||||||
|
|||||||
Reference in new issue
Block a user