Skip to content

Commit

Permalink
Merge pull request #2019 from Sonicadvance1/remove_mov
Browse files Browse the repository at this point in the history
IR: Removes Mov IR op
  • Loading branch information
Sonicadvance1 authored Sep 27, 2022
2 parents 01beac4 + 825833c commit 46bde40
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ constexpr OpHandlerArray InterpreterOpHandlers = [] {
// Move ops
REGISTER_OP(EXTRACTELEMENTPAIR, ExtractElementPair);
REGISTER_OP(CREATEELEMENTPAIR, CreateElementPair);
REGISTER_OP(MOV, Mov);

// Vector ops
REGISTER_OP(VECTORZERO, VectorZero);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ DEF_OP(CreateElementPair) {
memcpy(Dst + IROp->ElementSize, Src_Upper, IROp->ElementSize);
}

DEF_OP(Mov) {
auto Op = IROp->C<IR::IROp_Mov>();
const uint8_t OpSize = IROp->Size;

memcpy(GDP, GetSrc<void*>(Data->SSAData, Op->Value), OpSize);
}

#undef DEF_OP

} // namespace FEXCore::CPU
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ class Arm64JITCore final : public CPUBackend, public Arm64Emitter {
///< Move ops
DEF_OP(ExtractElementPair);
DEF_OP(CreateElementPair);
DEF_OP(Mov);

///< Vector ops
DEF_OP(VectorZero);
Expand Down
6 changes: 0 additions & 6 deletions External/FEXCore/Source/Interface/Core/JIT/Arm64/MoveOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,11 @@ DEF_OP(CreateElementPair) {
}
}

DEF_OP(Mov) {
auto Op = IROp->C<IR::IROp_Mov>();
mov(GetReg<RA_64>(Node), GetReg<RA_64>(Op->Value.ID()));
}

#undef DEF_OP
void Arm64JITCore::RegisterMoveHandlers() {
#define REGISTER_OP(op, x) OpHandlers[FEXCore::IR::IROps::OP_##op] = &Arm64JITCore::Op_##x
REGISTER_OP(EXTRACTELEMENTPAIR, ExtractElementPair);
REGISTER_OP(CREATEELEMENTPAIR, CreateElementPair);
REGISTER_OP(MOV, Mov);
#undef REGISTER_OP
}
}
Expand Down
3 changes: 1 addition & 2 deletions External/FEXCore/Source/Interface/Core/JIT/x86_64/JITClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class X86JITCore final : public CPUBackend, public Xbyak::CodeGenerator {
* @brief Current guest RIP entrypoint
*/
uint8_t *GuestEntry{};

using SetCC = void (X86JITCore::*)(const Operand& op);
using CMovCC = void (X86JITCore::*)(const Reg& reg, const Operand& op);
using JCC = void (X86JITCore::*)(const Label& label, LabelType type);
Expand Down Expand Up @@ -366,7 +366,6 @@ class X86JITCore final : public CPUBackend, public Xbyak::CodeGenerator {
///< Move ops
DEF_OP(ExtractElementPair);
DEF_OP(CreateElementPair);
DEF_OP(Mov);

///< Vector ops
DEF_OP(VectorZero);
Expand Down
6 changes: 0 additions & 6 deletions External/FEXCore/Source/Interface/Core/JIT/x86_64/MoveOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,11 @@ DEF_OP(CreateElementPair) {
}
}

DEF_OP(Mov) {
auto Op = IROp->C<IR::IROp_Mov>();
mov (GetDst<RA_64>(Node), GetSrc<RA_64>(Op->Value.ID()));
}

#undef DEF_OP
void X86JITCore::RegisterMoveHandlers() {
#define REGISTER_OP(op, x) OpHandlers[FEXCore::IR::IROps::OP_##op] = &X86JITCore::Op_##x
REGISTER_OP(EXTRACTELEMENTPAIR, ExtractElementPair);
REGISTER_OP(CREATEELEMENTPAIR, CreateElementPair);
REGISTER_OP(MOV, Mov);
#undef REGISTER_OP
}
}
Expand Down
4 changes: 0 additions & 4 deletions External/FEXCore/Source/Interface/IR/IR.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,6 @@
}
},
"Moves": {
"GPR = Mov GPR:$Value": {
"DestSize": "GetOpSize(_Value)"
},

"GPR = ExtractElementPair GPRPair:$Pair, u8:$Element": {
"Desc": ["Extracts a register for the register pair"],
"DestSize": "GetOpSize(_Pair) >> 1"
Expand Down

0 comments on commit 46bde40

Please sign in to comment.