Skip to content

Commit

Permalink
Merge pull request #1369 from lioncash/cast
Browse files Browse the repository at this point in the history
OpcodeDispatcher: Amend return types of BitSize helpers
  • Loading branch information
Sonicadvance1 authored Nov 17, 2021
2 parents 977d92b + 44f27c8 commit c63c5fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4466,11 +4466,11 @@ uint8_t OpDispatchBuilder::GetSrcSize(X86Tables::DecodedOp Op) const {
return Size;
}

uint8_t OpDispatchBuilder::GetSrcBitSize(X86Tables::DecodedOp Op) const {
uint32_t OpDispatchBuilder::GetSrcBitSize(X86Tables::DecodedOp Op) const {
return GetSrcSize(Op) * 8;
}

uint8_t OpDispatchBuilder::GetDstBitSize(X86Tables::DecodedOp Op) const {
uint32_t OpDispatchBuilder::GetDstBitSize(X86Tables::DecodedOp Op) const {
return GetDstSize(Op) * 8;
}

Expand Down
10 changes: 5 additions & 5 deletions External/FEXCore/Source/Interface/Core/OpcodeDispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -521,17 +521,17 @@ enum class SelectionFlag {

[[nodiscard]] static uint32_t GPROffset(X86State::X86Reg reg) {
LOGMAN_THROW_A_FMT(reg <= X86State::X86Reg::REG_R15, "Invalid reg used");
return static_cast<uint8_t>(offsetof(Core::CPUState, gregs[static_cast<size_t>(reg)]));
return static_cast<uint32_t>(offsetof(Core::CPUState, gregs[static_cast<size_t>(reg)]));
}

[[nodiscard]] static uint32_t MMBaseOffset() {
return static_cast<uint32_t>(offsetof(Core::CPUState, mm[0][0]));
}

uint8_t GetDstSize(X86Tables::DecodedOp Op) const;
uint8_t GetSrcSize(X86Tables::DecodedOp Op) const;
uint8_t GetDstBitSize(X86Tables::DecodedOp Op) const;
uint8_t GetSrcBitSize(X86Tables::DecodedOp Op) const;
[[nodiscard]] uint8_t GetDstSize(X86Tables::DecodedOp Op) const;
[[nodiscard]] uint8_t GetSrcSize(X86Tables::DecodedOp Op) const;
[[nodiscard]] uint32_t GetDstBitSize(X86Tables::DecodedOp Op) const;
[[nodiscard]] uint32_t GetSrcBitSize(X86Tables::DecodedOp Op) const;

template<unsigned BitOffset>
void SetRFLAG(OrderedNode *Value) {
Expand Down

0 comments on commit c63c5fb

Please sign in to comment.