From b1262674425318eaafc4f4d159b04a0e0e88a4b5 Mon Sep 17 00:00:00 2001
From: Lioncash <mathew1800@gmail.com>
Date: Sat, 5 Dec 2020 00:40:42 -0500
Subject: [PATCH] xbyak_abi: Avoid implicit sign conversions

---
 src/common/x64/xbyak_abi.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/x64/xbyak_abi.h b/src/common/x64/xbyak_abi.h
index 26e4bfda52..f25e968aad 100644
--- a/src/common/x64/xbyak_abi.h
+++ b/src/common/x64/xbyak_abi.h
@@ -11,12 +11,12 @@
 
 namespace Common::X64 {
 
-constexpr std::size_t RegToIndex(const Xbyak::Reg& reg) {
+constexpr size_t RegToIndex(const Xbyak::Reg& reg) {
     using Kind = Xbyak::Reg::Kind;
     ASSERT_MSG((reg.getKind() & (Kind::REG | Kind::XMM)) != 0,
                "RegSet only support GPRs and XMM registers.");
     ASSERT_MSG(reg.getIdx() < 16, "RegSet only supports XXM0-15.");
-    return reg.getIdx() + (reg.getKind() == Kind::REG ? 0 : 16);
+    return static_cast<size_t>(reg.getIdx()) + (reg.getKind() == Kind::REG ? 0 : 16);
 }
 
 constexpr Xbyak::Reg64 IndexToReg64(std::size_t reg_index) {