Skip to content

Commit

Permalink
JIT: always use 64-bit moves for SRA
Browse files Browse the repository at this point in the history
I see no reason not to. Simpler code and it's slightly faster on Firestorm.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
  • Loading branch information
alyssarosenzweig committed Sep 8, 2024
1 parent 1c59bfe commit 67c751d
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions FEXCore/Source/Interface/Core/JIT/Arm64/MemoryOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,7 @@ DEF_OP(LoadRegister) {
const auto reg = StaticRegisters[Op->Reg];

if (GetReg(Node).Idx() != reg.Idx()) {
if (OpSize == 4) {
mov(GetReg(Node).W(), reg.W());
} else {
mov(GetReg(Node).X(), reg.X());
}
mov(GetReg(Node).X(), reg.X());
}
} else if (Op->Class == IR::FPRClass) {
[[maybe_unused]] const auto regSize = HostSupportsAVX256 ? Core::CPUState::XMM_AVX_REG_SIZE : Core::CPUState::XMM_SSE_REG_SIZE;
Expand All @@ -170,23 +166,15 @@ DEF_OP(LoadPF) {
const auto reg = StaticRegisters[StaticRegisters.size() - 2];

if (GetReg(Node).Idx() != reg.Idx()) {
if (IROp->Size == 4) {
mov(GetReg(Node).W(), reg.W());
} else {
mov(GetReg(Node).X(), reg.X());
}
mov(GetReg(Node).X(), reg.X());
}
}

DEF_OP(LoadAF) {
const auto reg = StaticRegisters[StaticRegisters.size() - 1];

if (GetReg(Node).Idx() != reg.Idx()) {
if (IROp->Size == 4) {
mov(GetReg(Node).W(), reg.W());
} else {
mov(GetReg(Node).X(), reg.X());
}
mov(GetReg(Node).X(), reg.X());
}
}

Expand Down

0 comments on commit 67c751d

Please sign in to comment.