13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "c1/c1_Compilation.hpp"
27 #include "c1/c1_Instruction.hpp"
28 #include "c1/c1_InstructionPrinter.hpp"
29 #include "c1/c1_LIRAssembler.hpp"
30 #include "c1/c1_MacroAssembler.hpp"
31 #include "c1/c1_ValueStack.hpp"
32 #include "ci/ciInstance.hpp"
33 #include "runtime/os.hpp"
34
35 void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) {
36 // We must have enough patching space so that call can be inserted.
37 // We cannot use fat nops here, since the concurrent code rewrite may transiently
38 // create the illegal instruction sequence.
39 while ((intx) _masm->pc() - (intx) patch->pc_start() < NativeGeneralJump::instruction_size) {
40 _masm->nop();
41 }
42 patch->install(_masm, patch_code, obj, info);
43 append_code_stub(patch);
44
45 #ifdef ASSERT
46 Bytecodes::Code code = info->scope()->method()->java_code_at_bci(info->stack()->bci());
47 if (patch->id() == PatchingStub::access_field_id) {
48 switch (code) {
49 case Bytecodes::_putstatic:
50 case Bytecodes::_getstatic:
51 case Bytecodes::_putfield:
52 case Bytecodes::_getfield:
|
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "c1/c1_Compilation.hpp"
27 #include "c1/c1_Instruction.hpp"
28 #include "c1/c1_InstructionPrinter.hpp"
29 #include "c1/c1_LIRAssembler.hpp"
30 #include "c1/c1_MacroAssembler.hpp"
31 #include "c1/c1_ValueStack.hpp"
32 #include "ci/ciInstance.hpp"
33 #include "gc/shared/collectedHeap.hpp"
34 #include "runtime/os.hpp"
35
36 void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) {
37 // We must have enough patching space so that call can be inserted.
38 // We cannot use fat nops here, since the concurrent code rewrite may transiently
39 // create the illegal instruction sequence.
40 while ((intx) _masm->pc() - (intx) patch->pc_start() < NativeGeneralJump::instruction_size) {
41 _masm->nop();
42 }
43 patch->install(_masm, patch_code, obj, info);
44 append_code_stub(patch);
45
46 #ifdef ASSERT
47 Bytecodes::Code code = info->scope()->method()->java_code_at_bci(info->stack()->bci());
48 if (patch->id() == PatchingStub::access_field_id) {
49 switch (code) {
50 case Bytecodes::_putstatic:
51 case Bytecodes::_getstatic:
52 case Bytecodes::_putfield:
53 case Bytecodes::_getfield:
|