mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-19 12:52:25 +00:00
Optimize CDQOp
This commit is contained in:
parent
ca31a0404c
commit
027fbbf051
@ -1395,11 +1395,12 @@ void OpDispatchBuilder::XCHGOp(OpcodeArgs) {
|
||||
}
|
||||
|
||||
void OpDispatchBuilder::CDQOp(OpcodeArgs) {
|
||||
OrderedNode *Src = LoadSource(GPRClass, Op, Op->Src[0], Op->Flags);
|
||||
uint8_t DstSize = GetDstSize(Op);
|
||||
uint8_t SrcSize = DstSize >> 1;
|
||||
OrderedNode *Src = LoadGPRRegister(X86State::REG_RAX, SrcSize, 0, true);
|
||||
|
||||
Src = _Sbfe(OpSize::i64Bit, SrcSize * 8, 0, Src);
|
||||
Src = _Sbfe(DstSize <= 4 ? OpSize::i32Bit : OpSize::i64Bit, SrcSize * 8, 0,
|
||||
Src);
|
||||
|
||||
StoreResult_WithOpSize(GPRClass, Op, Op->Dest, Src, DstSize, -1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user