src/hotspot/cpu/ppc/compiledIC_ppc.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  * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
     3  * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5  *
     5  *
     6  * This code is free software; you can redistribute it and/or modify it
     6  * This code is free software; you can redistribute it and/or modify it
     7  * under the terms of the GNU General Public License version 2 only, as
     7  * under the terms of the GNU General Public License version 2 only, as
   176 
   176 
   177   // Creation also verifies the object.
   177   // Creation also verifies the object.
   178   NativeMovConstReg* method_holder = nativeMovConstReg_at(stub + IC_pos_in_java_to_interp_stub);
   178   NativeMovConstReg* method_holder = nativeMovConstReg_at(stub + IC_pos_in_java_to_interp_stub);
   179   NativeJump*        jump          = nativeJump_at(method_holder->next_instruction_address());
   179   NativeJump*        jump          = nativeJump_at(method_holder->next_instruction_address());
   180 
   180 
   181 #ifdef ASSERT
   181   verify_mt_safe(callee, entry, method_holder, jump);
   182   // read the value once
       
   183   volatile intptr_t data = method_holder->data();
       
   184   volatile address destination = jump->jump_destination();
       
   185   assert(data == 0 || data == (intptr_t)callee(),
       
   186          "a) MT-unsafe modification of inline cache");
       
   187   assert(destination == (address)-1 || destination == entry,
       
   188          "b) MT-unsafe modification of inline cache");
       
   189 #endif
       
   190 
   182 
   191   // Update stub.
   183   // Update stub.
   192   method_holder->set_data((intptr_t)callee());
   184   method_holder->set_data((intptr_t)callee());
   193   jump->set_jump_destination(entry);
   185   jump->set_jump_destination(entry);
   194 
   186