equal
deleted
inserted
replaced
47 import jdk.vm.ci.code.site.InfopointReason; |
47 import jdk.vm.ci.code.site.InfopointReason; |
48 import jdk.vm.ci.code.site.Site; |
48 import jdk.vm.ci.code.site.Site; |
49 import jdk.vm.ci.common.JVMCIError; |
49 import jdk.vm.ci.common.JVMCIError; |
50 import jdk.vm.ci.hotspot.HotSpotCompiledCode.Comment; |
50 import jdk.vm.ci.hotspot.HotSpotCompiledCode.Comment; |
51 import jdk.vm.ci.hotspot.HotSpotReferenceMap; |
51 import jdk.vm.ci.hotspot.HotSpotReferenceMap; |
52 import jdk.vm.ci.hotspot.HotSpotVMConfig; |
|
53 import jdk.vm.ci.meta.Assumptions.Assumption; |
52 import jdk.vm.ci.meta.Assumptions.Assumption; |
54 import jdk.vm.ci.meta.JavaKind; |
53 import jdk.vm.ci.meta.JavaKind; |
55 import jdk.vm.ci.meta.PlatformKind; |
54 import jdk.vm.ci.meta.PlatformKind; |
56 |
55 |
57 import org.junit.Test; |
56 import org.junit.Test; |
110 Location[] base = new Location[]{null}; |
109 Location[] base = new Location[]{null}; |
111 int[] size = new int[]{kind.getSizeInBytes()}; |
110 int[] size = new int[]{kind.getSizeInBytes()}; |
112 |
111 |
113 test(new HotSpotReferenceMap(oops, base, size, 8)); |
112 test(new HotSpotReferenceMap(oops, base, size, 8)); |
114 } |
113 } |
115 |
|
116 @Test(expected = JVMCIError.class) |
|
117 public void testInvalidNarrowDerivedOop() { |
|
118 if (!HotSpotVMConfig.config().useCompressedOops) { |
|
119 throw new JVMCIError("skipping test"); |
|
120 } |
|
121 |
|
122 PlatformKind kind = arch.getPlatformKind(JavaKind.Int); |
|
123 Register reg = getRegister(kind, 0); |
|
124 Register baseReg = getRegister(arch.getPlatformKind(JavaKind.Object), 1); |
|
125 |
|
126 Location[] oops = new Location[]{Location.register(reg)}; |
|
127 Location[] base = new Location[]{Location.register(baseReg)}; |
|
128 int[] size = new int[]{kind.getSizeInBytes()}; |
|
129 |
|
130 test(new HotSpotReferenceMap(oops, base, size, 8)); |
|
131 } |
|
132 } |
114 } |