Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8340438: RISC-V: minor improvement in base64 #21105

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/hotspot/cpu/riscv/stubGenerator_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5491,9 +5491,7 @@ class StubGenerator: public StubCodeGenerator {
Register stepSrcM2 = doff;
Register stepDst = isURL;
Register size = x29; // t4
Register minusOne = x30; // t5

__ mv(minusOne, -1);
__ mv(size, MaxVectorSize * 2);
__ mv(stepSrcM1, MaxVectorSize * 4);
__ slli(stepSrcM2, stepSrcM1, 1);
Expand All @@ -5513,7 +5511,8 @@ class StubGenerator: public StubCodeGenerator {
__ sub(length, length, stepSrcM2);

// error check
__ bne(failedIdx, minusOne, Exit);
// valid value of failedIdx can only be -1 when < 0
__ bgez(failedIdx, Exit);

__ bge(length, stepSrcM2, ProcessM2);

Expand All @@ -5533,7 +5532,8 @@ class StubGenerator: public StubCodeGenerator {
__ sub(length, length, stepSrcM1);

// error check
__ bne(failedIdx, minusOne, Exit);
// valid value of failedIdx can only be -1 when < 0
__ bgez(failedIdx, Exit);

__ BIND(ProcessScalar);
__ beqz(length, Exit);
Expand Down