[aarch64-port-dev ] Fix format errors

Edward Nevill edward.nevill at linaro.org
Wed Jun 11 12:55:02 UTC 2014


Hi,

The following patch fixes some format errors which are causing build failures on native builds.

Regards,
Ed.

--- CUT HERE ---
# HG changeset patch
# User Edward Nevill edward.nevill at linaro.org
# Date 1402490860 -3600
#      Wed Jun 11 13:47:40 2014 +0100
# Node ID db459f22b8029132b51d1db37f71e825f1e47593
# Parent  8cb098504801769e6c53eec016a1767b0aa59c79
Fix format errors

diff -r 8cb098504801 -r db459f22b802 src/cpu/aarch64/vm/c1_LinearScan_aarch64.cpp
--- a/src/cpu/aarch64/vm/c1_LinearScan_aarch64.cpp	Thu Jun 05 13:48:13 2014 +0100
+++ b/src/cpu/aarch64/vm/c1_LinearScan_aarch64.cpp	Wed Jun 11 13:47:40 2014 +0100
@@ -97,7 +97,7 @@
 
 #ifndef PRODUCT
         if (TraceFPURegisterUsage) {
-          tty->print("FPU regs for block %d, LIR instr %d): ", b->block_id(), id); regs.print_on(tty); tty->print_cr("");
+          tty->print("FPU regs for block %d, LIR instr %d): ", b->block_id(), id); regs.print_on(tty); tty->cr();
         }
 #endif
       }
diff -r 8cb098504801 -r db459f22b802 src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp
--- a/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp	Thu Jun 05 13:48:13 2014 +0100
+++ b/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp	Wed Jun 11 13:47:40 2014 +0100
@@ -1524,8 +1524,8 @@
 	address copy_buff = stub_location - *byte_skip - *byte_count;
 	address being_initialized_entry = stub_location - *being_initialized_entry_offset;
 	if (TracePatching) {
-	  tty->print_cr(" Patching %s at bci %d at address 0x%x  (%s)", Bytecodes::name(code), bci,
-			instr_pc, (stub_id == Runtime1::access_field_patching_id) ? "field" : "klass");
+	  tty->print_cr(" Patching %s at bci %d at address " INTPTR_FORMAT " (%s)", Bytecodes::name(code), bci,
+			p2i(instr_pc), (stub_id == Runtime1::access_field_patching_id) ? "field" : "klass");
 	  nmethod* caller_code = CodeCache::find_nmethod(caller_frame.pc());
 	  assert(caller_code != NULL, "nmethod not found");
 
diff -r 8cb098504801 -r db459f22b802 src/cpu/aarch64/vm/compiledIC_aarch64.cpp
--- a/src/cpu/aarch64/vm/compiledIC_aarch64.cpp	Thu Jun 05 13:48:13 2014 +0100
+++ b/src/cpu/aarch64/vm/compiledIC_aarch64.cpp	Wed Jun 11 13:47:40 2014 +0100
@@ -124,7 +124,7 @@
   if (TraceICs) {
     ResourceMark rm;
     tty->print_cr("CompiledStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
-                  instruction_address(),
+                  p2i(instruction_address()),
                   callee->name_and_sig_as_C_string());
   }
 
diff -r 8cb098504801 -r db459f22b802 src/cpu/aarch64/vm/frame_aarch64.cpp
--- a/src/cpu/aarch64/vm/frame_aarch64.cpp	Thu Jun 05 13:48:13 2014 +0100
+++ b/src/cpu/aarch64/vm/frame_aarch64.cpp	Wed Jun 11 13:47:40 2014 +0100
@@ -270,7 +270,7 @@
   address* pc_addr = &(((address*) sp())[-1]);
   if (TracePcPatching) {
     tty->print_cr("patch_pc at address " INTPTR_FORMAT " [" INTPTR_FORMAT " -> " INTPTR_FORMAT "]",
-                  pc_addr, *pc_addr, pc);
+                  p2i(pc_addr), p2i(*pc_addr), p2i(pc));
   }
   // Either the return address is the original one or we are going to
   // patch in the same address that's already there.
