< prev index next >

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

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke


  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") & os.arch != "aarch64"
  27  * @library /
  28  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  29  *          jdk.vm.ci/jdk.vm.ci.meta
  30  *          jdk.vm.ci/jdk.vm.ci.code
  31  *          jdk.vm.ci/jdk.vm.ci.code.site
  32  *          jdk.vm.ci/jdk.vm.ci.runtime
  33  *          jdk.vm.ci/jdk.vm.ci.amd64
  34  *          jdk.vm.ci/jdk.vm.ci.sparc
  35  * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java
  36  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.DataPatchTest
  37  */
  38 
  39 package jdk.vm.ci.code.test;
  40 
  41 import org.junit.Assume;
  42 import org.junit.Test;
  43 
  44 import jdk.vm.ci.code.Register;
  45 import jdk.vm.ci.code.site.DataSectionReference;
  46 import jdk.vm.ci.hotspot.HotSpotConstant;
  47 import jdk.vm.ci.meta.ResolvedJavaType;


  48 
  49 /**
  50  * Test code installation with data patches.
  51  */
  52 public class DataPatchTest extends CodeInstallationTest {
  53 
  54     public static Class<?> getConstClass() {
  55         return DataPatchTest.class;
  56     }
  57 
  58     private void test(TestCompiler compiler) {
  59         test(compiler, getMethod("getConstClass"));
  60     }
  61 
  62     @Test
  63     public void testInlineObject() {
  64         test(asm -> {
  65             ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
  66             HotSpotConstant c = (HotSpotConstant) constantReflection.asJavaClass(type);
  67             Register ret = asm.emitLoadPointer(c);




  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") & os.arch != "aarch64"
  27  * @library /
  28  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  29  *          jdk.vm.ci/jdk.vm.ci.meta
  30  *          jdk.vm.ci/jdk.vm.ci.code
  31  *          jdk.vm.ci/jdk.vm.ci.code.site
  32  *          jdk.vm.ci/jdk.vm.ci.runtime
  33  *          jdk.vm.ci/jdk.vm.ci.amd64
  34  *          jdk.vm.ci/jdk.vm.ci.sparc
  35  * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java
  36  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.DataPatchTest
  37  */
  38 
  39 package jdk.vm.ci.code.test;
  40 



  41 import jdk.vm.ci.code.Register;
  42 import jdk.vm.ci.code.site.DataSectionReference;
  43 import jdk.vm.ci.hotspot.HotSpotConstant;
  44 import jdk.vm.ci.meta.ResolvedJavaType;
  45 import org.junit.Assume;
  46 import org.junit.Test;
  47 
  48 /**
  49  * Test code installation with data patches.
  50  */
  51 public class DataPatchTest extends CodeInstallationTest {
  52 
  53     public static Class<?> getConstClass() {
  54         return DataPatchTest.class;
  55     }
  56 
  57     private void test(TestCompiler compiler) {
  58         test(compiler, getMethod("getConstClass"));
  59     }
  60 
  61     @Test
  62     public void testInlineObject() {
  63         test(asm -> {
  64             ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
  65             HotSpotConstant c = (HotSpotConstant) constantReflection.asJavaClass(type);
  66             Register ret = asm.emitLoadPointer(c);


< prev index next >