3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
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 #include "jvmci/jvmciCodeInstaller.hpp"
25 #include "jvmci/jvmciRuntime.hpp"
26 #include "jvmci/jvmciCompilerToVM.hpp"
27 #include "jvmci/jvmciJavaClasses.hpp"
28 #include "oops/oop.inline.hpp"
29 #include "runtime/handles.inline.hpp"
30 #include "runtime/sharedRuntime.hpp"
31 #include "vmreg_aarch64.inline.hpp"
32
33 jint CodeInstaller::pd_next_offset(NativeInstruction* inst, jint pc_offset, JVMCIObject method, JVMCI_TRAPS) {
34 if (inst->is_call() || inst->is_jump() || inst->is_blr()) {
35 return pc_offset + NativeCall::instruction_size;
36 } else if (inst->is_general_jump()) {
37 return pc_offset + NativeGeneralJump::instruction_size;
38 } else if (NativeInstruction::is_adrp_at((address)inst)) {
39 // adrp; add; blr
40 return pc_offset + 3 * NativeInstruction::instruction_size;
41 } else {
42 JVMCI_ERROR_0("unsupported type of instruction for call site");
43 }
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
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 #include "precompiled.hpp"
24 #include "jvmci/jvmciCodeInstaller.hpp"
25 #include "jvmci/jvmciRuntime.hpp"
26 #include "jvmci/jvmciCompilerToVM.hpp"
27 #include "jvmci/jvmciJavaClasses.hpp"
28 #include "oops/oop.inline.hpp"
29 #include "runtime/handles.inline.hpp"
30 #include "runtime/sharedRuntime.hpp"
31 #include "vmreg_aarch64.inline.hpp"
32
33 jint CodeInstaller::pd_next_offset(NativeInstruction* inst, jint pc_offset, JVMCIObject method, JVMCI_TRAPS) {
34 if (inst->is_call() || inst->is_jump() || inst->is_blr()) {
35 return pc_offset + NativeCall::instruction_size;
36 } else if (inst->is_general_jump()) {
37 return pc_offset + NativeGeneralJump::instruction_size;
38 } else if (NativeInstruction::is_adrp_at((address)inst)) {
39 // adrp; add; blr
40 return pc_offset + 3 * NativeInstruction::instruction_size;
41 } else {
42 JVMCI_ERROR_0("unsupported type of instruction for call site");
43 }
|