Merge "64bit cleanliness requires PRI*64 macros for stdint types."
diff --git a/compiler/elf_writer.h b/compiler/elf_writer.h
index 0ef4185..dbc986a 100644
--- a/compiler/elf_writer.h
+++ b/compiler/elf_writer.h
@@ -44,7 +44,7 @@
size_t& oat_data_offset);
// Returns runtime oat_data runtime address for an opened ElfFile.
- static llvm::ELF::Elf32_Addr GetOatDataAddress(ElfFile* elf_file);
+ static ::llvm::ELF::Elf32_Addr GetOatDataAddress(ElfFile* elf_file);
protected:
ElfWriter(const CompilerDriver& driver, File* elf_file);
diff --git a/compiler/elf_writer_mclinker.h b/compiler/elf_writer_mclinker.h
index 5da178c..a0cd7f0 100644
--- a/compiler/elf_writer_mclinker.h
+++ b/compiler/elf_writer_mclinker.h
@@ -68,7 +68,7 @@
void FixupOatMethodOffsets(const std::vector<const DexFile*>& dex_files)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
uint32_t FixupCompiledCodeOffset(ElfFile& elf_file,
- llvm::ELF::Elf32_Addr oatdata_address,
+ ::llvm::ELF::Elf32_Addr oatdata_address,
const CompiledCode& compiled_code);
#endif
diff --git a/runtime/arch/x86/quick_entrypoints_x86.S b/runtime/arch/x86/quick_entrypoints_x86.S
index 3adc46a..0a414b1 100644
--- a/runtime/arch/x86/quick_entrypoints_x86.S
+++ b/runtime/arch/x86/quick_entrypoints_x86.S
@@ -1177,7 +1177,7 @@
addl LITERAL(28), %esp // Pop arguments upto saved Method*.
movl 28(%esp), %edi // Restore edi.
movl %eax, 28(%esp) // Place code* over edi, just under return pc.
- movl LITERAL(SYMBOL(art_quick_instrumentation_exit)), 32(%esp)
+ movl LITERAL(PLT_SYMBOL(art_quick_instrumentation_exit)), 32(%esp)
// Place instrumentation exit as return pc.
movl (%esp), %eax // Restore eax.
movl 8(%esp), %ecx // Restore ecx.
diff --git a/runtime/base/logging.cc b/runtime/base/logging.cc
index 3aabc8d..15554ac 100644
--- a/runtime/base/logging.cc
+++ b/runtime/base/logging.cc
@@ -177,36 +177,43 @@
static const char gHexDigit[] = "0123456789abcdef";
const unsigned char* addr = reinterpret_cast<const unsigned char*>(address_);
- char out[76]; /* exact fit */
- unsigned int offset; /* offset to show while printing */
+ // 01234560: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 0123456789abcdef
+ char out[(kBitsPerWord / 4) + /* offset */
+ 1 + /* colon */
+ (16 * 3) + /* 16 hex digits and space */
+ 2 + /* white space */
+ 16 + /* 16 characters*/
+ 1 /* \0 */ ];
+ size_t offset; /* offset to show while printing */
if (show_actual_addresses_) {
- offset = reinterpret_cast<int>(addr);
+ offset = reinterpret_cast<size_t>(addr);
} else {
offset = 0;
}
memset(out, ' ', sizeof(out)-1);
- out[8] = ':';
+ out[kBitsPerWord / 4] = ':';
out[sizeof(out)-1] = '\0';
size_t byte_count = byte_count_;
- int gap = static_cast<int>(offset & 0x0f);
+ size_t gap = offset & 0x0f;
while (byte_count) {
- unsigned int line_offset = offset & ~0x0f;
+ size_t line_offset = offset & ~0x0f;
char* hex = out;
- char* asc = out + 59;
+ char* asc = out + (kBitsPerWord / 4) + /* offset */ 1 + /* colon */
+ (16 * 3) + /* 16 hex digits and space */ 2 /* white space */;
- for (int i = 0; i < 8; i++) {
- *hex++ = gHexDigit[line_offset >> 28];
+ for (int i = 0; i < (kBitsPerWord / 4); i++) {
+ *hex++ = gHexDigit[line_offset >> (kBitsPerWord - 4)];
line_offset <<= 4;
}
hex++;
hex++;
- int count = std::min(static_cast<int>(byte_count), 16 - gap);
- CHECK_NE(count, 0);
- CHECK_LE(count + gap, 16);
+ size_t count = std::min(byte_count, 16 - gap);
+ CHECK_NE(count, 0U);
+ CHECK_LE(count + gap, 16U);
if (gap) {
/* only on first line */
@@ -214,8 +221,8 @@
asc += gap;
}
- int i;
- for (i = gap ; i < count+gap; i++) {
+ size_t i;
+ for (i = gap ; i < count + gap; i++) {
*hex++ = gHexDigit[*addr >> 4];
*hex++ = gHexDigit[*addr & 0x0f];
hex++;