Skip to content

Commit

Permalink
OpcodeDispatcher: Assert on invalid size to LoadRegCachePair
Browse files Browse the repository at this point in the history
Coverity scan
  • Loading branch information
Sonicadvance1 committed Jan 3, 2025
1 parent 0beb71d commit afb92ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion FEXCore/Source/Interface/Core/JIT/JIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ CPUBackend::CompiledCode Arm64JITCore::CompileCode(uint64_t Entry, uint64_t Size
const auto ID = IR->GetID(CodeNode);
switch (IROp->Op) {
#define REGISTER_OP_RT(op, x) \
case FEXCore::IR::IROps::OP_##op: std::invoke(RT_##x, this, IROp, ID); break
case FEXCore::IR::IROps::OP_##op: (this->*RT_##x)(IROp, ID); break
#define REGISTER_OP(op, x) \
case FEXCore::IR::IROps::OP_##op: Op_##x(IROp, ID); break

Expand Down
1 change: 1 addition & 0 deletions FEXCore/Source/Interface/Core/OpcodeDispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -1948,6 +1948,7 @@ class OpDispatchBuilder final : public IREmitter {

RefPair LoadRegCachePair(uint64_t Offset, uint8_t Index, RegisterClassType RegClass, IR::OpSize Size) {
LOGMAN_THROW_AA_FMT(Index != DFIndex, "must be pairable");
LOGMAN_THROW_AA_FMT(Size != IR::OpSize::iUnsized, "Invalid size!");

// Try to load a pair into the cache
uint64_t Bits = (3ull << (uint64_t)Index);
Expand Down

0 comments on commit afb92ff

Please sign in to comment.