Commit 29f73ad1 authored by jacob.bramley's avatar jacob.bramley Committed by Commit bot

[arm64] Fix some signed/unsigned type inconsistencies.

This fixes several warnings when cross-building using GCC (since r31087,
5cf1c0bc).

In particular, CPURegister::code() now returns 'int', matching the other
platforms (and the coding style guide). The rest of the patch consists
of similar changes to make this work.

BUG=

Review URL: https://codereview.chromium.org/1393043003

Cr-Commit-Position: refs/heads/master@{#31176}
parent 93e93983
...@@ -41,7 +41,7 @@ void RelocInfo::set_target_address(Address target, ...@@ -41,7 +41,7 @@ void RelocInfo::set_target_address(Address target,
} }
inline unsigned CPURegister::code() const { inline int CPURegister::code() const {
DCHECK(IsValid()); DCHECK(IsValid());
return reg_code; return reg_code;
} }
...@@ -54,12 +54,12 @@ inline CPURegister::RegisterType CPURegister::type() const { ...@@ -54,12 +54,12 @@ inline CPURegister::RegisterType CPURegister::type() const {
inline RegList CPURegister::Bit() const { inline RegList CPURegister::Bit() const {
DCHECK(reg_code < (sizeof(RegList) * kBitsPerByte)); DCHECK(static_cast<size_t>(reg_code) < (sizeof(RegList) * kBitsPerByte));
return IsValid() ? 1UL << reg_code : 0; return IsValid() ? 1UL << reg_code : 0;
} }
inline unsigned CPURegister::SizeInBits() const { inline int CPURegister::SizeInBits() const {
DCHECK(IsValid()); DCHECK(IsValid());
return reg_size; return reg_size;
} }
......
...@@ -110,17 +110,17 @@ void CPURegList::RemoveCalleeSaved() { ...@@ -110,17 +110,17 @@ void CPURegList::RemoveCalleeSaved() {
} }
CPURegList CPURegList::GetCalleeSaved(unsigned size) { CPURegList CPURegList::GetCalleeSaved(int size) {
return CPURegList(CPURegister::kRegister, size, 19, 29); return CPURegList(CPURegister::kRegister, size, 19, 29);
} }
CPURegList CPURegList::GetCalleeSavedFP(unsigned size) { CPURegList CPURegList::GetCalleeSavedFP(int size) {
return CPURegList(CPURegister::kFPRegister, size, 8, 15); return CPURegList(CPURegister::kFPRegister, size, 8, 15);
} }
CPURegList CPURegList::GetCallerSaved(unsigned size) { CPURegList CPURegList::GetCallerSaved(int size) {
// Registers x0-x18 and lr (x30) are caller-saved. // Registers x0-x18 and lr (x30) are caller-saved.
CPURegList list = CPURegList(CPURegister::kRegister, size, 0, 18); CPURegList list = CPURegList(CPURegister::kRegister, size, 0, 18);
list.Combine(lr); list.Combine(lr);
...@@ -128,7 +128,7 @@ CPURegList CPURegList::GetCallerSaved(unsigned size) { ...@@ -128,7 +128,7 @@ CPURegList CPURegList::GetCallerSaved(unsigned size) {
} }
CPURegList CPURegList::GetCallerSavedFP(unsigned size) { CPURegList CPURegList::GetCallerSavedFP(int size) {
// Registers d0-d7 and d16-d31 are caller-saved. // Registers d0-d7 and d16-d31 are caller-saved.
CPURegList list = CPURegList(CPURegister::kFPRegister, size, 0, 7); CPURegList list = CPURegList(CPURegister::kFPRegister, size, 0, 7);
list.Combine(CPURegList(CPURegister::kFPRegister, size, 16, 31)); list.Combine(CPURegList(CPURegister::kFPRegister, size, 16, 31));
...@@ -1278,10 +1278,8 @@ void Assembler::rorv(const Register& rd, ...@@ -1278,10 +1278,8 @@ void Assembler::rorv(const Register& rd,
// Bitfield operations. // Bitfield operations.
void Assembler::bfm(const Register& rd, void Assembler::bfm(const Register& rd, const Register& rn, int immr,
const Register& rn, int imms) {
unsigned immr,
unsigned imms) {
DCHECK(rd.SizeInBits() == rn.SizeInBits()); DCHECK(rd.SizeInBits() == rn.SizeInBits());
Instr N = SF(rd) >> (kSFOffset - kBitfieldNOffset); Instr N = SF(rd) >> (kSFOffset - kBitfieldNOffset);
Emit(SF(rd) | BFM | N | Emit(SF(rd) | BFM | N |
...@@ -1291,10 +1289,8 @@ void Assembler::bfm(const Register& rd, ...@@ -1291,10 +1289,8 @@ void Assembler::bfm(const Register& rd,
} }
void Assembler::sbfm(const Register& rd, void Assembler::sbfm(const Register& rd, const Register& rn, int immr,
const Register& rn, int imms) {
unsigned immr,
unsigned imms) {
DCHECK(rd.Is64Bits() || rn.Is32Bits()); DCHECK(rd.Is64Bits() || rn.Is32Bits());
Instr N = SF(rd) >> (kSFOffset - kBitfieldNOffset); Instr N = SF(rd) >> (kSFOffset - kBitfieldNOffset);
Emit(SF(rd) | SBFM | N | Emit(SF(rd) | SBFM | N |
...@@ -1304,10 +1300,8 @@ void Assembler::sbfm(const Register& rd, ...@@ -1304,10 +1300,8 @@ void Assembler::sbfm(const Register& rd,
} }
void Assembler::ubfm(const Register& rd, void Assembler::ubfm(const Register& rd, const Register& rn, int immr,
const Register& rn, int imms) {
unsigned immr,
unsigned imms) {
DCHECK(rd.SizeInBits() == rn.SizeInBits()); DCHECK(rd.SizeInBits() == rn.SizeInBits());
Instr N = SF(rd) >> (kSFOffset - kBitfieldNOffset); Instr N = SF(rd) >> (kSFOffset - kBitfieldNOffset);
Emit(SF(rd) | UBFM | N | Emit(SF(rd) | UBFM | N |
...@@ -1317,10 +1311,8 @@ void Assembler::ubfm(const Register& rd, ...@@ -1317,10 +1311,8 @@ void Assembler::ubfm(const Register& rd,
} }
void Assembler::extr(const Register& rd, void Assembler::extr(const Register& rd, const Register& rn, const Register& rm,
const Register& rn, int lsb) {
const Register& rm,
unsigned lsb) {
DCHECK(rd.SizeInBits() == rn.SizeInBits()); DCHECK(rd.SizeInBits() == rn.SizeInBits());
DCHECK(rd.SizeInBits() == rm.SizeInBits()); DCHECK(rd.SizeInBits() == rm.SizeInBits());
Instr N = SF(rd) >> (kSFOffset - kBitfieldNOffset); Instr N = SF(rd) >> (kSFOffset - kBitfieldNOffset);
......
...@@ -80,15 +80,15 @@ struct CPURegister { ...@@ -80,15 +80,15 @@ struct CPURegister {
kNoRegister kNoRegister
}; };
static CPURegister Create(unsigned code, unsigned size, RegisterType type) { static CPURegister Create(int code, int size, RegisterType type) {
CPURegister r = {code, size, type}; CPURegister r = {code, size, type};
return r; return r;
} }
unsigned code() const; int code() const;
RegisterType type() const; RegisterType type() const;
RegList Bit() const; RegList Bit() const;
unsigned SizeInBits() const; int SizeInBits() const;
int SizeInBytes() const; int SizeInBytes() const;
bool Is32Bits() const; bool Is32Bits() const;
bool Is64Bits() const; bool Is64Bits() const;
...@@ -117,14 +117,14 @@ struct CPURegister { ...@@ -117,14 +117,14 @@ struct CPURegister {
bool is(const CPURegister& other) const { return Is(other); } bool is(const CPURegister& other) const { return Is(other); }
bool is_valid() const { return IsValid(); } bool is_valid() const { return IsValid(); }
unsigned reg_code; int reg_code;
unsigned reg_size; int reg_size;
RegisterType reg_type; RegisterType reg_type;
}; };
struct Register : public CPURegister { struct Register : public CPURegister {
static Register Create(unsigned code, unsigned size) { static Register Create(int code, int size) {
return Register(CPURegister::Create(code, size, CPURegister::kRegister)); return Register(CPURegister::Create(code, size, CPURegister::kRegister));
} }
...@@ -199,7 +199,7 @@ struct FPRegister : public CPURegister { ...@@ -199,7 +199,7 @@ struct FPRegister : public CPURegister {
kCode_no_reg = -1 kCode_no_reg = -1
}; };
static FPRegister Create(unsigned code, unsigned size) { static FPRegister Create(int code, int size) {
return FPRegister( return FPRegister(
CPURegister::Create(code, size, CPURegister::kFPRegister)); CPURegister::Create(code, size, CPURegister::kFPRegister));
} }
...@@ -384,13 +384,13 @@ class CPURegList { ...@@ -384,13 +384,13 @@ class CPURegList {
DCHECK(IsValid()); DCHECK(IsValid());
} }
CPURegList(CPURegister::RegisterType type, unsigned size, RegList list) CPURegList(CPURegister::RegisterType type, int size, RegList list)
: list_(list), size_(size), type_(type) { : list_(list), size_(size), type_(type) {
DCHECK(IsValid()); DCHECK(IsValid());
} }
CPURegList(CPURegister::RegisterType type, unsigned size, CPURegList(CPURegister::RegisterType type, int size, int first_reg,
unsigned first_reg, unsigned last_reg) int last_reg)
: size_(size), type_(type) { : size_(size), type_(type) {
DCHECK(((type == CPURegister::kRegister) && DCHECK(((type == CPURegister::kRegister) &&
(last_reg < kNumberOfRegisters)) || (last_reg < kNumberOfRegisters)) ||
...@@ -447,12 +447,12 @@ class CPURegList { ...@@ -447,12 +447,12 @@ class CPURegList {
CPURegister PopHighestIndex(); CPURegister PopHighestIndex();
// AAPCS64 callee-saved registers. // AAPCS64 callee-saved registers.
static CPURegList GetCalleeSaved(unsigned size = kXRegSizeInBits); static CPURegList GetCalleeSaved(int size = kXRegSizeInBits);
static CPURegList GetCalleeSavedFP(unsigned size = kDRegSizeInBits); static CPURegList GetCalleeSavedFP(int size = kDRegSizeInBits);
// AAPCS64 caller-saved registers. Note that this includes lr. // AAPCS64 caller-saved registers. Note that this includes lr.
static CPURegList GetCallerSaved(unsigned size = kXRegSizeInBits); static CPURegList GetCallerSaved(int size = kXRegSizeInBits);
static CPURegList GetCallerSavedFP(unsigned size = kDRegSizeInBits); static CPURegList GetCallerSavedFP(int size = kDRegSizeInBits);
// Registers saved as safepoints. // Registers saved as safepoints.
static CPURegList GetSafepointSavedRegisters(); static CPURegList GetSafepointSavedRegisters();
...@@ -480,25 +480,25 @@ class CPURegList { ...@@ -480,25 +480,25 @@ class CPURegList {
return CountSetBits(list_, kRegListSizeInBits); return CountSetBits(list_, kRegListSizeInBits);
} }
unsigned RegisterSizeInBits() const { int RegisterSizeInBits() const {
DCHECK(IsValid()); DCHECK(IsValid());
return size_; return size_;
} }
unsigned RegisterSizeInBytes() const { int RegisterSizeInBytes() const {
int size_in_bits = RegisterSizeInBits(); int size_in_bits = RegisterSizeInBits();
DCHECK((size_in_bits % kBitsPerByte) == 0); DCHECK((size_in_bits % kBitsPerByte) == 0);
return size_in_bits / kBitsPerByte; return size_in_bits / kBitsPerByte;
} }
unsigned TotalSizeInBytes() const { int TotalSizeInBytes() const {
DCHECK(IsValid()); DCHECK(IsValid());
return RegisterSizeInBytes() * Count(); return RegisterSizeInBytes() * Count();
} }
private: private:
RegList list_; RegList list_;
unsigned size_; int size_;
CPURegister::RegisterType type_; CPURegister::RegisterType type_;
bool IsValid() const { bool IsValid() const {
...@@ -1120,39 +1120,24 @@ class Assembler : public AssemblerBase { ...@@ -1120,39 +1120,24 @@ class Assembler : public AssemblerBase {
// Bitfield instructions. // Bitfield instructions.
// Bitfield move. // Bitfield move.
void bfm(const Register& rd, void bfm(const Register& rd, const Register& rn, int immr, int imms);
const Register& rn,
unsigned immr,
unsigned imms);
// Signed bitfield move. // Signed bitfield move.
void sbfm(const Register& rd, void sbfm(const Register& rd, const Register& rn, int immr, int imms);
const Register& rn,
unsigned immr,
unsigned imms);
// Unsigned bitfield move. // Unsigned bitfield move.
void ubfm(const Register& rd, void ubfm(const Register& rd, const Register& rn, int immr, int imms);
const Register& rn,
unsigned immr,
unsigned imms);
// Bfm aliases. // Bfm aliases.
// Bitfield insert. // Bitfield insert.
void bfi(const Register& rd, void bfi(const Register& rd, const Register& rn, int lsb, int width) {
const Register& rn,
unsigned lsb,
unsigned width) {
DCHECK(width >= 1); DCHECK(width >= 1);
DCHECK(lsb + width <= rn.SizeInBits()); DCHECK(lsb + width <= rn.SizeInBits());
bfm(rd, rn, (rd.SizeInBits() - lsb) & (rd.SizeInBits() - 1), width - 1); bfm(rd, rn, (rd.SizeInBits() - lsb) & (rd.SizeInBits() - 1), width - 1);
} }
// Bitfield extract and insert low. // Bitfield extract and insert low.
void bfxil(const Register& rd, void bfxil(const Register& rd, const Register& rn, int lsb, int width) {
const Register& rn,
unsigned lsb,
unsigned width) {
DCHECK(width >= 1); DCHECK(width >= 1);
DCHECK(lsb + width <= rn.SizeInBits()); DCHECK(lsb + width <= rn.SizeInBits());
bfm(rd, rn, lsb, lsb + width - 1); bfm(rd, rn, lsb, lsb + width - 1);
...@@ -1160,26 +1145,20 @@ class Assembler : public AssemblerBase { ...@@ -1160,26 +1145,20 @@ class Assembler : public AssemblerBase {
// Sbfm aliases. // Sbfm aliases.
// Arithmetic shift right. // Arithmetic shift right.
void asr(const Register& rd, const Register& rn, unsigned shift) { void asr(const Register& rd, const Register& rn, int shift) {
DCHECK(shift < rd.SizeInBits()); DCHECK(shift < rd.SizeInBits());
sbfm(rd, rn, shift, rd.SizeInBits() - 1); sbfm(rd, rn, shift, rd.SizeInBits() - 1);
} }
// Signed bitfield insert in zero. // Signed bitfield insert in zero.
void sbfiz(const Register& rd, void sbfiz(const Register& rd, const Register& rn, int lsb, int width) {
const Register& rn,
unsigned lsb,
unsigned width) {
DCHECK(width >= 1); DCHECK(width >= 1);
DCHECK(lsb + width <= rn.SizeInBits()); DCHECK(lsb + width <= rn.SizeInBits());
sbfm(rd, rn, (rd.SizeInBits() - lsb) & (rd.SizeInBits() - 1), width - 1); sbfm(rd, rn, (rd.SizeInBits() - lsb) & (rd.SizeInBits() - 1), width - 1);
} }
// Signed bitfield extract. // Signed bitfield extract.
void sbfx(const Register& rd, void sbfx(const Register& rd, const Register& rn, int lsb, int width) {
const Register& rn,
unsigned lsb,
unsigned width) {
DCHECK(width >= 1); DCHECK(width >= 1);
DCHECK(lsb + width <= rn.SizeInBits()); DCHECK(lsb + width <= rn.SizeInBits());
sbfm(rd, rn, lsb, lsb + width - 1); sbfm(rd, rn, lsb, lsb + width - 1);
...@@ -1202,33 +1181,27 @@ class Assembler : public AssemblerBase { ...@@ -1202,33 +1181,27 @@ class Assembler : public AssemblerBase {
// Ubfm aliases. // Ubfm aliases.
// Logical shift left. // Logical shift left.
void lsl(const Register& rd, const Register& rn, unsigned shift) { void lsl(const Register& rd, const Register& rn, int shift) {
unsigned reg_size = rd.SizeInBits(); int reg_size = rd.SizeInBits();
DCHECK(shift < reg_size); DCHECK(shift < reg_size);
ubfm(rd, rn, (reg_size - shift) % reg_size, reg_size - shift - 1); ubfm(rd, rn, (reg_size - shift) % reg_size, reg_size - shift - 1);
} }
// Logical shift right. // Logical shift right.
void lsr(const Register& rd, const Register& rn, unsigned shift) { void lsr(const Register& rd, const Register& rn, int shift) {
DCHECK(shift < rd.SizeInBits()); DCHECK(shift < rd.SizeInBits());
ubfm(rd, rn, shift, rd.SizeInBits() - 1); ubfm(rd, rn, shift, rd.SizeInBits() - 1);
} }
// Unsigned bitfield insert in zero. // Unsigned bitfield insert in zero.
void ubfiz(const Register& rd, void ubfiz(const Register& rd, const Register& rn, int lsb, int width) {
const Register& rn,
unsigned lsb,
unsigned width) {
DCHECK(width >= 1); DCHECK(width >= 1);
DCHECK(lsb + width <= rn.SizeInBits()); DCHECK(lsb + width <= rn.SizeInBits());
ubfm(rd, rn, (rd.SizeInBits() - lsb) & (rd.SizeInBits() - 1), width - 1); ubfm(rd, rn, (rd.SizeInBits() - lsb) & (rd.SizeInBits() - 1), width - 1);
} }
// Unsigned bitfield extract. // Unsigned bitfield extract.
void ubfx(const Register& rd, void ubfx(const Register& rd, const Register& rn, int lsb, int width) {
const Register& rn,
unsigned lsb,
unsigned width) {
DCHECK(width >= 1); DCHECK(width >= 1);
DCHECK(lsb + width <= rn.SizeInBits()); DCHECK(lsb + width <= rn.SizeInBits());
ubfm(rd, rn, lsb, lsb + width - 1); ubfm(rd, rn, lsb, lsb + width - 1);
...@@ -1250,10 +1223,8 @@ class Assembler : public AssemblerBase { ...@@ -1250,10 +1223,8 @@ class Assembler : public AssemblerBase {
} }
// Extract. // Extract.
void extr(const Register& rd, void extr(const Register& rd, const Register& rn, const Register& rm,
const Register& rn, int lsb);
const Register& rm,
unsigned lsb);
// Conditional select: rd = cond ? rn : rm. // Conditional select: rd = cond ? rn : rm.
void csel(const Register& rd, void csel(const Register& rd,
......
...@@ -32,8 +32,8 @@ const unsigned kInstructionSizeLog2 = 2; ...@@ -32,8 +32,8 @@ const unsigned kInstructionSizeLog2 = 2;
const unsigned kLoadLiteralScaleLog2 = 2; const unsigned kLoadLiteralScaleLog2 = 2;
const unsigned kMaxLoadLiteralRange = 1 * MB; const unsigned kMaxLoadLiteralRange = 1 * MB;
const unsigned kNumberOfRegisters = 32; const int kNumberOfRegisters = 32;
const unsigned kNumberOfFPRegisters = 32; const int kNumberOfFPRegisters = 32;
// Callee saved registers are x19-x30(lr). // Callee saved registers are x19-x30(lr).
const int kNumberOfCalleeSavedRegisters = 11; const int kNumberOfCalleeSavedRegisters = 11;
const int kFirstCalleeSavedRegisterIndex = 19; const int kFirstCalleeSavedRegisterIndex = 19;
...@@ -42,23 +42,22 @@ const int kNumberOfCalleeSavedFPRegisters = 8; ...@@ -42,23 +42,22 @@ const int kNumberOfCalleeSavedFPRegisters = 8;
const int kFirstCalleeSavedFPRegisterIndex = 8; const int kFirstCalleeSavedFPRegisterIndex = 8;
// Callee saved registers with no specific purpose in JS are x19-x25. // Callee saved registers with no specific purpose in JS are x19-x25.
const unsigned kJSCalleeSavedRegList = 0x03f80000; const unsigned kJSCalleeSavedRegList = 0x03f80000;
// TODO(all): k<Y>RegSize should probably be k<Y>RegSizeInBits. const int kWRegSizeInBits = 32;
const unsigned kWRegSizeInBits = 32; const int kWRegSizeInBitsLog2 = 5;
const unsigned kWRegSizeInBitsLog2 = 5; const int kWRegSize = kWRegSizeInBits >> 3;
const unsigned kWRegSize = kWRegSizeInBits >> 3; const int kWRegSizeLog2 = kWRegSizeInBitsLog2 - 3;
const unsigned kWRegSizeLog2 = kWRegSizeInBitsLog2 - 3; const int kXRegSizeInBits = 64;
const unsigned kXRegSizeInBits = 64; const int kXRegSizeInBitsLog2 = 6;
const unsigned kXRegSizeInBitsLog2 = 6; const int kXRegSize = kXRegSizeInBits >> 3;
const unsigned kXRegSize = kXRegSizeInBits >> 3; const int kXRegSizeLog2 = kXRegSizeInBitsLog2 - 3;
const unsigned kXRegSizeLog2 = kXRegSizeInBitsLog2 - 3; const int kSRegSizeInBits = 32;
const unsigned kSRegSizeInBits = 32; const int kSRegSizeInBitsLog2 = 5;
const unsigned kSRegSizeInBitsLog2 = 5; const int kSRegSize = kSRegSizeInBits >> 3;
const unsigned kSRegSize = kSRegSizeInBits >> 3; const int kSRegSizeLog2 = kSRegSizeInBitsLog2 - 3;
const unsigned kSRegSizeLog2 = kSRegSizeInBitsLog2 - 3; const int kDRegSizeInBits = 64;
const unsigned kDRegSizeInBits = 64; const int kDRegSizeInBitsLog2 = 6;
const unsigned kDRegSizeInBitsLog2 = 6; const int kDRegSize = kDRegSizeInBits >> 3;
const unsigned kDRegSize = kDRegSizeInBits >> 3; const int kDRegSizeLog2 = kDRegSizeInBitsLog2 - 3;
const unsigned kDRegSizeLog2 = kDRegSizeInBitsLog2 - 3;
const int64_t kWRegMask = 0x00000000ffffffffL; const int64_t kWRegMask = 0x00000000ffffffffL;
const int64_t kXRegMask = 0xffffffffffffffffL; const int64_t kXRegMask = 0xffffffffffffffffL;
const int64_t kSRegMask = 0x00000000ffffffffL; const int64_t kSRegMask = 0x00000000ffffffffL;
...@@ -86,13 +85,13 @@ const int64_t kXMaxInt = 0x7fffffffffffffffL; ...@@ -86,13 +85,13 @@ const int64_t kXMaxInt = 0x7fffffffffffffffL;
const int64_t kXMinInt = 0x8000000000000000L; const int64_t kXMinInt = 0x8000000000000000L;
const int32_t kWMaxInt = 0x7fffffff; const int32_t kWMaxInt = 0x7fffffff;
const int32_t kWMinInt = 0x80000000; const int32_t kWMinInt = 0x80000000;
const unsigned kIp0Code = 16; const int kIp0Code = 16;
const unsigned kIp1Code = 17; const int kIp1Code = 17;
const unsigned kFramePointerRegCode = 29; const int kFramePointerRegCode = 29;
const unsigned kLinkRegCode = 30; const int kLinkRegCode = 30;
const unsigned kZeroRegCode = 31; const int kZeroRegCode = 31;
const unsigned kJSSPCode = 28; const int kJSSPCode = 28;
const unsigned kSPRegInternalCode = 63; const int kSPRegInternalCode = 63;
const unsigned kRegCodeMask = 0x1f; const unsigned kRegCodeMask = 0x1f;
const unsigned kShiftAmountWRegMask = 0x1f; const unsigned kShiftAmountWRegMask = 0x1f;
const unsigned kShiftAmountXRegMask = 0x3f; const unsigned kShiftAmountXRegMask = 0x3f;
......
...@@ -209,7 +209,7 @@ void MacroAssembler::Mov(const Register& rd, uint64_t imm) { ...@@ -209,7 +209,7 @@ void MacroAssembler::Mov(const Register& rd, uint64_t imm) {
// halfword, and movk for subsequent halfwords. // halfword, and movk for subsequent halfwords.
DCHECK((reg_size % 16) == 0); DCHECK((reg_size % 16) == 0);
bool first_mov_done = false; bool first_mov_done = false;
for (unsigned i = 0; i < (rd.SizeInBits() / 16); i++) { for (int i = 0; i < (rd.SizeInBits() / 16); i++) {
uint64_t imm16 = (imm >> (16 * i)) & 0xffffL; uint64_t imm16 = (imm >> (16 * i)) & 0xffffL;
if (imm16 != ignored_halfword) { if (imm16 != ignored_halfword) {
if (!first_mov_done) { if (!first_mov_done) {
......
...@@ -8147,7 +8147,7 @@ TEST(zero_dest) { ...@@ -8147,7 +8147,7 @@ TEST(zero_dest) {
uint64_t literal_base = 0x0100001000100101UL; uint64_t literal_base = 0x0100001000100101UL;
__ Mov(x0, 0); __ Mov(x0, 0);
__ Mov(x1, literal_base); __ Mov(x1, literal_base);
for (unsigned i = 2; i < x30.code(); i++) { for (int i = 2; i < x30.code(); i++) {
__ Add(Register::XRegFromCode(i), Register::XRegFromCode(i-1), x1); __ Add(Register::XRegFromCode(i), Register::XRegFromCode(i-1), x1);
} }
before.Dump(&masm); before.Dump(&masm);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment