Resend: Missing hotspot changes after Initial updates for ios x86_64 causes GCC error in linux build

Ali Ebrahimi ali.ebrahimi1781 at gmail.com
Sat Apr 9 08:40:32 UTC 2016


After first mobile-related push some changes missed specifically in file
hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp.

I restored these changes in following patch, with this patch GCC error
disappears.

diff -r 9ec65e87a0ec src/os_cpu/linux_x86/vm/os_linux_x86.cpp
--- a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Fri Apr 01 10:22:38 2016
-0400
+++ b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Sat Apr 02 22:34:02 2016
+0430
@@ -824,32 +824,32 @@
   const ucontext_t *uc = (const ucontext_t*)context;
   st->print_cr("Registers:");
 #ifdef AMD64
-  st->print(  "RAX=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_AX);
-  st->print(", RBX=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_BX);
-  st->print(", RCX=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_CX);
-  st->print(", RDX=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_DX);
+  st->print(  "RAX=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_AX);
+  st->print(", RBX=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_BX);
+  st->print(", RCX=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_CX);
+  st->print(", RDX=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_DX);
   st->cr();
-  st->print(  "RSP=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_SP);
-  st->print(", RBP=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_BP);
-  st->print(", RSI=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_SI);
-  st->print(", RDI=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_DI);
+  st->print(  "RSP=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_SP);
+  st->print(", RBP=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_BP);
+  st->print(", RSI=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_SI);
+  st->print(", RDI=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_DI);
   st->cr();
-  st->print(  "R8 =" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R8);
-  st->print(", R9 =" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R9);
-  st->print(", R10=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R10);
-  st->print(", R11=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R11);
+  st->print(  "R8 =" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R8);
+  st->print(", R9 =" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R9);
+  st->print(", R10=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R10);
+  st->print(", R11=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R11);
   st->cr();
-  st->print(  "R12=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R12);
-  st->print(", R13=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R13);
-  st->print(", R14=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R14);
-  st->print(", R15=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R15);
+  st->print(  "R12=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R12);
+  st->print(", R13=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R13);
+  st->print(", R14=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R14);
+  st->print(", R15=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R15);
   st->cr();
-  st->print(  "RIP=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_PC);
-  st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_FL);
-  st->print(", CSGSFS=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_CSGSFS);
-  st->print(", ERR=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_ERR);
+  st->print(  "RIP=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_PC);
+  st->print(", EFLAGS=" INTPTR_FORMAT,
(intptr_t)uc->uc_mcontext.CTX_REG_FL);
+  st->print(", CSGSFS=" INTPTR_FORMAT,
(intptr_t)uc->uc_mcontext.CTX_REG_CSGSFS);
+  st->print(", ERR=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_ERR);
   st->cr();
-  st->print("  TRAPNO=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_TRAPNO);
+  st->print("  TRAPNO=" INTPTR_FORMAT,
(intptr_t)uc->uc_mcontext.CTX_REG_TRAPNO);
 #else
   st->print(  "EAX=" INTPTR_FORMAT, (int) uc->uc_mcontext.CTX_REG_AX);
   st->print(", EBX=" INTPTR_FORMAT, (int) uc->uc_mcontext.CTX_REG_BX);


-- 

Best Regards,
Ali Ebrahimi
-------------- next part --------------
diff -r 9ec65e87a0ec src/os_cpu/linux_x86/vm/os_linux_x86.cpp
--- a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Fri Apr 01 10:22:38 2016 -0400
+++ b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Sat Apr 02 22:34:02 2016 +0430
@@ -824,32 +824,32 @@
   const ucontext_t *uc = (const ucontext_t*)context;
   st->print_cr("Registers:");
 #ifdef AMD64
-  st->print(  "RAX=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_AX);
-  st->print(", RBX=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_BX);
-  st->print(", RCX=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_CX);
-  st->print(", RDX=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_DX);
+  st->print(  "RAX=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_AX);
+  st->print(", RBX=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_BX);
+  st->print(", RCX=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_CX);
+  st->print(", RDX=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_DX);
   st->cr();
-  st->print(  "RSP=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_SP);
-  st->print(", RBP=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_BP);
-  st->print(", RSI=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_SI);
-  st->print(", RDI=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_DI);
+  st->print(  "RSP=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_SP);
+  st->print(", RBP=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_BP);
+  st->print(", RSI=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_SI);
+  st->print(", RDI=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_DI);
   st->cr();
-  st->print(  "R8 =" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R8);
-  st->print(", R9 =" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R9);
-  st->print(", R10=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R10);
-  st->print(", R11=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R11);
+  st->print(  "R8 =" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R8);
+  st->print(", R9 =" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R9);
+  st->print(", R10=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R10);
+  st->print(", R11=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R11);
   st->cr();
-  st->print(  "R12=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R12);
-  st->print(", R13=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R13);
-  st->print(", R14=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R14);
-  st->print(", R15=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_R15);
+  st->print(  "R12=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R12);
+  st->print(", R13=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R13);
+  st->print(", R14=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R14);
+  st->print(", R15=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_R15);
   st->cr();
-  st->print(  "RIP=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_PC);
-  st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_FL);
-  st->print(", CSGSFS=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_CSGSFS);
-  st->print(", ERR=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_ERR);
+  st->print(  "RIP=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_PC);
+  st->print(", EFLAGS=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_FL);
+  st->print(", CSGSFS=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_CSGSFS);
+  st->print(", ERR=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_ERR);
   st->cr();
-  st->print("  TRAPNO=" INTPTR_FORMAT, uc->uc_mcontext.CTX_REG_TRAPNO);
+  st->print("  TRAPNO=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.CTX_REG_TRAPNO);
 #else
   st->print(  "EAX=" INTPTR_FORMAT, (int) uc->uc_mcontext.CTX_REG_AX);
   st->print(", EBX=" INTPTR_FORMAT, (int) uc->uc_mcontext.CTX_REG_BX);


More information about the mobile-dev mailing list