Details
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8311765 | 17.0.9 | Fei Yang | P4 | Resolved | Fixed | b01 |
Description
The format of stringL_indexof_char is just a copy and paste from stringU_indexof_char. It should be `StringLatin1` instead of `StringUTF16`.
instruct stringL_indexof_char(iRegP_R11 str1, iRegI_R12 cnt1, iRegI_R13 ch,
iRegI_R10 result, iRegINoSp tmp1, iRegINoSp tmp2,
iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
%{
match(Set result (StrIndexOfChar (Binary str1 cnt1) ch));
predicate(!UseRVV && (((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::L));
effect(USE_KILL str1, USE_KILL cnt1, USE_KILL ch, TEMP_DEF result,
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
format %{ "StringUTF16 IndexOf char[] $str1,$cnt1,$ch -> $result" %} ====> Should be StringLatin1 here.
ins_encode %{
__ string_indexof_char($str1$$Register, $cnt1$$Register, $ch$$Register,
$result$$Register, $tmp1$$Register, $tmp2$$Register,
$tmp3$$Register, $tmp4$$Register, true /* isL */);
%}
ins_pipe(pipe_class_memory);
%}
instruct stringL_indexof_char(iRegP_R11 str1, iRegI_R12 cnt1, iRegI_R13 ch,
iRegI_R10 result, iRegINoSp tmp1, iRegINoSp tmp2,
iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
%{
match(Set result (StrIndexOfChar (Binary str1 cnt1) ch));
predicate(!UseRVV && (((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::L));
effect(USE_KILL str1, USE_KILL cnt1, USE_KILL ch, TEMP_DEF result,
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
format %{ "StringUTF16 IndexOf char[] $str1,$cnt1,$ch -> $result" %} ====> Should be StringLatin1 here.
ins_encode %{
__ string_indexof_char($str1$$Register, $cnt1$$Register, $ch$$Register,
$result$$Register, $tmp1$$Register, $tmp2$$Register,
$tmp3$$Register, $tmp4$$Register, true /* isL */);
%}
ins_pipe(pipe_class_memory);
%}
Attachments
Issue Links
- backported by
-
JDK-8311765 RISC-V: stringL_indexof_char instruction has wrong format string
-
- Resolved
-
- links to
-
Commit openjdk/jdk17u-dev/966fc82d
-
Commit openjdk/jdk/d3e6d04e
-
Commit openjdk/riscv-port-jdk17u/9d8c08f3
-
Review openjdk/jdk17u-dev/1427
-
Review openjdk/jdk/13881
-
Review openjdk/riscv-port-jdk17u/56
(2 links to)