dep/vixl: Compile fixes for MSVC

This commit is contained in:
Connor McLaughlin 2020-10-13 21:13:30 +10:00
parent b76859a8c2
commit 922db9d8ee
3 changed files with 6 additions and 6 deletions

View file

@ -244,8 +244,8 @@ class InvalSet {
template <class S> template <class S>
class InvalSetIterator : public std::iterator<std::forward_iterator_tag, class InvalSetIterator/* : public std::iterator<std::forward_iterator_tag,
typename S::_ElementType> { typename S::_ElementType> */{
private: private:
// Redefine types to mirror the associated set types. // Redefine types to mirror the associated set types.
typedef typename S::_ElementType ElementType; typedef typename S::_ElementType ElementType;

View file

@ -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<uint64_t>(-static_cast<int64_t>(value)); }
template <typename T> template <typename T>
@ -801,7 +801,7 @@ class Uint32 {
} }
int32_t GetSigned() const { return data_; } int32_t GetSigned() const { return data_; }
Uint32 operator~() const { return Uint32(~data_); } Uint32 operator~() const { return Uint32(~data_); }
Uint32 operator-() const { return Uint32(-data_); } Uint32 operator-() const { return Uint32(static_cast<uint32_t>(-static_cast<int32_t>(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_; } 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 GetHigh32() const { return Uint32(data_ >> 32); }
Uint32 GetLow32() const { return Uint32(data_ & 0xffffffff); } Uint32 GetLow32() const { return Uint32(data_ & 0xffffffff); }
Uint64 operator~() const { return Uint64(~data_); } Uint64 operator~() const { return Uint64(~data_); }
Uint64 operator-() const { return Uint64(-data_); } Uint64 operator-() const { return Uint64(static_cast<uint64_t>(-static_cast<int64_t>(data_))); }
bool operator==(Uint64 value) const { return data_ == value.data_; } bool operator==(Uint64 value) const { return data_ == value.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_); } Uint64 operator+(Uint64 value) const { return Uint64(data_ + value.data_); }

View file

@ -4766,7 +4766,7 @@ void Disassembler::AppendPCRelativeOffsetToOutput(const Instruction *instr,
USE(instr); USE(instr);
if (offset < 0) { if (offset < 0) {
// Cast to uint64_t so that INT64_MIN is handled in a well-defined way. // Cast to uint64_t so that INT64_MIN is handled in a well-defined way.
uint64_t abs_offset = -static_cast<uint64_t>(offset); uint64_t abs_offset = static_cast<uint64_t>(-offset);
AppendToOutput("#-0x%" PRIx64, abs_offset); AppendToOutput("#-0x%" PRIx64, abs_offset);
} else { } else {
AppendToOutput("#+0x%" PRIx64, offset); AppendToOutput("#+0x%" PRIx64, offset);