diff --git a/Efficient-Software-Implementations-of-ZUC.md b/Efficient-Software-Implementations-of-ZUC.md index bb5633f..636c868 100644 --- a/Efficient-Software-Implementations-of-ZUC.md +++ b/Efficient-Software-Implementations-of-ZUC.md @@ -529,6 +529,14 @@ High Low 0x00 ,0x01 ,0x82 ,0x83 ,0x9E ,0x9F ,0x1C ,0x1D ,0x24 ,0x25 ,0xA6 ,0xA7 ,0xBA ,0xBB ,0x38 ,0x39 , ``` +## AMD64 SHLD SHRD的性能 +经过测试,SHLD/SHRD的性能还不如目前的多条指令实现。 +```asm + BYTE $0x41; BYTE $0x0F; BYTE $0xA4; BYTE $0xC3; BYTE $0x10 \ // SHLDL(BRC_X0, AX, $16) + BYTE $0x41; BYTE $0x0F; BYTE $0xA4; BYTE $0xDC; BYTE $0x10 \ // SHLDL(BRC_X1, BX, $16) + BYTE $0x41; BYTE $0x0F; BYTE $0xA4; BYTE $0xCD; BYTE $0x10 \ // SHLDL(BRC_X2, CX, $16) + BYTE $0x41; BYTE $0x0F; BYTE $0xA4; BYTE $0xD6; BYTE $0x10 +``` ## 参考: 1. [zuc sbox with aesni](https://gist.github.com/emmansun/ae4677d71c75ff8407d5f5b3a884f5d2), This is the pure golang code to study ZUC implementation with AESENCLAST/AESE instruction.