From 922db9d8ee74b2b92f01fb80ff244107411e65e2 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 13 Oct 2020 21:13:30 +1000 Subject: [PATCH] dep/vixl: Compile fixes for MSVC --- dep/vixl/include/vixl/invalset-vixl.h | 4 ++-- dep/vixl/include/vixl/utils-vixl.h | 6 +++--- dep/vixl/src/aarch64/disasm-aarch64.cc | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dep/vixl/include/vixl/invalset-vixl.h b/dep/vixl/include/vixl/invalset-vixl.h index 9f9425b34..94cc1aac2 100644 --- a/dep/vixl/include/vixl/invalset-vixl.h +++ b/dep/vixl/include/vixl/invalset-vixl.h @@ -244,8 +244,8 @@ class InvalSet { template -class InvalSetIterator : public std::iterator { +class InvalSetIterator/* : public std::iterator */{ private: // Redefine types to mirror the associated set types. typedef typename S::_ElementType ElementType; diff --git a/dep/vixl/include/vixl/utils-vixl.h b/dep/vixl/include/vixl/utils-vixl.h index 1c76fcb28..dac31d1a6 100644 --- a/dep/vixl/include/vixl/utils-vixl.h +++ b/dep/vixl/include/vixl/utils-vixl.h @@ -447,7 +447,7 @@ inline float FusedMultiplyAdd(float op1, float op2, float a) { } -inline uint64_t LowestSetBit(uint64_t value) { return value & -value; } +inline uint64_t LowestSetBit(uint64_t value) { return value & static_cast(-static_cast(value)); } template @@ -801,7 +801,7 @@ class Uint32 { } int32_t GetSigned() const { return data_; } Uint32 operator~() const { return Uint32(~data_); } - Uint32 operator-() const { return Uint32(-data_); } + Uint32 operator-() const { return Uint32(static_cast(-static_cast(data_))); } bool operator==(Uint32 value) const { return data_ == value.data_; } bool operator!=(Uint32 value) const { return data_ != value.data_; } bool operator>(Uint32 value) const { return data_ > value.data_; } @@ -869,7 +869,7 @@ class Uint64 { Uint32 GetHigh32() const { return Uint32(data_ >> 32); } Uint32 GetLow32() const { return Uint32(data_ & 0xffffffff); } Uint64 operator~() const { return Uint64(~data_); } - Uint64 operator-() const { return Uint64(-data_); } + Uint64 operator-() const { return Uint64(static_cast(-static_cast(data_))); } bool operator==(Uint64 value) const { return data_ == value.data_; } bool operator!=(Uint64 value) const { return data_ != value.data_; } Uint64 operator+(Uint64 value) const { return Uint64(data_ + value.data_); } diff --git a/dep/vixl/src/aarch64/disasm-aarch64.cc b/dep/vixl/src/aarch64/disasm-aarch64.cc index 1c00443dd..c3d012d52 100644 --- a/dep/vixl/src/aarch64/disasm-aarch64.cc +++ b/dep/vixl/src/aarch64/disasm-aarch64.cc @@ -4766,7 +4766,7 @@ void Disassembler::AppendPCRelativeOffsetToOutput(const Instruction *instr, USE(instr); if (offset < 0) { // Cast to uint64_t so that INT64_MIN is handled in a well-defined way. - uint64_t abs_offset = -static_cast(offset); + uint64_t abs_offset = static_cast(-offset); AppendToOutput("#-0x%" PRIx64, abs_offset); } else { AppendToOutput("#+0x%" PRIx64, offset);