mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8313676: Amend TestLoadIndexedMismatch test to target intrinsic directly
Reviewed-by: thartmann, chagedorn
This commit is contained in:
parent
0b4387e3a3
commit
4b192a8dc3
2 changed files with 7 additions and 2 deletions
|
@ -42,8 +42,8 @@ public class TestLoadIndexedMismatch {
|
||||||
public static char work() {
|
public static char work() {
|
||||||
// LoadIndexed (B)
|
// LoadIndexed (B)
|
||||||
byte b = ARR[0];
|
byte b = ARR[0];
|
||||||
// StringUTF16.charAt intrinsic, LoadIndexed (C)
|
// StringUTF16.getChar intrinsic, LoadIndexed (C)
|
||||||
char c = Helper.charAt(ARR, 0);
|
char c = Helper.getChar(ARR, 0);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,11 @@ public class Helper {
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@jdk.internal.vm.annotation.ForceInline
|
||||||
|
public static char getChar(byte[] value, int index) {
|
||||||
|
return StringUTF16.getChar(value, index);
|
||||||
|
}
|
||||||
|
|
||||||
public static void putCharSB(byte[] val, int index, int c) {
|
public static void putCharSB(byte[] val, int index, int c) {
|
||||||
StringUTF16.putCharSB(val, index, c);
|
StringUTF16.putCharSB(val, index, c);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue