mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8081778: Use Intel x64 CPU instructions for RSA acceleration
Add intrinsics for BigInteger squareToLen and mulAdd methods. Reviewed-by: kvn, jrose
This commit is contained in:
parent
7d22d69e0a
commit
93d1573c5e
18 changed files with 1077 additions and 2 deletions
|
@ -2813,6 +2813,13 @@ void Assembler::orl(Register dst, Register src) {
|
|||
emit_arith(0x0B, 0xC0, dst, src);
|
||||
}
|
||||
|
||||
void Assembler::orl(Address dst, Register src) {
|
||||
InstructionMark im(this);
|
||||
prefix(dst, src);
|
||||
emit_int8(0x09);
|
||||
emit_operand(src, dst);
|
||||
}
|
||||
|
||||
void Assembler::packuswb(XMMRegister dst, Address src) {
|
||||
NOT_LP64(assert(VM_Version::supports_sse2(), ""));
|
||||
assert((UseAVX > 0), "SSE mode requires address alignment 16 bytes");
|
||||
|
@ -6907,6 +6914,19 @@ void Assembler::rclq(Register dst, int imm8) {
|
|||
}
|
||||
}
|
||||
|
||||
void Assembler::rcrq(Register dst, int imm8) {
|
||||
assert(isShiftCount(imm8 >> 1), "illegal shift count");
|
||||
int encode = prefixq_and_encode(dst->encoding());
|
||||
if (imm8 == 1) {
|
||||
emit_int8((unsigned char)0xD1);
|
||||
emit_int8((unsigned char)(0xD8 | encode));
|
||||
} else {
|
||||
emit_int8((unsigned char)0xC1);
|
||||
emit_int8((unsigned char)(0xD8 | encode));
|
||||
emit_int8(imm8);
|
||||
}
|
||||
}
|
||||
|
||||
void Assembler::rorq(Register dst, int imm8) {
|
||||
assert(isShiftCount(imm8 >> 1), "illegal shift count");
|
||||
int encode = prefixq_and_encode(dst->encoding());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue