mirror of
https://github.com/emmansun/gmsm.git
synced 2025-05-11 03:26:17 +08:00
Updated SM3性能优化 (markdown)
parent
22d8920487
commit
d03dd1665f
@ -150,7 +150,14 @@ SM3可以对Wt XOR Wt+4进行并行计算,
|
||||
|
||||
这是循环右移,SM3使用循环左移,没看到有ROLXL这样的指令,应该能传入负数来实现,
|
||||
|
||||
|
||||
Operation
|
||||
IF (OperandSize = 32)
|
||||
y ← imm8 AND 1FH;
|
||||
DEST ← (SRC >> y) | (SRC << (32-y));
|
||||
ELSEIF (OperandSize = 64 )
|
||||
y ← imm8 AND 3FH;
|
||||
DEST ← (SRC >> y) | (SRC << (64-y));
|
||||
ENDIF
|
||||
|
||||
实在不行只能用MOVL + ROLL来处理,但性能就没啥提高了。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user