summaryrefslogtreecommitdiffstats
path: root/compiler/utils
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-10-08 12:43:28 -0700
committerIan Rogers <irogers@google.com>2014-10-09 16:05:58 -0700
commit13735955f39b3b304c37d2b2840663c131262c18 (patch)
tree0a731ac42b8230f9929172fa3e3d8051874e2b18 /compiler/utils
parent25b18bbdaa36ff936eb44f228f0518d4223e9d52 (diff)
downloadart-13735955f39b3b304c37d2b2840663c131262c18.zip
art-13735955f39b3b304c37d2b2840663c131262c18.tar.gz
art-13735955f39b3b304c37d2b2840663c131262c18.tar.bz2
stdint types all the way!
Change-Id: I4e4ef3a2002fc59ebd9097087f150eaf3f2a7e08
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/arm/assembler_arm.cc2
-rw-r--r--compiler/utils/arm/assembler_arm.h2
-rw-r--r--compiler/utils/arm/assembler_arm32.h2
-rw-r--r--compiler/utils/arm/assembler_thumb2.h2
-rw-r--r--compiler/utils/arm/constants_arm.h4
-rw-r--r--compiler/utils/arm64/assembler_arm64.h2
-rw-r--r--compiler/utils/assembler.cc6
-rw-r--r--compiler/utils/assembler.h28
-rw-r--r--compiler/utils/x86/assembler_x86.cc8
-rw-r--r--compiler/utils/x86/assembler_x86.h6
-rw-r--r--compiler/utils/x86_64/assembler_x86_64.cc8
-rw-r--r--compiler/utils/x86_64/assembler_x86_64.h2
12 files changed, 36 insertions, 36 deletions
diff --git a/compiler/utils/arm/assembler_arm.cc b/compiler/utils/arm/assembler_arm.cc
index 637a1ff..b430c7e 100644
--- a/compiler/utils/arm/assembler_arm.cc
+++ b/compiler/utils/arm/assembler_arm.cc
@@ -386,7 +386,7 @@ bool Address::CanHoldStoreOffsetThumb(StoreOperandType type, int offset) {
void ArmAssembler::Pad(uint32_t bytes) {
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
for (uint32_t i = 0; i < bytes; ++i) {
- buffer_.Emit<byte>(0);
+ buffer_.Emit<uint8_t>(0);
}
}
diff --git a/compiler/utils/arm/assembler_arm.h b/compiler/utils/arm/assembler_arm.h
index 54965f6..14d48b7 100644
--- a/compiler/utils/arm/assembler_arm.h
+++ b/compiler/utils/arm/assembler_arm.h
@@ -600,7 +600,7 @@ class ArmAssembler : public Assembler {
virtual void Ror(Register rd, Register rm, Register rn, bool setcc = false,
Condition cond = AL) = 0;
- static bool IsInstructionForExceptionHandling(uword pc);
+ static bool IsInstructionForExceptionHandling(uintptr_t pc);
virtual void Bind(Label* label) = 0;
diff --git a/compiler/utils/arm/assembler_arm32.h b/compiler/utils/arm/assembler_arm32.h
index 7f9094d..c89fd04 100644
--- a/compiler/utils/arm/assembler_arm32.h
+++ b/compiler/utils/arm/assembler_arm32.h
@@ -273,7 +273,7 @@ class Arm32Assembler FINAL : public ArmAssembler {
Condition cond = AL) OVERRIDE;
- static bool IsInstructionForExceptionHandling(uword pc);
+ static bool IsInstructionForExceptionHandling(uintptr_t pc);
// Emit data (e.g. encoded instruction or immediate) to the
// instruction stream.
diff --git a/compiler/utils/arm/assembler_thumb2.h b/compiler/utils/arm/assembler_thumb2.h
index ee33bf2..9e7d394 100644
--- a/compiler/utils/arm/assembler_thumb2.h
+++ b/compiler/utils/arm/assembler_thumb2.h
@@ -303,7 +303,7 @@ class Thumb2Assembler FINAL : public ArmAssembler {
Condition cond = AL) OVERRIDE;
- static bool IsInstructionForExceptionHandling(uword pc);
+ static bool IsInstructionForExceptionHandling(uintptr_t pc);
// Emit data (e.g. encoded instruction or immediate) to the.
// instruction stream.
diff --git a/compiler/utils/arm/constants_arm.h b/compiler/utils/arm/constants_arm.h
index 3e4cd43..092c891 100644
--- a/compiler/utils/arm/constants_arm.h
+++ b/compiler/utils/arm/constants_arm.h
@@ -223,7 +223,7 @@ typedef uint16_t RegList;
// Example: Test whether the instruction at ptr does set the condition code
// bits.
//
-// bool InstructionSetsConditionCodes(byte* ptr) {
+// bool InstructionSetsConditionCodes(uint8_t* ptr) {
// Instr* instr = Instr::At(ptr);
// int type = instr->TypeField();
// return ((type == 0) || (type == 1)) && instr->HasS();
@@ -435,7 +435,7 @@ class Instr {
// reference to an instruction is to convert a pointer. There is no way
// to allocate or create instances of class Instr.
// Use the At(pc) function to create references to Instr.
- static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); }
+ static Instr* At(uintptr_t pc) { return reinterpret_cast<Instr*>(pc); }
Instr* Next() { return this + kInstrSize; }
private:
diff --git a/compiler/utils/arm64/assembler_arm64.h b/compiler/utils/arm64/assembler_arm64.h
index 373fd34..ef83334 100644
--- a/compiler/utils/arm64/assembler_arm64.h
+++ b/compiler/utils/arm64/assembler_arm64.h
@@ -214,7 +214,7 @@ class Arm64Assembler FINAL : public Assembler {
void AddConstant(Register rd, Register rn, int32_t value, vixl::Condition cond = vixl::al);
// Vixl assembler.
- vixl::MacroAssembler* vixl_masm_;
+ vixl::MacroAssembler* const vixl_masm_;
// List of exception blocks to generate at the end of the code cache.
std::vector<Arm64Exception*> exception_blocks_;
diff --git a/compiler/utils/assembler.cc b/compiler/utils/assembler.cc
index e3045e1..8a1289d 100644
--- a/compiler/utils/assembler.cc
+++ b/compiler/utils/assembler.cc
@@ -30,8 +30,8 @@
namespace art {
-static byte* NewContents(size_t capacity) {
- return new byte[capacity];
+static uint8_t* NewContents(size_t capacity) {
+ return new uint8_t[capacity];
}
@@ -85,7 +85,7 @@ void AssemblerBuffer::ExtendCapacity() {
size_t new_capacity = std::min(old_capacity * 2, old_capacity + 1 * MB);
// Allocate the new data area and copy contents of the old one to it.
- byte* new_contents = NewContents(new_capacity);
+ uint8_t* new_contents = NewContents(new_capacity);
memmove(reinterpret_cast<void*>(new_contents),
reinterpret_cast<void*>(contents_),
old_size);
diff --git a/compiler/utils/assembler.h b/compiler/utils/assembler.h
index 4addfa0..91b8d8a 100644
--- a/compiler/utils/assembler.h
+++ b/compiler/utils/assembler.h
@@ -56,19 +56,19 @@ namespace x86_64 {
class ExternalLabel {
public:
- ExternalLabel(const char* name, uword address)
+ ExternalLabel(const char* name, uintptr_t address)
: name_(name), address_(address) {
DCHECK(name != nullptr);
}
const char* name() const { return name_; }
- uword address() const {
+ uintptr_t address() const {
return address_;
}
private:
const char* name_;
- const uword address_;
+ const uintptr_t address_;
};
class Label {
@@ -84,12 +84,12 @@ class Label {
// for unused labels.
int Position() const {
CHECK(!IsUnused());
- return IsBound() ? -position_ - kPointerSize : position_ - kPointerSize;
+ return IsBound() ? -position_ - sizeof(void*) : position_ - sizeof(void*);
}
int LinkPosition() const {
CHECK(IsLinked());
- return position_ - kPointerSize;
+ return position_ - sizeof(void*);
}
bool IsBound() const { return position_ < 0; }
@@ -105,13 +105,13 @@ class Label {
void BindTo(int position) {
CHECK(!IsBound());
- position_ = -position - kPointerSize;
+ position_ = -position - sizeof(void*);
CHECK(IsBound());
}
void LinkTo(int position) {
CHECK(!IsBound());
- position_ = position + kPointerSize;
+ position_ = position + sizeof(void*);
CHECK(IsLinked());
}
@@ -236,7 +236,7 @@ class AssemblerBuffer {
return cursor_ - contents_;
}
- byte* contents() const { return contents_; }
+ uint8_t* contents() const { return contents_; }
// Copy the assembled instructions into the specified memory block
// and apply all fixups.
@@ -316,9 +316,9 @@ class AssemblerBuffer {
// for a single, fast space check per instruction.
static const int kMinimumGap = 32;
- byte* contents_;
- byte* cursor_;
- byte* limit_;
+ uint8_t* contents_;
+ uint8_t* cursor_;
+ uint8_t* limit_;
AssemblerFixup* fixup_;
#ifndef NDEBUG
bool fixups_processed_;
@@ -327,8 +327,8 @@ class AssemblerBuffer {
// Head of linked list of slow paths
SlowPath* slow_path_;
- byte* cursor() const { return cursor_; }
- byte* limit() const { return limit_; }
+ uint8_t* cursor() const { return cursor_; }
+ uint8_t* limit() const { return limit_; }
size_t Capacity() const {
CHECK_GE(limit_, contents_);
return (limit_ - contents_) + kMinimumGap;
@@ -340,7 +340,7 @@ class AssemblerBuffer {
// Compute the limit based on the data area and the capacity. See
// description of kMinimumGap for the reasoning behind the value.
- static byte* ComputeLimit(byte* data, size_t capacity) {
+ static uint8_t* ComputeLimit(uint8_t* data, size_t capacity) {
return data + capacity - kMinimumGap;
}
diff --git a/compiler/utils/x86/assembler_x86.cc b/compiler/utils/x86/assembler_x86.cc
index 3ff24b7..4ddf979 100644
--- a/compiler/utils/x86/assembler_x86.cc
+++ b/compiler/utils/x86/assembler_x86.cc
@@ -1291,7 +1291,7 @@ void X86Assembler::LoadDoubleConstant(XmmRegister dst, double value) {
pushl(Immediate(High32Bits(constant)));
pushl(Immediate(Low32Bits(constant)));
movsd(dst, Address(ESP, 0));
- addl(ESP, Immediate(2 * kWordSize));
+ addl(ESP, Immediate(2 * sizeof(intptr_t)));
}
@@ -1303,7 +1303,7 @@ void X86Assembler::FloatNegate(XmmRegister f) {
uint32_t d;
} float_negate_constant __attribute__((aligned(16))) =
{ 0x80000000, 0x00000000, 0x80000000, 0x00000000 };
- xorps(f, Address::Absolute(reinterpret_cast<uword>(&float_negate_constant)));
+ xorps(f, Address::Absolute(reinterpret_cast<uintptr_t>(&float_negate_constant)));
}
@@ -1313,7 +1313,7 @@ void X86Assembler::DoubleNegate(XmmRegister d) {
uint64_t b;
} double_negate_constant __attribute__((aligned(16))) =
{0x8000000000000000LL, 0x8000000000000000LL};
- xorpd(d, Address::Absolute(reinterpret_cast<uword>(&double_negate_constant)));
+ xorpd(d, Address::Absolute(reinterpret_cast<uintptr_t>(&double_negate_constant)));
}
@@ -1323,7 +1323,7 @@ void X86Assembler::DoubleAbs(XmmRegister reg) {
uint64_t b;
} double_abs_constant __attribute__((aligned(16))) =
{0x7FFFFFFFFFFFFFFFLL, 0x7FFFFFFFFFFFFFFFLL};
- andpd(reg, Address::Absolute(reinterpret_cast<uword>(&double_abs_constant)));
+ andpd(reg, Address::Absolute(reinterpret_cast<uintptr_t>(&double_abs_constant)));
}
diff --git a/compiler/utils/x86/assembler_x86.h b/compiler/utils/x86/assembler_x86.h
index 1f6f7e6..c7eada3 100644
--- a/compiler/utils/x86/assembler_x86.h
+++ b/compiler/utils/x86/assembler_x86.h
@@ -116,8 +116,8 @@ class Operand {
}
private:
- byte length_;
- byte encoding_[6];
+ uint8_t length_;
+ uint8_t encoding_[6];
explicit Operand(Register reg) { SetModRM(3, reg); }
@@ -192,7 +192,7 @@ class Address : public Operand {
}
}
- static Address Absolute(uword addr) {
+ static Address Absolute(uintptr_t addr) {
Address result;
result.SetModRM(0, EBP);
result.SetDisp32(addr);
diff --git a/compiler/utils/x86_64/assembler_x86_64.cc b/compiler/utils/x86_64/assembler_x86_64.cc
index 705b639..75823e3 100644
--- a/compiler/utils/x86_64/assembler_x86_64.cc
+++ b/compiler/utils/x86_64/assembler_x86_64.cc
@@ -1490,7 +1490,7 @@ void X86_64Assembler::LoadDoubleConstant(XmmRegister dst, double value) {
pushq(Immediate(High32Bits(constant)));
pushq(Immediate(Low32Bits(constant)));
movsd(dst, Address(CpuRegister(RSP), 0));
- addq(CpuRegister(RSP), Immediate(2 * kWordSize));
+ addq(CpuRegister(RSP), Immediate(2 * sizeof(intptr_t)));
}
@@ -1502,7 +1502,7 @@ void X86_64Assembler::FloatNegate(XmmRegister f) {
uint32_t d;
} float_negate_constant __attribute__((aligned(16))) =
{ 0x80000000, 0x00000000, 0x80000000, 0x00000000 };
- xorps(f, Address::Absolute(reinterpret_cast<uword>(&float_negate_constant)));
+ xorps(f, Address::Absolute(reinterpret_cast<uintptr_t>(&float_negate_constant)));
}
@@ -1512,7 +1512,7 @@ void X86_64Assembler::DoubleNegate(XmmRegister d) {
uint64_t b;
} double_negate_constant __attribute__((aligned(16))) =
{0x8000000000000000LL, 0x8000000000000000LL};
- xorpd(d, Address::Absolute(reinterpret_cast<uword>(&double_negate_constant)));
+ xorpd(d, Address::Absolute(reinterpret_cast<uintptr_t>(&double_negate_constant)));
}
@@ -1522,7 +1522,7 @@ void X86_64Assembler::DoubleAbs(XmmRegister reg) {
uint64_t b;
} double_abs_constant __attribute__((aligned(16))) =
{0x7FFFFFFFFFFFFFFFLL, 0x7FFFFFFFFFFFFFFFLL};
- andpd(reg, Address::Absolute(reinterpret_cast<uword>(&double_abs_constant)));
+ andpd(reg, Address::Absolute(reinterpret_cast<uintptr_t>(&double_abs_constant)));
}
diff --git a/compiler/utils/x86_64/assembler_x86_64.h b/compiler/utils/x86_64/assembler_x86_64.h
index 268f72b..1d9eba4 100644
--- a/compiler/utils/x86_64/assembler_x86_64.h
+++ b/compiler/utils/x86_64/assembler_x86_64.h
@@ -227,7 +227,7 @@ class Address : public Operand {
}
// If no_rip is true then the Absolute address isn't RIP relative.
- static Address Absolute(uword addr, bool no_rip = false) {
+ static Address Absolute(uintptr_t addr, bool no_rip = false) {
Address result;
if (no_rip) {
result.SetModRM(0, CpuRegister(RSP));