hotspot/src/share/vm/asm/assembler.cpp
changeset 41685 7df85c88cdc0
parent 40655 9f644073d3a0
child 46630 75aa3e39d02c
equal deleted inserted replaced
41683:cd5d2527e163 41685:7df85c88cdc0
   151   } // end (UseStackBanging)
   151   } // end (UseStackBanging)
   152 }
   152 }
   153 
   153 
   154 void Label::add_patch_at(CodeBuffer* cb, int branch_loc) {
   154 void Label::add_patch_at(CodeBuffer* cb, int branch_loc) {
   155   assert(_loc == -1, "Label is unbound");
   155   assert(_loc == -1, "Label is unbound");
       
   156   // Don't add patch locations during scratch emit.
       
   157   if (cb->insts()->scratch_emit()) { return; }
   156   if (_patch_index < PatchCacheSize) {
   158   if (_patch_index < PatchCacheSize) {
   157     _patches[_patch_index] = branch_loc;
   159     _patches[_patch_index] = branch_loc;
   158   } else {
   160   } else {
   159     if (_patch_overflow == NULL) {
   161     if (_patch_overflow == NULL) {
   160       _patch_overflow = cb->create_patch_overflow();
   162       _patch_overflow = cb->create_patch_overflow();