diff src/cpu/x86/vm/c1_MacroAssembler_x86.cpp @ 4947:fd8114661503

7125136: SIGILL on linux amd64 in gc/ArrayJuggle/Juggle29 Summary: For C2 moved saving EBP after ESP adjustment. For C1 generated 5 byte nop instruction first if needed. Reviewed-by: never, twisti, azeemj
author kvn
date Wed, 15 Feb 2012 21:37:49 -0800
parents 069ab3f976d3
children 33df1aeaebbf da91efe96a93
line wrap: on
line diff
--- a/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp	Wed Feb 15 16:29:40 2012 -0800
+++ b/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp	Wed Feb 15 21:37:49 2012 -0800
@@ -381,6 +381,16 @@
 
 
 void C1_MacroAssembler::verified_entry() {
+  if (C1Breakpoint || VerifyFPU || !UseStackBanging) {
+    // Verified Entry first instruction should be 5 bytes long for correct
+    // patching by patch_verified_entry().
+    //
+    // C1Breakpoint and VerifyFPU have one byte first instruction.
+    // Also first instruction will be one byte "push(rbp)" if stack banging
+    // code is not generated (see build_frame() above).
+    // For all these cases generate long instruction first.
+    fat_nop();
+  }
   if (C1Breakpoint)int3();
   // build frame
   verify_FPU(0, "method_entry");