diff -r 8cb098504801 -r db459f22b802 src/cpu/aarch64/vm/nativeInst_aarch64.cpp
--- a/src/cpu/aarch64/vm/nativeInst_aarch64.cpp	Thu Jun 05 13:48:13 2014 +0100
+++ b/src/cpu/aarch64/vm/nativeInst_aarch64.cpp	Wed Jun 11 13:47:40 2014 +0100
@@ -86,7 +86,7 @@
 
 void NativeMovConstReg::print() {
   tty->print_cr(PTR_FORMAT ": mov reg, " INTPTR_FORMAT,
-                instruction_address(), data());
+                p2i(instruction_address()), data());
 }
 
 //-------------------------------------------------------------------
diff -r 8cb098504801 -r db459f22b802 src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
--- a/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp	Thu Jun 05 13:48:13 2014 +0100
+++ b/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp	Wed Jun 11 13:47:40 2014 +0100
@@ -104,7 +104,7 @@
 
   if (PrintMiscellaneous && (WizardMode || Verbose)) {
     tty->print_cr("vtable #%d at "PTR_FORMAT"[%d] left over: %d",
-                  vtable_index, s->entry_point(),
+                  vtable_index, p2i(s->entry_point()),
                   (int)(s->code_end() - s->entry_point()),
                   (int)(s->code_end() - __ pc()));
   }
@@ -185,7 +185,7 @@
 
   if (PrintMiscellaneous && (WizardMode || Verbose)) {
     tty->print_cr("itable #%d at "PTR_FORMAT"[%d] left over: %d",
-                  itable_index, s->entry_point(),
+                  itable_index, p2i(s->entry_point()),
                   (int)(s->code_end() - s->entry_point()),
                   (int)(s->code_end() - __ pc()));
   }
diff -r 8cb098504801 -r db459f22b802 src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
--- a/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp	Thu Jun 05 13:48:13 2014 +0100
+++ b/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp	Wed Jun 11 13:47:40 2014 +0100
@@ -621,12 +621,12 @@
   st->cr();
 #else
   for (int r = 0; r < 31; r++)
-	  st->print_cr(  "R%d=" INTPTR_FORMAT, r, uc->uc_mcontext.regs[r]);
+	  st->print_cr(  "R%d=" INTPTR_FORMAT, r, (int64_t)uc->uc_mcontext.regs[r]);
 #endif
   st->cr();
 
   intptr_t *sp = (intptr_t *)os::Linux::ucontext_get_sp(uc);
-  st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", sp);
+  st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", p2i(sp));
   print_hex_dump(st, (address)sp, (address)(sp + 8*sizeof(intptr_t)), sizeof(intptr_t));
   st->cr();
 
@@ -634,7 +634,7 @@
   // point to garbage if entry point in an nmethod is corrupted. Leave
   // this at the end, and hope for the best.
   address pc = os::Linux::ucontext_get_pc(uc);
-  st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc);
+  st->print_cr("Instructions: (pc=" PTR_FORMAT ")", p2i(pc));
   print_hex_dump(st, pc - 32, pc + 32, sizeof(char));
 }
 
@@ -671,7 +671,7 @@
   st->print("R15="); print_location(st, uc->uc_mcontext.gregs[REG_R15]);
 #else
   for (int r = 0; r < 31; r++)
-	  st->print_cr(  "R%d=" INTPTR_FORMAT, r, uc->uc_mcontext.regs[r]);
+	  st->print_cr(  "R%d=" INTPTR_FORMAT, r, (int64_t)uc->uc_mcontext.regs[r]);
 #endif
   st->cr();
 }
--- CUT HERE ---




More information about the aarch64-port-dev mailing list