diff options
| author | 2020-12-05 00:40:42 -0500 | |
|---|---|---|
| committer | 2020-12-05 00:43:41 -0500 | |
| commit | b1262674425318eaafc4f4d159b04a0e0e88a4b5 (patch) | |
| tree | 831e7f75cb00e0e1fed05c42a5bf0422f288efd7 /src | |
| parent | Merge pull request #5126 from lioncash/deprecated (diff) | |
| download | yuzu-b1262674425318eaafc4f4d159b04a0e0e88a4b5.tar.gz yuzu-b1262674425318eaafc4f4d159b04a0e0e88a4b5.tar.xz yuzu-b1262674425318eaafc4f4d159b04a0e0e88a4b5.zip | |
xbyak_abi: Avoid implicit sign conversions
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/x64/xbyak_abi.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/x64/xbyak_abi.h b/src/common/x64/xbyak_abi.h index 26e4bfda5..f25e968aa 100644 --- a/src/common/x64/xbyak_abi.h +++ b/src/common/x64/xbyak_abi.h | |||
| @@ -11,12 +11,12 @@ | |||
| 11 | 11 | ||
| 12 | namespace Common::X64 { | 12 | namespace Common::X64 { |
| 13 | 13 | ||
| 14 | constexpr std::size_t RegToIndex(const Xbyak::Reg& reg) { | 14 | constexpr size_t RegToIndex(const Xbyak::Reg& reg) { |
| 15 | using Kind = Xbyak::Reg::Kind; | 15 | using Kind = Xbyak::Reg::Kind; |
| 16 | ASSERT_MSG((reg.getKind() & (Kind::REG | Kind::XMM)) != 0, | 16 | ASSERT_MSG((reg.getKind() & (Kind::REG | Kind::XMM)) != 0, |
| 17 | "RegSet only support GPRs and XMM registers."); | 17 | "RegSet only support GPRs and XMM registers."); |
| 18 | ASSERT_MSG(reg.getIdx() < 16, "RegSet only supports XXM0-15."); | 18 | ASSERT_MSG(reg.getIdx() < 16, "RegSet only supports XXM0-15."); |
| 19 | return reg.getIdx() + (reg.getKind() == Kind::REG ? 0 : 16); | 19 | return static_cast<size_t>(reg.getIdx()) + (reg.getKind() == Kind::REG ? 0 : 16); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | constexpr Xbyak::Reg64 IndexToReg64(std::size_t reg_index) { | 22 | constexpr Xbyak::Reg64 IndexToReg64(std::size_t reg_index) { |