src/hotspot/cpu/sparc/compiledIC_sparc.cpp
changeset 58505 c16f3a24a6fc
parent 52384 d6dc479bcdd3
equal deleted inserted replaced
58504:94dd00d2da29 58505:c16f3a24a6fc
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   102   }
   102   }
   103 
   103 
   104   // Creation also verifies the object.
   104   // Creation also verifies the object.
   105   NativeMovConstReg* method_holder = nativeMovConstReg_at(stub);
   105   NativeMovConstReg* method_holder = nativeMovConstReg_at(stub);
   106   NativeJump*        jump          = nativeJump_at(method_holder->next_instruction_address());
   106   NativeJump*        jump          = nativeJump_at(method_holder->next_instruction_address());
   107 
   107   verify_mt_safe(callee, entry, method_holder, jump);
   108 #ifdef ASSERT
       
   109   // read the value once
       
   110   volatile intptr_t data = method_holder->data();
       
   111   volatile address destination = jump->jump_destination();
       
   112   assert(data == 0 || data == (intptr_t)callee(),
       
   113          "a) MT-unsafe modification of inline cache");
       
   114   assert(destination == (address)-1 || destination == entry,
       
   115          "b) MT-unsafe modification of inline cache");
       
   116 #endif
       
   117 
   108 
   118   // Update stub.
   109   // Update stub.
   119   method_holder->set_data((intptr_t)callee());
   110   method_holder->set_data((intptr_t)callee());
   120   jump->set_jump_destination(entry);
   111   jump->set_jump_destination(entry);
   121 
   112