Skip to content

Commit

Permalink
Fix for robehn comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zifeihan committed Mar 6, 2024
1 parent 893da74 commit e4bc840
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/hotspot/cpu/riscv/stubGenerator_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3664,6 +3664,9 @@ class StubGenerator: public StubCodeGenerator {

#undef __
#define __ this->

#if COMPILER2_OR_JVMCI

class Sha2Generator : public MacroAssembler {
StubCodeGenerator* _cgen;
public:
Expand Down Expand Up @@ -3935,7 +3938,7 @@ class StubGenerator: public StubCodeGenerator {
// ma: mask agnostic (don't care about those lanes)
// x0 is not written, we known the number of vector elements.

if (vset_sew == Assembler::e64 && VM_Version::_initial_vector_length == 16) { // SHA512 and VLEN = 128
if (vset_sew == Assembler::e64 && MaxVectorSize == 16) { // SHA512 and VLEN = 128
__ vsetivli(x0, 4, vset_sew, Assembler::m2, Assembler::ma, Assembler::ta);
} else {
__ vsetivli(x0, 4, vset_sew, Assembler::m1, Assembler::ma, Assembler::ta);
Expand Down Expand Up @@ -4044,6 +4047,8 @@ class StubGenerator: public StubCodeGenerator {
return start;
}
};
#endif // COMPILER2_OR_JVMCI

#undef __
#define __ masm->

Expand Down Expand Up @@ -4423,6 +4428,8 @@ class StubGenerator: public StubCodeGenerator {
m5_FF_GG_HH_II_epilogue(reg_cache, a, b, c, d, k, s, t, rtmp1);
}

#if COMPILER2_OR_JVMCI

// Arguments:
//
// Inputs:
Expand Down Expand Up @@ -4673,6 +4680,8 @@ class StubGenerator: public StubCodeGenerator {
return (address) start;
}

#endif // COMPILER2_OR_JVMCI

/**
* Perform the quarter round calculations on values contained within four vector registers.
*
Expand Down Expand Up @@ -4705,6 +4714,8 @@ class StubGenerator: public StubCodeGenerator {
__ vrole32_vi(bVec, 7, tmp_vr);
}

#if COMPILER2_OR_JVMCI

/**
* int com.sun.crypto.provider.ChaCha20Cipher.implChaCha20Block(int[] initState, byte[] result)
*
Expand Down Expand Up @@ -4809,6 +4820,8 @@ class StubGenerator: public StubCodeGenerator {
return (address) start;
}

#endif // COMPILER2_OR_JVMCI


// ------------------------ SHA-1 intrinsic ------------------------

Expand Down Expand Up @@ -5002,6 +5015,8 @@ class StubGenerator: public StubCodeGenerator {
__ mv(prev_e, e);
}

#if COMPILER2_OR_JVMCI

// Intrinsic for:
// void sun.security.provider.SHA.implCompress0(byte[] buf, int ofs)
// void sun.security.provider.DigestBase.implCompressMultiBlock0(byte[] b, int ofs, int limit)
Expand Down Expand Up @@ -5149,6 +5164,8 @@ class StubGenerator: public StubCodeGenerator {
return (address) start;
}

#endif // COMPILER2_OR_JVMCI



#ifdef COMPILER2
Expand Down

0 comments on commit e4bc840

Please sign in to comment.