src/hotspot/cpu/ppc/nativeInst_ppc.cpp
changeset 53867 87ef165e7bcd
parent 52384 d6dc479bcdd3
child 59247 56bf71d64d51
equal deleted inserted replaced
53866:880baf6db17b 53867:87ef165e7bcd
     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, 2019, 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
     8  * published by the Free Software Foundation.
     8  * published by the Free Software Foundation.
   360 #endif // ASSERT
   360 #endif // ASSERT
   361 
   361 
   362 
   362 
   363 void NativeGeneralJump::insert_unconditional(address code_pos, address entry) {
   363 void NativeGeneralJump::insert_unconditional(address code_pos, address entry) {
   364   CodeBuffer cb(code_pos, BytesPerInstWord + 1);
   364   CodeBuffer cb(code_pos, BytesPerInstWord + 1);
   365   MacroAssembler* a = new MacroAssembler(&cb);
   365   MacroAssembler a(&cb);
   366   a->b(entry);
   366   a.b(entry);
   367   ICache::ppc64_flush_icache_bytes(code_pos, NativeGeneralJump::instruction_size);
   367   ICache::ppc64_flush_icache_bytes(code_pos, NativeGeneralJump::instruction_size);
   368 }
   368 }
   369 
   369 
   370 // MT-safe patching of a jmp instruction.
   370 // MT-safe patching of a jmp instruction.
   371 void NativeGeneralJump::replace_mt_safe(address instr_addr, address code_buffer) {
   371 void NativeGeneralJump::replace_mt_safe(address instr_addr, address code_buffer) {