KMC R2, R6 // b92f0026
KLMD R2, R8 // b93f0028
KIMD R0, R4 // b93e0004
+ KDSA R0, R8 // b93a0008
// vector add and sub instructions
VAB V3, V4, V4 // e743400000f3
// KM
{i: 124, as: AKM, a1: C_REG, a6: C_REG},
+ // KDSA
+ {i: 125, as: AKDSA, a1: C_REG, a6: C_REG},
+
// vector instructions
// VRX store
op_VUPLL uint32 = 0xE7D4 // VRR-a VECTOR UNPACK LOGICAL LOW
op_VUPL uint32 = 0xE7D6 // VRR-a VECTOR UNPACK LOW
op_VMSL uint32 = 0xE7B8 // VRR-d VECTOR MULTIPLY SUM LOGICAL
+
+ // added in z15
+ op_KDSA uint32 = 0xB93A // FORMAT_RRE COMPUTE DIGITAL SIGNATURE AUTHENTICATION (KDSA)
+
)
func oclass(a *obj.Addr) int {
opcode = op_KIMD
}
zRRE(opcode, uint32(p.From.Reg), uint32(p.To.Reg), asm)
+
+ case 125: // KDSA sign and verify
+ if p.To.Reg == REG_R0 {
+ c.ctxt.Diag("second argument must not be R0 in %v", p)
+ }
+ if p.To.Reg&1 != 0 {
+ c.ctxt.Diag("second argument must be an even register in %v", p)
+ }
+ zRRE(op_KDSA, uint32(p.From.Reg), uint32(p.To.Reg), asm)
+
}
}
MOVD params+8(FP), R1 // address parameter block
loop:
- WORD $0xB93A0008 // compute digital signature authentication
+ KDSA R0, R4 // compute digital signature authentication
BVS loop // branch back if interrupted
BGT retry // signing unsuccessful, but retry with new CSPRN
BLT error // condition code of 1 indicates a failure
TEXT ·kdsaQuery(SB), NOSPLIT|NOFRAME, $0-16
MOVD $0, R0 // set function code to 0 (KLMD-Query)
MOVD $ret+0(FP), R1 // address of 16-byte return value
- WORD $0xB93A0008 // compute digital signature authentication
+ KDSA R0, R4 // compute digital signature authentication
RET