Skip to content

Commit 7a194d3

Browse files
ZeaveeDoug Simon
authored and
Doug Simon
committedOct 7, 2022
8290154: [JVMCI] partially implement JVMCI for RISC-V
Reviewed-by: ihse, dnsimon, yadongwang
1 parent b38bed6 commit 7a194d3

20 files changed

+1722
-22
lines changed
 

‎make/autoconf/jvm-features.m4

+2
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JVMCI],
275275
AC_MSG_RESULT([yes])
276276
elif test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
277277
AC_MSG_RESULT([yes])
278+
elif test "x$OPENJDK_TARGET_CPU" = "xriscv64"; then
279+
AC_MSG_RESULT([yes])
278280
else
279281
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU])
280282
AVAILABLE=false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
/*
2+
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
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+
25+
#include "precompiled.hpp"
26+
#include "asm/macroAssembler.hpp"
27+
#include "jvmci/jvmci.hpp"
28+
#include "jvmci/jvmciCodeInstaller.hpp"
29+
#include "jvmci/jvmciRuntime.hpp"
30+
#include "jvmci/jvmciCompilerToVM.hpp"
31+
#include "jvmci/jvmciJavaClasses.hpp"
32+
#include "oops/oop.inline.hpp"
33+
#include "runtime/handles.inline.hpp"
34+
#include "runtime/jniHandles.hpp"
35+
#include "runtime/sharedRuntime.hpp"
36+
#include "vmreg_riscv.inline.hpp"
37+
38+
jint CodeInstaller::pd_next_offset(NativeInstruction* inst, jint pc_offset, JVMCI_TRAPS) {
39+
address pc = (address) inst;
40+
if (inst->is_call()) {
41+
return pc_offset + NativeCall::instruction_size;
42+
} else if (inst->is_jump()) {
43+
return pc_offset + NativeJump::instruction_size;
44+
} else if (inst->is_movptr()) {
45+
return pc_offset + NativeMovConstReg::movptr_instruction_size;
46+
} else {
47+
JVMCI_ERROR_0("unsupported type of instruction for call site");
48+
}
49+
}
50+
51+
void CodeInstaller::pd_patch_OopConstant(int pc_offset, Handle& obj, bool compressed, JVMCI_TRAPS) {
52+
address pc = _instructions->start() + pc_offset;
53+
jobject value = JNIHandles::make_local(obj());
54+
MacroAssembler::patch_oop(pc, cast_from_oop<address>(obj()));
55+
int oop_index = _oop_recorder->find_index(value);
56+
RelocationHolder rspec = oop_Relocation::spec(oop_index);
57+
_instructions->relocate(pc, rspec);
58+
}
59+
60+
void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, HotSpotCompiledCodeStream* stream, u1 tag, JVMCI_TRAPS) {
61+
address pc = _instructions->start() + pc_offset;
62+
if (tag == PATCH_NARROW_KLASS) {
63+
narrowKlass narrowOop = record_narrow_metadata_reference(_instructions, pc, stream, tag, JVMCI_CHECK);
64+
MacroAssembler::pd_patch_instruction_size(pc, (address) (long) narrowOop);
65+
JVMCI_event_3("relocating (narrow metaspace constant) at " PTR_FORMAT "/0x%x", p2i(pc), narrowOop);
66+
} else {
67+
NativeMovConstReg* move = nativeMovConstReg_at(pc);
68+
void* reference = record_metadata_reference(_instructions, pc, stream, tag, JVMCI_CHECK);
69+
move->set_data((intptr_t) reference);
70+
JVMCI_event_3("relocating (metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(reference));
71+
}
72+
}
73+
74+
void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset, JVMCI_TRAPS) {
75+
address pc = _instructions->start() + pc_offset;
76+
address dest = _constants->start() + data_offset;
77+
_instructions->relocate(pc, section_word_Relocation::spec((address) dest, CodeBuffer::SECT_CONSTS));
78+
JVMCI_event_3("relocating at " PTR_FORMAT " (+%d) with destination at %d", p2i(pc), pc_offset, data_offset);
79+
}
80+
81+
void CodeInstaller::pd_relocate_ForeignCall(NativeInstruction* inst, jlong foreign_call_destination, JVMCI_TRAPS) {
82+
address pc = (address) inst;
83+
if (inst->is_jal()) {
84+
NativeCall* call = nativeCall_at(pc);
85+
call->set_destination((address) foreign_call_destination);
86+
_instructions->relocate(call->instruction_address(), runtime_call_Relocation::spec());
87+
} else if (inst->is_jump()) {
88+
NativeJump* jump = nativeJump_at(pc);
89+
jump->set_jump_destination((address) foreign_call_destination);
90+
_instructions->relocate(jump->instruction_address(), runtime_call_Relocation::spec());
91+
} else if (inst->is_movptr()) {
92+
NativeMovConstReg* movptr = nativeMovConstReg_at(pc);
93+
movptr->set_data((intptr_t) foreign_call_destination);
94+
_instructions->relocate(movptr->instruction_address(), runtime_call_Relocation::spec());
95+
} else {
96+
JVMCI_ERROR("unknown call or jump instruction at " PTR_FORMAT, p2i(pc));
97+
}
98+
JVMCI_event_3("relocating (foreign call) at " PTR_FORMAT, p2i(inst));
99+
}
100+
101+
void CodeInstaller::pd_relocate_JavaMethod(CodeBuffer &cbuf, methodHandle& method, jint pc_offset, JVMCI_TRAPS) {
102+
Unimplemented();
103+
}
104+
105+
void CodeInstaller::pd_relocate_poll(address pc, jint mark, JVMCI_TRAPS) {
106+
Unimplemented();
107+
}
108+
109+
// convert JVMCI register indices (as used in oop maps) to HotSpot registers
110+
VMReg CodeInstaller::get_hotspot_reg(jint jvmci_reg, JVMCI_TRAPS) {
111+
if (jvmci_reg < Register::number_of_registers) {
112+
return as_Register(jvmci_reg)->as_VMReg();
113+
} else {
114+
jint floatRegisterNumber = jvmci_reg - Register::number_of_registers;
115+
if (floatRegisterNumber >= 0 && floatRegisterNumber < FloatRegister::number_of_registers) {
116+
return as_FloatRegister(floatRegisterNumber)->as_VMReg();
117+
}
118+
JVMCI_ERROR_NULL("invalid register number: %d", jvmci_reg);
119+
}
120+
}
121+
122+
bool CodeInstaller::is_general_purpose_reg(VMReg hotspotRegister) {
123+
return !(hotspotRegister->is_FloatRegister() || hotspotRegister->is_VectorRegister());
124+
}

‎src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp

+79
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@
5656
#include "adfiles/ad_riscv.hpp"
5757
#include "opto/runtime.hpp"
5858
#endif
59+
#if INCLUDE_JVMCI
60+
#include "jvmci/jvmciJavaClasses.hpp"
61+
#endif
5962

6063
#define __ masm->
6164

@@ -208,6 +211,9 @@ void RegisterSaver::restore_live_registers(MacroAssembler* masm) {
208211
#ifdef COMPILER2
209212
__ pop_CPU_state(_save_vectors, Matcher::scalable_vector_reg_size(T_BYTE));
210213
#else
214+
#if !INCLUDE_JVMCI
215+
assert(!_save_vectors, "vectors are generated only by C2 and JVMCI");
216+
#endif
211217
__ pop_CPU_state(_save_vectors);
212218
#endif
213219
__ leave();
@@ -493,6 +499,18 @@ void SharedRuntime::gen_i2c_adapter(MacroAssembler *masm,
493499
// Pre-load the register-jump target early, to schedule it better.
494500
__ ld(t1, Address(xmethod, in_bytes(Method::from_compiled_offset())));
495501

502+
#if INCLUDE_JVMCI
503+
if (EnableJVMCI) {
504+
// check if this call should be routed towards a specific entry point
505+
__ ld(t0, Address(xthread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())));
506+
Label no_alternative_target;
507+
__ beqz(t0, no_alternative_target);
508+
__ mv(t1, t0);
509+
__ sd(zr, Address(xthread, in_bytes(JavaThread::jvmci_alternate_call_target_offset())));
510+
__ bind(no_alternative_target);
511+
}
512+
#endif // INCLUDE_JVMCI
513+
496514
// Now generate the shuffle code.
497515
for (int i = 0; i < total_args_passed; i++) {
498516
if (sig_bt[i] == T_VOID) {
@@ -1675,6 +1693,11 @@ void SharedRuntime::generate_deopt_blob() {
16751693
ResourceMark rm;
16761694
// Setup code generation tools
16771695
int pad = 0;
1696+
#if INCLUDE_JVMCI
1697+
if (EnableJVMCI) {
1698+
pad += 512; // Increase the buffer size when compiling for JVMCI
1699+
}
1700+
#endif
16781701
CodeBuffer buffer("deopt_blob", 2048 + pad, 1024);
16791702
MacroAssembler* masm = new MacroAssembler(&buffer);
16801703
int frame_size_in_words = -1;
@@ -1726,6 +1749,12 @@ void SharedRuntime::generate_deopt_blob() {
17261749
__ j(cont);
17271750

17281751
int reexecute_offset = __ pc() - start;
1752+
#if INCLUDE_JVMCI && !defined(COMPILER1)
1753+
if (EnableJVMCI && UseJVMCICompiler) {
1754+
// JVMCI does not use this kind of deoptimization
1755+
__ should_not_reach_here();
1756+
}
1757+
#endif
17291758

17301759
// Reexecute case
17311760
// return address is the pc describes what bci to do re-execute at
@@ -1736,6 +1765,44 @@ void SharedRuntime::generate_deopt_blob() {
17361765
__ mvw(xcpool, Deoptimization::Unpack_reexecute); // callee-saved
17371766
__ j(cont);
17381767

1768+
#if INCLUDE_JVMCI
1769+
Label after_fetch_unroll_info_call;
1770+
int implicit_exception_uncommon_trap_offset = 0;
1771+
int uncommon_trap_offset = 0;
1772+
1773+
if (EnableJVMCI) {
1774+
implicit_exception_uncommon_trap_offset = __ pc() - start;
1775+
1776+
__ ld(ra, Address(xthread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())));
1777+
__ sd(zr, Address(xthread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())));
1778+
1779+
uncommon_trap_offset = __ pc() - start;
1780+
1781+
// Save everything in sight.
1782+
reg_saver.save_live_registers(masm, 0, &frame_size_in_words);
1783+
// fetch_unroll_info needs to call last_java_frame()
1784+
Label retaddr;
1785+
__ set_last_Java_frame(sp, noreg, retaddr, t0);
1786+
1787+
__ lw(c_rarg1, Address(xthread, in_bytes(JavaThread::pending_deoptimization_offset())));
1788+
__ mvw(t0, -1);
1789+
__ sw(t0, Address(xthread, in_bytes(JavaThread::pending_deoptimization_offset())));
1790+
1791+
__ mvw(xcpool, (int32_t)Deoptimization::Unpack_reexecute);
1792+
__ mv(c_rarg0, xthread);
1793+
__ orrw(c_rarg2, zr, xcpool); // exec mode
1794+
int32_t offset = 0;
1795+
__ la_patchable(t0, RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap)), offset);
1796+
__ jalr(x1, t0, offset);
1797+
__ bind(retaddr);
1798+
oop_maps->add_gc_map( __ pc()-start, map->deep_copy());
1799+
1800+
__ reset_last_Java_frame(false);
1801+
1802+
__ j(after_fetch_unroll_info_call);
1803+
} // EnableJVMCI
1804+
#endif // INCLUDE_JVMCI
1805+
17391806
int exception_offset = __ pc() - start;
17401807

17411808
// Prolog for exception case
@@ -1829,6 +1896,12 @@ void SharedRuntime::generate_deopt_blob() {
18291896

18301897
__ reset_last_Java_frame(false);
18311898

1899+
#if INCLUDE_JVMCI
1900+
if (EnableJVMCI) {
1901+
__ bind(after_fetch_unroll_info_call);
1902+
}
1903+
#endif
1904+
18321905
// Load UnrollBlock* into x15
18331906
__ mv(x15, x10);
18341907

@@ -1984,6 +2057,12 @@ void SharedRuntime::generate_deopt_blob() {
19842057
_deopt_blob = DeoptimizationBlob::create(&buffer, oop_maps, 0, exception_offset, reexecute_offset, frame_size_in_words);
19852058
assert(_deopt_blob != NULL, "create deoptimization blob fail!");
19862059
_deopt_blob->set_unpack_with_exception_in_tls_offset(exception_in_tls_offset);
2060+
#if INCLUDE_JVMCI
2061+
if (EnableJVMCI) {
2062+
_deopt_blob->set_uncommon_trap_offset(uncommon_trap_offset);
2063+
_deopt_blob->set_implicit_exception_uncommon_trap_offset(implicit_exception_uncommon_trap_offset);
2064+
}
2065+
#endif
19872066
}
19882067

19892068
// Number of stack slots between incoming argument block and the start of
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
/*
2+
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
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+
package jdk.vm.ci.hotspot.riscv64;
24+
25+
import static java.util.Collections.emptyMap;
26+
import static jdk.vm.ci.common.InitTimer.timer;
27+
28+
import java.util.EnumSet;
29+
import java.util.Map;
30+
31+
import jdk.vm.ci.riscv64.RISCV64;
32+
import jdk.vm.ci.riscv64.RISCV64.CPUFeature;
33+
import jdk.vm.ci.code.Architecture;
34+
import jdk.vm.ci.code.RegisterConfig;
35+
import jdk.vm.ci.code.TargetDescription;
36+
import jdk.vm.ci.code.stack.StackIntrospection;
37+
import jdk.vm.ci.common.InitTimer;
38+
import jdk.vm.ci.hotspot.HotSpotCodeCacheProvider;
39+
import jdk.vm.ci.hotspot.HotSpotConstantReflectionProvider;
40+
import jdk.vm.ci.hotspot.HotSpotJVMCIBackendFactory;
41+
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
42+
import jdk.vm.ci.hotspot.HotSpotMetaAccessProvider;
43+
import jdk.vm.ci.hotspot.HotSpotStackIntrospection;
44+
import jdk.vm.ci.meta.ConstantReflectionProvider;
45+
import jdk.vm.ci.runtime.JVMCIBackend;
46+
47+
public class RISCV64HotSpotJVMCIBackendFactory implements HotSpotJVMCIBackendFactory {
48+
49+
private static EnumSet<RISCV64.CPUFeature> computeFeatures(RISCV64HotSpotVMConfig config) {
50+
// Configure the feature set using the HotSpot flag settings.
51+
Map<String, Long> constants = config.getStore().getConstants();
52+
return HotSpotJVMCIBackendFactory.convertFeatures(CPUFeature.class, constants, config.vmVersionFeatures, emptyMap());
53+
}
54+
55+
private static EnumSet<RISCV64.Flag> computeFlags(RISCV64HotSpotVMConfig config) {
56+
EnumSet<RISCV64.Flag> flags = EnumSet.noneOf(RISCV64.Flag.class);
57+
58+
if (config.useConservativeFence) {
59+
flags.add(RISCV64.Flag.UseConservativeFence);
60+
}
61+
if (config.avoidUnalignedAccesses) {
62+
flags.add(RISCV64.Flag.AvoidUnalignedAccesses);
63+
}
64+
if (config.nearCpool) {
65+
flags.add(RISCV64.Flag.NearCpool);
66+
}
67+
if (config.traceTraps) {
68+
flags.add(RISCV64.Flag.TraceTraps);
69+
}
70+
if (config.useRVV) {
71+
flags.add(RISCV64.Flag.UseRVV);
72+
}
73+
if (config.useRVC) {
74+
flags.add(RISCV64.Flag.UseRVC);
75+
}
76+
if (config.useZba) {
77+
flags.add(RISCV64.Flag.UseZba);
78+
}
79+
if (config.useZbb) {
80+
flags.add(RISCV64.Flag.UseZbb);
81+
}
82+
if (config.useRVVForBigIntegerShiftIntrinsics) {
83+
flags.add(RISCV64.Flag.UseRVVForBigIntegerShiftIntrinsics);
84+
}
85+
86+
return flags;
87+
}
88+
89+
private static TargetDescription createTarget(RISCV64HotSpotVMConfig config) {
90+
final int stackFrameAlignment = 16;
91+
final int implicitNullCheckLimit = 4096;
92+
final boolean inlineObjects = true;
93+
Architecture arch = new RISCV64(computeFeatures(config), computeFlags(config));
94+
return new TargetDescription(arch, true, stackFrameAlignment, implicitNullCheckLimit, inlineObjects);
95+
}
96+
97+
protected HotSpotConstantReflectionProvider createConstantReflection(HotSpotJVMCIRuntime runtime) {
98+
return new HotSpotConstantReflectionProvider(runtime);
99+
}
100+
101+
private static RegisterConfig createRegisterConfig(RISCV64HotSpotVMConfig config, TargetDescription target) {
102+
return new RISCV64HotSpotRegisterConfig(target, config.useCompressedOops, config.linuxOs);
103+
}
104+
105+
protected HotSpotCodeCacheProvider createCodeCache(HotSpotJVMCIRuntime runtime, TargetDescription target, RegisterConfig regConfig) {
106+
return new HotSpotCodeCacheProvider(runtime, target, regConfig);
107+
}
108+
109+
protected HotSpotMetaAccessProvider createMetaAccess(HotSpotJVMCIRuntime runtime) {
110+
return new HotSpotMetaAccessProvider(runtime);
111+
}
112+
113+
@Override
114+
public String getArchitecture() {
115+
return "riscv64";
116+
}
117+
118+
@Override
119+
public String toString() {
120+
return "JVMCIBackend:" + getArchitecture();
121+
}
122+
123+
@Override
124+
@SuppressWarnings("try")
125+
public JVMCIBackend createJVMCIBackend(HotSpotJVMCIRuntime runtime, JVMCIBackend host) {
126+
assert host == null;
127+
RISCV64HotSpotVMConfig config = new RISCV64HotSpotVMConfig(runtime.getConfigStore());
128+
TargetDescription target = createTarget(config);
129+
130+
RegisterConfig regConfig;
131+
HotSpotCodeCacheProvider codeCache;
132+
ConstantReflectionProvider constantReflection;
133+
HotSpotMetaAccessProvider metaAccess;
134+
StackIntrospection stackIntrospection;
135+
try (InitTimer t = timer("create providers")) {
136+
try (InitTimer rt = timer("create MetaAccess provider")) {
137+
metaAccess = createMetaAccess(runtime);
138+
}
139+
try (InitTimer rt = timer("create RegisterConfig")) {
140+
regConfig = createRegisterConfig(config, target);
141+
}
142+
try (InitTimer rt = timer("create CodeCache provider")) {
143+
codeCache = createCodeCache(runtime, target, regConfig);
144+
}
145+
try (InitTimer rt = timer("create ConstantReflection provider")) {
146+
constantReflection = createConstantReflection(runtime);
147+
}
148+
try (InitTimer rt = timer("create StackIntrospection provider")) {
149+
stackIntrospection = new HotSpotStackIntrospection(runtime);
150+
}
151+
}
152+
try (InitTimer rt = timer("instantiate backend")) {
153+
return createBackend(metaAccess, codeCache, constantReflection, stackIntrospection);
154+
}
155+
}
156+
157+
protected JVMCIBackend createBackend(HotSpotMetaAccessProvider metaAccess, HotSpotCodeCacheProvider codeCache, ConstantReflectionProvider constantReflection,
158+
StackIntrospection stackIntrospection) {
159+
return new JVMCIBackend(metaAccess, codeCache, constantReflection, stackIntrospection);
160+
}
161+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,303 @@
1+
/*
2+
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
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+
package jdk.vm.ci.hotspot.riscv64;
24+
25+
import static jdk.vm.ci.riscv64.RISCV64.x0;
26+
import static jdk.vm.ci.riscv64.RISCV64.x1;
27+
import static jdk.vm.ci.riscv64.RISCV64.x2;
28+
import static jdk.vm.ci.riscv64.RISCV64.x3;
29+
import static jdk.vm.ci.riscv64.RISCV64.x4;
30+
import static jdk.vm.ci.riscv64.RISCV64.x5;
31+
import static jdk.vm.ci.riscv64.RISCV64.x6;
32+
import static jdk.vm.ci.riscv64.RISCV64.x7;
33+
import static jdk.vm.ci.riscv64.RISCV64.x8;
34+
import static jdk.vm.ci.riscv64.RISCV64.x10;
35+
import static jdk.vm.ci.riscv64.RISCV64.x11;
36+
import static jdk.vm.ci.riscv64.RISCV64.x12;
37+
import static jdk.vm.ci.riscv64.RISCV64.x13;
38+
import static jdk.vm.ci.riscv64.RISCV64.x14;
39+
import static jdk.vm.ci.riscv64.RISCV64.x15;
40+
import static jdk.vm.ci.riscv64.RISCV64.x16;
41+
import static jdk.vm.ci.riscv64.RISCV64.x17;
42+
import static jdk.vm.ci.riscv64.RISCV64.x23;
43+
import static jdk.vm.ci.riscv64.RISCV64.x27;
44+
import static jdk.vm.ci.riscv64.RISCV64.f10;
45+
import static jdk.vm.ci.riscv64.RISCV64.f11;
46+
import static jdk.vm.ci.riscv64.RISCV64.f12;
47+
import static jdk.vm.ci.riscv64.RISCV64.f13;
48+
import static jdk.vm.ci.riscv64.RISCV64.f14;
49+
import static jdk.vm.ci.riscv64.RISCV64.f15;
50+
import static jdk.vm.ci.riscv64.RISCV64.f16;
51+
import static jdk.vm.ci.riscv64.RISCV64.f17;
52+
53+
import java.util.ArrayList;
54+
import java.util.HashSet;
55+
import java.util.List;
56+
import java.util.Set;
57+
58+
import jdk.vm.ci.riscv64.RISCV64;
59+
import jdk.vm.ci.code.Architecture;
60+
import jdk.vm.ci.code.CallingConvention;
61+
import jdk.vm.ci.code.CallingConvention.Type;
62+
import jdk.vm.ci.code.Register;
63+
import jdk.vm.ci.code.RegisterArray;
64+
import jdk.vm.ci.code.RegisterAttributes;
65+
import jdk.vm.ci.code.RegisterConfig;
66+
import jdk.vm.ci.code.StackSlot;
67+
import jdk.vm.ci.code.TargetDescription;
68+
import jdk.vm.ci.code.ValueKindFactory;
69+
import jdk.vm.ci.common.JVMCIError;
70+
import jdk.vm.ci.hotspot.HotSpotCallingConventionType;
71+
import jdk.vm.ci.meta.AllocatableValue;
72+
import jdk.vm.ci.meta.JavaKind;
73+
import jdk.vm.ci.meta.JavaType;
74+
import jdk.vm.ci.meta.PlatformKind;
75+
import jdk.vm.ci.meta.Value;
76+
import jdk.vm.ci.meta.ValueKind;
77+
78+
public class RISCV64HotSpotRegisterConfig implements RegisterConfig {
79+
80+
private final TargetDescription target;
81+
82+
private final RegisterArray allocatable;
83+
84+
/**
85+
* The caller saved registers always include all parameter registers.
86+
*/
87+
private final RegisterArray callerSaved;
88+
89+
private final boolean allAllocatableAreCallerSaved;
90+
91+
private final RegisterAttributes[] attributesMap;
92+
93+
@Override
94+
public RegisterArray getAllocatableRegisters() {
95+
return allocatable;
96+
}
97+
98+
@Override
99+
public RegisterArray filterAllocatableRegisters(PlatformKind kind, RegisterArray registers) {
100+
ArrayList<Register> list = new ArrayList<>();
101+
for (Register reg : registers) {
102+
if (target.arch.canStoreValue(reg.getRegisterCategory(), kind)) {
103+
list.add(reg);
104+
}
105+
}
106+
107+
return new RegisterArray(list);
108+
}
109+
110+
@Override
111+
public RegisterAttributes[] getAttributesMap() {
112+
return attributesMap.clone();
113+
}
114+
115+
private final RegisterArray javaGeneralParameterRegisters = new RegisterArray(x11, x12, x13, x14, x15, x16, x17, x10);
116+
private final RegisterArray nativeGeneralParameterRegisters = new RegisterArray(x10, x11, x12, x13, x14, x15, x16, x17);
117+
private final RegisterArray fpParameterRegisters = new RegisterArray(f10, f11, f12, f13, f14, f15, f16, f17);
118+
119+
public static final Register zero = x0;
120+
public static final Register ra = x1;
121+
public static final Register sp = x2;
122+
public static final Register gp = x3;
123+
public static final Register tp = x4;
124+
public static final Register t0 = x5;
125+
public static final Register t1 = x6;
126+
public static final Register t2 = x7;
127+
public static final Register fp = x8;
128+
public static final Register threadRegister = x23;
129+
public static final Register heapBaseRegister = x27;
130+
131+
private static final RegisterArray reservedRegisters = new RegisterArray(zero, ra, sp, gp, tp, t0, t1, t2, fp);
132+
133+
private static RegisterArray initAllocatable(Architecture arch, boolean reserveForHeapBase) {
134+
RegisterArray allRegisters = arch.getAvailableValueRegisters();
135+
Register[] registers = new Register[allRegisters.size() - reservedRegisters.size() - (reserveForHeapBase ? 1 : 0)];
136+
List<Register> reservedRegistersList = reservedRegisters.asList();
137+
138+
int idx = 0;
139+
for (Register reg : allRegisters) {
140+
if (reservedRegistersList.contains(reg)) {
141+
// skip reserved registers
142+
continue;
143+
}
144+
assert !(reg.equals(zero) || reg.equals(ra) || reg.equals(sp) || reg.equals(gp) || reg.equals(tp) ||
145+
reg.equals(t0) || reg.equals(t1) || reg.equals(t2) || reg.equals(fp));
146+
if (reserveForHeapBase && reg.equals(heapBaseRegister)) {
147+
// skip heap base register
148+
continue;
149+
}
150+
151+
registers[idx++] = reg;
152+
}
153+
154+
assert idx == registers.length;
155+
return new RegisterArray(registers);
156+
}
157+
158+
public RISCV64HotSpotRegisterConfig(TargetDescription target, boolean useCompressedOops, boolean linuxOs) {
159+
this(target, initAllocatable(target.arch, useCompressedOops));
160+
assert callerSaved.size() >= allocatable.size();
161+
}
162+
163+
public RISCV64HotSpotRegisterConfig(TargetDescription target, RegisterArray allocatable) {
164+
this.target = target;
165+
this.allocatable = allocatable;
166+
167+
Set<Register> callerSaveSet = new HashSet<>();
168+
allocatable.addTo(callerSaveSet);
169+
fpParameterRegisters.addTo(callerSaveSet);
170+
javaGeneralParameterRegisters.addTo(callerSaveSet);
171+
nativeGeneralParameterRegisters.addTo(callerSaveSet);
172+
callerSaved = new RegisterArray(callerSaveSet);
173+
174+
allAllocatableAreCallerSaved = true;
175+
attributesMap = RegisterAttributes.createMap(this, RISCV64.allRegisters);
176+
}
177+
178+
@Override
179+
public RegisterArray getCallerSaveRegisters() {
180+
return callerSaved;
181+
}
182+
183+
@Override
184+
public RegisterArray getCalleeSaveRegisters() {
185+
return null;
186+
}
187+
188+
@Override
189+
public boolean areAllAllocatableRegistersCallerSaved() {
190+
return allAllocatableAreCallerSaved;
191+
}
192+
193+
@Override
194+
public CallingConvention getCallingConvention(Type type, JavaType returnType, JavaType[] parameterTypes, ValueKindFactory<?> valueKindFactory) {
195+
HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
196+
if (type == HotSpotCallingConventionType.NativeCall) {
197+
return callingConvention(nativeGeneralParameterRegisters, returnType, parameterTypes, hotspotType, valueKindFactory);
198+
}
199+
return callingConvention(javaGeneralParameterRegisters, returnType, parameterTypes, hotspotType, valueKindFactory);
200+
}
201+
202+
@Override
203+
public RegisterArray getCallingConventionRegisters(Type type, JavaKind kind) {
204+
HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
205+
switch (kind) {
206+
case Boolean:
207+
case Byte:
208+
case Short:
209+
case Char:
210+
case Int:
211+
case Long:
212+
case Object:
213+
return hotspotType == HotSpotCallingConventionType.NativeCall ? nativeGeneralParameterRegisters : javaGeneralParameterRegisters;
214+
case Float:
215+
case Double:
216+
return fpParameterRegisters;
217+
default:
218+
throw JVMCIError.shouldNotReachHere();
219+
}
220+
}
221+
222+
private CallingConvention callingConvention(RegisterArray generalParameterRegisters, JavaType returnType, JavaType[] parameterTypes, HotSpotCallingConventionType type,
223+
ValueKindFactory<?> valueKindFactory) {
224+
AllocatableValue[] locations = new AllocatableValue[parameterTypes.length];
225+
226+
int currentGeneral = 0;
227+
int currentFP = 0;
228+
int currentStackOffset = 0;
229+
230+
for (int i = 0; i < parameterTypes.length; i++) {
231+
final JavaKind kind = parameterTypes[i].getJavaKind().getStackKind();
232+
233+
switch (kind) {
234+
case Byte:
235+
case Boolean:
236+
case Short:
237+
case Char:
238+
case Int:
239+
case Long:
240+
case Object:
241+
if (currentGeneral < generalParameterRegisters.size()) {
242+
Register register = generalParameterRegisters.get(currentGeneral++);
243+
locations[i] = register.asValue(valueKindFactory.getValueKind(kind));
244+
}
245+
break;
246+
case Float:
247+
case Double:
248+
if (currentFP < fpParameterRegisters.size()) {
249+
Register register = fpParameterRegisters.get(currentFP++);
250+
locations[i] = register.asValue(valueKindFactory.getValueKind(kind));
251+
} else if (currentGeneral < generalParameterRegisters.size()) {
252+
Register register = generalParameterRegisters.get(currentGeneral++);
253+
locations[i] = register.asValue(valueKindFactory.getValueKind(kind));
254+
}
255+
break;
256+
default:
257+
throw JVMCIError.shouldNotReachHere();
258+
}
259+
260+
if (locations[i] == null) {
261+
ValueKind<?> valueKind = valueKindFactory.getValueKind(kind);
262+
locations[i] = StackSlot.get(valueKind, currentStackOffset, !type.out);
263+
currentStackOffset += Math.max(valueKind.getPlatformKind().getSizeInBytes(), target.wordSize);
264+
}
265+
}
266+
267+
JavaKind returnKind = returnType == null ? JavaKind.Void : returnType.getJavaKind();
268+
AllocatableValue returnLocation = returnKind == JavaKind.Void ? Value.ILLEGAL : getReturnRegister(returnKind).asValue(valueKindFactory.getValueKind(returnKind.getStackKind()));
269+
return new CallingConvention(currentStackOffset, returnLocation, locations);
270+
}
271+
272+
@Override
273+
public Register getReturnRegister(JavaKind kind) {
274+
switch (kind) {
275+
case Boolean:
276+
case Byte:
277+
case Char:
278+
case Short:
279+
case Int:
280+
case Long:
281+
case Object:
282+
return x10;
283+
case Float:
284+
case Double:
285+
return f10;
286+
case Void:
287+
case Illegal:
288+
return null;
289+
default:
290+
throw new UnsupportedOperationException("no return register for type " + kind);
291+
}
292+
}
293+
294+
@Override
295+
public Register getFrameRegister() {
296+
return x2;
297+
}
298+
299+
@Override
300+
public String toString() {
301+
return String.format("Allocatable: " + getAllocatableRegisters() + "%n" + "CallerSave: " + getCallerSaveRegisters() + "%n");
302+
}
303+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
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+
package jdk.vm.ci.hotspot.riscv64;
24+
25+
import jdk.vm.ci.hotspot.HotSpotVMConfigAccess;
26+
import jdk.vm.ci.hotspot.HotSpotVMConfigStore;
27+
import jdk.vm.ci.services.Services;
28+
29+
/**
30+
* Used to access native configuration details.
31+
*
32+
* All non-static, public fields in this class are so that they can be compiled as constants.
33+
*/
34+
class RISCV64HotSpotVMConfig extends HotSpotVMConfigAccess {
35+
36+
RISCV64HotSpotVMConfig(HotSpotVMConfigStore config) {
37+
super(config);
38+
}
39+
40+
final boolean linuxOs = Services.getSavedProperty("os.name", "").startsWith("Linux");
41+
42+
final boolean useCompressedOops = getFlag("UseCompressedOops", Boolean.class);
43+
44+
// CPU Capabilities
45+
46+
/*
47+
* These flags are set based on the corresponding command line flags.
48+
*/
49+
final boolean useConservativeFence = getFlag("UseConservativeFence", Boolean.class);
50+
final boolean avoidUnalignedAccesses = getFlag("AvoidUnalignedAccesses", Boolean.class);
51+
final boolean nearCpool = getFlag("NearCpool", Boolean.class);
52+
final boolean traceTraps = getFlag("TraceTraps", Boolean.class);
53+
final boolean useRVV = getFlag("UseRVV", Boolean.class);
54+
final boolean useRVC = getFlag("UseRVC", Boolean.class);
55+
final boolean useZba = getFlag("UseZba", Boolean.class);
56+
final boolean useZbb = getFlag("UseZbb", Boolean.class);
57+
final boolean useRVVForBigIntegerShiftIntrinsics = getFlag("UseRVVForBigIntegerShiftIntrinsics", Boolean.class);
58+
59+
final long vmVersionFeatures = getFieldValue("Abstract_VM_Version::_features", Long.class, "uint64_t");
60+
61+
/*
62+
* These flags are set if the corresponding support is in the hardware.
63+
*/
64+
// Checkstyle: stop
65+
// CPU feature flags are currently not available in VM_Version
66+
// Checkstyle: resume
67+
68+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
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+
/**
25+
* The RISCV64 HotSpot specific portions of the JVMCI API.
26+
*/
27+
package jdk.vm.ci.hotspot.riscv64;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
/*
2+
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
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+
package jdk.vm.ci.riscv64;
24+
25+
import java.nio.ByteOrder;
26+
import java.util.EnumSet;
27+
28+
import jdk.vm.ci.code.Architecture;
29+
import jdk.vm.ci.code.CPUFeatureName;
30+
import jdk.vm.ci.code.Register;
31+
import jdk.vm.ci.code.Register.RegisterCategory;
32+
import jdk.vm.ci.code.RegisterArray;
33+
import jdk.vm.ci.meta.JavaKind;
34+
import jdk.vm.ci.meta.PlatformKind;
35+
36+
/**
37+
* Represents the RISCV64 architecture.
38+
*/
39+
public class RISCV64 extends Architecture {
40+
41+
public static final RegisterCategory CPU = new RegisterCategory("CPU");
42+
43+
// General purpose CPU registers
44+
public static final Register x0 = new Register(0, 0, "x0", CPU);
45+
public static final Register x1 = new Register(1, 1, "x1", CPU);
46+
public static final Register x2 = new Register(2, 2, "x2", CPU);
47+
public static final Register x3 = new Register(3, 3, "x3", CPU);
48+
public static final Register x4 = new Register(4, 4, "x4", CPU);
49+
public static final Register x5 = new Register(5, 5, "x5", CPU);
50+
public static final Register x6 = new Register(6, 6, "x6", CPU);
51+
public static final Register x7 = new Register(7, 7, "x7", CPU);
52+
public static final Register x8 = new Register(8, 8, "x8", CPU);
53+
public static final Register x9 = new Register(9, 9, "x9", CPU);
54+
public static final Register x10 = new Register(10, 10, "x10", CPU);
55+
public static final Register x11 = new Register(11, 11, "x11", CPU);
56+
public static final Register x12 = new Register(12, 12, "x12", CPU);
57+
public static final Register x13 = new Register(13, 13, "x13", CPU);
58+
public static final Register x14 = new Register(14, 14, "x14", CPU);
59+
public static final Register x15 = new Register(15, 15, "x15", CPU);
60+
public static final Register x16 = new Register(16, 16, "x16", CPU);
61+
public static final Register x17 = new Register(17, 17, "x17", CPU);
62+
public static final Register x18 = new Register(18, 18, "x18", CPU);
63+
public static final Register x19 = new Register(19, 19, "x19", CPU);
64+
public static final Register x20 = new Register(20, 20, "x20", CPU);
65+
public static final Register x21 = new Register(21, 21, "x21", CPU);
66+
public static final Register x22 = new Register(22, 22, "x22", CPU);
67+
public static final Register x23 = new Register(23, 23, "x23", CPU);
68+
public static final Register x24 = new Register(24, 24, "x24", CPU);
69+
public static final Register x25 = new Register(25, 25, "x25", CPU);
70+
public static final Register x26 = new Register(26, 26, "x26", CPU);
71+
public static final Register x27 = new Register(27, 27, "x27", CPU);
72+
public static final Register x28 = new Register(28, 28, "x28", CPU);
73+
public static final Register x29 = new Register(29, 29, "x29", CPU);
74+
public static final Register x30 = new Register(30, 30, "x30", CPU);
75+
public static final Register x31 = new Register(31, 31, "x31", CPU);
76+
77+
// @formatter:off
78+
public static final RegisterArray cpuRegisters = new RegisterArray(
79+
x0, x1, x2, x3, x4, x5, x6, x7,
80+
x8, x9, x10, x11, x12, x13, x14, x15,
81+
x16, x17, x18, x19, x20, x21, x22, x23,
82+
x24, x25, x26, x27, x28, x29, x30, x31
83+
);
84+
// @formatter:on
85+
86+
public static final RegisterCategory FP = new RegisterCategory("FP");
87+
88+
// Simd registers
89+
public static final Register f0 = new Register(32, 0, "f0", FP);
90+
public static final Register f1 = new Register(33, 1, "f1", FP);
91+
public static final Register f2 = new Register(34, 2, "f2", FP);
92+
public static final Register f3 = new Register(35, 3, "f3", FP);
93+
public static final Register f4 = new Register(36, 4, "f4", FP);
94+
public static final Register f5 = new Register(37, 5, "f5", FP);
95+
public static final Register f6 = new Register(38, 6, "f6", FP);
96+
public static final Register f7 = new Register(39, 7, "f7", FP);
97+
public static final Register f8 = new Register(40, 8, "f8", FP);
98+
public static final Register f9 = new Register(41, 9, "f9", FP);
99+
public static final Register f10 = new Register(42, 10, "f10", FP);
100+
public static final Register f11 = new Register(43, 11, "f11", FP);
101+
public static final Register f12 = new Register(44, 12, "f12", FP);
102+
public static final Register f13 = new Register(45, 13, "f13", FP);
103+
public static final Register f14 = new Register(46, 14, "f14", FP);
104+
public static final Register f15 = new Register(47, 15, "f15", FP);
105+
public static final Register f16 = new Register(48, 16, "f16", FP);
106+
public static final Register f17 = new Register(49, 17, "f17", FP);
107+
public static final Register f18 = new Register(50, 18, "f18", FP);
108+
public static final Register f19 = new Register(51, 19, "f19", FP);
109+
public static final Register f20 = new Register(52, 20, "f20", FP);
110+
public static final Register f21 = new Register(53, 21, "f21", FP);
111+
public static final Register f22 = new Register(54, 22, "f22", FP);
112+
public static final Register f23 = new Register(55, 23, "f23", FP);
113+
public static final Register f24 = new Register(56, 24, "f24", FP);
114+
public static final Register f25 = new Register(57, 25, "f25", FP);
115+
public static final Register f26 = new Register(58, 26, "f26", FP);
116+
public static final Register f27 = new Register(59, 27, "f27", FP);
117+
public static final Register f28 = new Register(60, 28, "f28", FP);
118+
public static final Register f29 = new Register(61, 29, "f29", FP);
119+
public static final Register f30 = new Register(62, 30, "f30", FP);
120+
public static final Register f31 = new Register(63, 31, "f31", FP);
121+
122+
// @formatter:off
123+
public static final RegisterArray fpRegisters = new RegisterArray(
124+
f0, f1, f2, f3, f4, f5, f6, f7,
125+
f8, f9, f10, f11, f12, f13, f14, f15,
126+
f16, f17, f18, f19, f20, f21, f22, f23,
127+
f24, f25, f26, f27, f28, f29, f30, f31
128+
);
129+
// @formatter:on
130+
131+
// @formatter:off
132+
public static final RegisterArray allRegisters = new RegisterArray(
133+
x0, x1, x2, x3, x4, x5, x6, x7,
134+
x8, x9, x10, x11, x12, x13, x14, x15,
135+
x16, x17, x18, x19, x20, x21, x22, x23,
136+
x24, x25, x26, x27, x28, x29, x30, x31,
137+
138+
f0, f1, f2, f3, f4, f5, f6, f7,
139+
f8, f9, f10, f11, f12, f13, f14, f15,
140+
f16, f17, f18, f19, f20, f21, f22, f23,
141+
f24, f25, f26, f27, f28, f29, f30, f31
142+
);
143+
// @formatter:on
144+
145+
/**
146+
* Basic set of CPU features mirroring what is returned from the mcpuid register. See:
147+
* {@code VM_Version::cpuFeatureFlags}.
148+
*/
149+
public enum CPUFeature implements CPUFeatureName {
150+
I,
151+
M,
152+
A,
153+
F,
154+
D,
155+
C,
156+
V
157+
}
158+
159+
private final EnumSet<CPUFeature> features;
160+
161+
/**
162+
* Set of flags to control code emission.
163+
*/
164+
public enum Flag {
165+
UseConservativeFence,
166+
AvoidUnalignedAccesses,
167+
NearCpool,
168+
TraceTraps,
169+
UseRVV,
170+
UseRVC,
171+
UseZba,
172+
UseZbb,
173+
UseRVVForBigIntegerShiftIntrinsics
174+
}
175+
176+
private final EnumSet<Flag> flags;
177+
178+
public RISCV64(EnumSet<CPUFeature> features, EnumSet<Flag> flags) {
179+
super("riscv64", RISCV64Kind.QWORD, ByteOrder.LITTLE_ENDIAN, true, allRegisters, 0, 0, 8);
180+
this.features = features;
181+
this.flags = flags;
182+
}
183+
184+
@Override
185+
public EnumSet<CPUFeature> getFeatures() {
186+
return features;
187+
}
188+
189+
public EnumSet<Flag> getFlags() {
190+
return flags;
191+
}
192+
193+
@Override
194+
public PlatformKind getPlatformKind(JavaKind javaKind) {
195+
switch (javaKind) {
196+
case Boolean:
197+
case Byte:
198+
return RISCV64Kind.BYTE;
199+
case Short:
200+
case Char:
201+
return RISCV64Kind.WORD;
202+
case Int:
203+
return RISCV64Kind.DWORD;
204+
case Long:
205+
case Object:
206+
return RISCV64Kind.QWORD;
207+
case Float:
208+
return RISCV64Kind.SINGLE;
209+
case Double:
210+
return RISCV64Kind.DOUBLE;
211+
default:
212+
return null;
213+
}
214+
}
215+
216+
@Override
217+
public boolean canStoreValue(RegisterCategory category, PlatformKind platformKind) {
218+
RISCV64Kind kind = (RISCV64Kind) platformKind;
219+
if (kind.isInteger()) {
220+
return category.equals(CPU);
221+
} else if (kind.isFP()) {
222+
return category.equals(FP);
223+
}
224+
return false;
225+
}
226+
227+
@Override
228+
public RISCV64Kind getLargestStorableKind(RegisterCategory category) {
229+
if (category.equals(CPU)) {
230+
return RISCV64Kind.QWORD;
231+
} else if (category.equals(FP)) {
232+
return RISCV64Kind.DOUBLE;
233+
} else {
234+
return null;
235+
}
236+
}
237+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
/*
2+
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
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+
package jdk.vm.ci.riscv64;
24+
25+
import jdk.vm.ci.meta.PlatformKind;
26+
27+
public enum RISCV64Kind implements PlatformKind {
28+
29+
// scalar
30+
BYTE(1),
31+
WORD(2),
32+
DWORD(4),
33+
QWORD(8),
34+
SINGLE(4),
35+
DOUBLE(8);
36+
37+
private final int size;
38+
private final int vectorLength;
39+
40+
private final RISCV64Kind scalar;
41+
private final EnumKey<RISCV64Kind> key = new EnumKey<>(this);
42+
43+
RISCV64Kind(int size) {
44+
this.size = size;
45+
this.scalar = this;
46+
this.vectorLength = 1;
47+
}
48+
49+
RISCV64Kind(int size, RISCV64Kind scalar) {
50+
this.size = size;
51+
this.scalar = scalar;
52+
53+
assert size % scalar.size == 0;
54+
this.vectorLength = size / scalar.size;
55+
}
56+
57+
public RISCV64Kind getScalar() {
58+
return scalar;
59+
}
60+
61+
@Override
62+
public int getSizeInBytes() {
63+
return size;
64+
}
65+
66+
@Override
67+
public int getVectorLength() {
68+
return vectorLength;
69+
}
70+
71+
@Override
72+
public Key getKey() {
73+
return key;
74+
}
75+
76+
public boolean isInteger() {
77+
switch (this) {
78+
case BYTE:
79+
case WORD:
80+
case DWORD:
81+
case QWORD:
82+
return true;
83+
default:
84+
return false;
85+
}
86+
}
87+
88+
public boolean isFP() {
89+
switch (this) {
90+
case SINGLE:
91+
case DOUBLE:
92+
return true;
93+
default:
94+
return false;
95+
}
96+
}
97+
98+
@Override
99+
public char getTypeChar() {
100+
switch (this) {
101+
case BYTE:
102+
return 'b';
103+
case WORD:
104+
return 'w';
105+
case DWORD:
106+
return 'd';
107+
case QWORD:
108+
return 'q';
109+
case SINGLE:
110+
return 'S';
111+
case DOUBLE:
112+
return 'D';
113+
default:
114+
return '-';
115+
}
116+
}
117+
118+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
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+
/**
25+
* The RISCV64 platform independent portions of the JVMCI API.
26+
*/
27+
package jdk.vm.ci.riscv64;

‎src/jdk.internal.vm.ci/share/classes/module-info.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@
3939

4040
provides jdk.vm.ci.hotspot.HotSpotJVMCIBackendFactory with
4141
jdk.vm.ci.hotspot.aarch64.AArch64HotSpotJVMCIBackendFactory,
42-
jdk.vm.ci.hotspot.amd64.AMD64HotSpotJVMCIBackendFactory;
42+
jdk.vm.ci.hotspot.amd64.AMD64HotSpotJVMCIBackendFactory,
43+
jdk.vm.ci.hotspot.riscv64.RISCV64HotSpotJVMCIBackendFactory;
4344
}

‎test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/CodeInstallationTest.java

+4
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@
2424

2525
import jdk.vm.ci.aarch64.AArch64;
2626
import jdk.vm.ci.amd64.AMD64;
27+
import jdk.vm.ci.riscv64.RISCV64;
2728
import jdk.vm.ci.code.Architecture;
2829
import jdk.vm.ci.code.CodeCacheProvider;
2930
import jdk.vm.ci.code.InstalledCode;
3031
import jdk.vm.ci.code.TargetDescription;
3132
import jdk.vm.ci.code.test.aarch64.AArch64TestAssembler;
3233
import jdk.vm.ci.code.test.amd64.AMD64TestAssembler;
34+
import jdk.vm.ci.code.test.riscv64.RISCV64TestAssembler;
3335
import jdk.vm.ci.hotspot.HotSpotCodeCacheProvider;
3436
import jdk.vm.ci.hotspot.HotSpotCompiledCode;
3537
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
@@ -76,6 +78,8 @@ private TestAssembler createAssembler() {
7678
return new AMD64TestAssembler(codeCache, config);
7779
} else if (arch instanceof AArch64) {
7880
return new AArch64TestAssembler(codeCache, config);
81+
} else if (arch instanceof RISCV64) {
82+
return new RISCV64TestAssembler(codeCache, config);
7983
} else {
8084
Assert.fail("unsupported architecture");
8185
return null;

‎test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
2424
/**
2525
* @test
2626
* @requires vm.jvmci
27-
* @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64"
27+
* @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64" | vm.simpleArch == "riscv64"
2828
* @library /
2929
* @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot
3030
* jdk.internal.vm.ci/jdk.vm.ci.meta
@@ -33,7 +33,8 @@
3333
* jdk.internal.vm.ci/jdk.vm.ci.runtime
3434
* jdk.internal.vm.ci/jdk.vm.ci.aarch64
3535
* jdk.internal.vm.ci/jdk.vm.ci.amd64
36-
* @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java
36+
* jdk.internal.vm.ci/jdk.vm.ci.riscv64
37+
* @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java riscv64/RISCV64TestAssembler.java
3738
* @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler jdk.vm.ci.code.test.DataPatchTest
3839
*/
3940

‎test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
2424
/**
2525
* @test
2626
* @requires vm.jvmci
27-
* @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64"
27+
* @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64" | vm.simpleArch == "riscv64"
2828
* @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot
2929
* jdk.internal.vm.ci/jdk.vm.ci.code
3030
* jdk.internal.vm.ci/jdk.vm.ci.code.site
@@ -33,7 +33,8 @@
3333
* jdk.internal.vm.ci/jdk.vm.ci.common
3434
* jdk.internal.vm.ci/jdk.vm.ci.aarch64
3535
* jdk.internal.vm.ci/jdk.vm.ci.amd64
36-
* @compile CodeInstallationTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java
36+
* jdk.internal.vm.ci/jdk.vm.ci.riscv64
37+
* @compile CodeInstallationTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java riscv64/RISCV64TestAssembler.java
3738
* @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler jdk.vm.ci.code.test.InterpreterFrameSizeTest
3839
*/
3940

‎test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
2424
/**
2525
* @test
2626
* @requires vm.jvmci
27-
* @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64"
27+
* @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64" | vm.simpleArch == "riscv64"
2828
* @library /
2929
* @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot
3030
* jdk.internal.vm.ci/jdk.vm.ci.meta
@@ -34,7 +34,8 @@
3434
* jdk.internal.vm.ci/jdk.vm.ci.runtime
3535
* jdk.internal.vm.ci/jdk.vm.ci.aarch64
3636
* jdk.internal.vm.ci/jdk.vm.ci.amd64
37-
* @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java
37+
* jdk.internal.vm.ci/jdk.vm.ci.riscv64
38+
* @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java riscv64/RISCV64TestAssembler.java
3839
* @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler jdk.vm.ci.code.test.MaxOopMapStackOffsetTest
3940
*/
4041

‎test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
2424
/**
2525
* @test
2626
* @requires vm.jvmci
27-
* @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64"
27+
* @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64" | vm.simpleArch == "riscv64"
2828
* @library /test/lib /
2929
* @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot
3030
* jdk.internal.vm.ci/jdk.vm.ci.code
@@ -34,7 +34,8 @@
3434
* jdk.internal.vm.ci/jdk.vm.ci.common
3535
* jdk.internal.vm.ci/jdk.vm.ci.aarch64
3636
* jdk.internal.vm.ci/jdk.vm.ci.amd64
37-
* @compile CodeInstallationTest.java TestHotSpotVMConfig.java NativeCallTest.java TestAssembler.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java
37+
* jdk.internal.vm.ci/jdk.vm.ci.riscv64
38+
* @compile CodeInstallationTest.java TestHotSpotVMConfig.java NativeCallTest.java TestAssembler.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java riscv64/RISCV64TestAssembler.java
3839
* @run junit/othervm/native -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Xbootclasspath/a:. jdk.vm.ci.code.test.NativeCallTest
3940
*/
4041
package jdk.vm.ci.code.test;

‎test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
2424
/**
2525
* @test
2626
* @requires vm.jvmci
27-
* @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64"
27+
* @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64" | vm.simpleArch == "riscv64"
2828
* @library /
2929
* @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot
3030
* jdk.internal.vm.ci/jdk.vm.ci.meta
@@ -33,7 +33,8 @@
3333
* jdk.internal.vm.ci/jdk.vm.ci.runtime
3434
* jdk.internal.vm.ci/jdk.vm.ci.aarch64
3535
* jdk.internal.vm.ci/jdk.vm.ci.amd64
36-
* @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java
36+
* jdk.internal.vm.ci/jdk.vm.ci.riscv64
37+
* @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java riscv64/RISCV64TestAssembler.java
3738
* @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler jdk.vm.ci.code.test.SimpleCodeInstallationTest
3839
*/
3940

‎test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
2424
/**
2525
* @test
2626
* @requires vm.jvmci
27-
* @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64"
27+
* @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64" | vm.simpleArch == "riscv64"
2828
* @library /
2929
* @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot
3030
* jdk.internal.vm.ci/jdk.vm.ci.meta
@@ -33,7 +33,8 @@
3333
* jdk.internal.vm.ci/jdk.vm.ci.runtime
3434
* jdk.internal.vm.ci/jdk.vm.ci.aarch64
3535
* jdk.internal.vm.ci/jdk.vm.ci.amd64
36-
* @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java
36+
* jdk.internal.vm.ci/jdk.vm.ci.riscv64
37+
* @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java riscv64/RISCV64TestAssembler.java
3738
* @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler jdk.vm.ci.code.test.SimpleDebugInfoTest
3839
*/
3940

‎test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
2424
/**
2525
* @test
2626
* @requires vm.jvmci
27-
* @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64"
27+
* @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64" | vm.simpleArch == "riscv64"
2828
* @library /
2929
* @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot
3030
* jdk.internal.vm.ci/jdk.vm.ci.meta
@@ -33,7 +33,8 @@
3333
* jdk.internal.vm.ci/jdk.vm.ci.runtime
3434
* jdk.internal.vm.ci/jdk.vm.ci.aarch64
3535
* jdk.internal.vm.ci/jdk.vm.ci.amd64
36-
* @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java
36+
* jdk.internal.vm.ci/jdk.vm.ci.riscv64
37+
* @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java riscv64/RISCV64TestAssembler.java
3738
* @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler jdk.vm.ci.code.test.VirtualObjectDebugInfoTest
3839
*/
3940

‎test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/riscv64/RISCV64TestAssembler.java

+542
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.