Skip to content

Commit

Permalink
8340438: RISC-V: minor improvement in base64
Browse files Browse the repository at this point in the history
Reviewed-by: fyang
  • Loading branch information
Hamlin Li committed Sep 20, 2024
1 parent a50440f commit 3ad6e31
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 3ad6e31

Please sign in to comment.