< prev index next >

src/share/vm/asm/assembler.cpp

Print this page
rev 12037 : 8166562: C2: Suppress relocations in scratch emit.

@@ -151,10 +151,12 @@
   } // end (UseStackBanging)
 }
 
 void Label::add_patch_at(CodeBuffer* cb, int branch_loc) {
   assert(_loc == -1, "Label is unbound");
+  // Don't add patch locations during scratch emit.
+  if (cb->insts()->scratch_emit()) { return; }
   if (_patch_index < PatchCacheSize) {
     _patches[_patch_index] = branch_loc;
   } else {
     if (_patch_overflow == NULL) {
       _patch_overflow = cb->create_patch_overflow();
< prev index next >