diff options
Diffstat (limited to 'cipher/blowfish-amd64.S')
-rw-r--r-- | cipher/blowfish-amd64.S | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/cipher/blowfish-amd64.S b/cipher/blowfish-amd64.S index 02d3b710..bdb361d7 100644 --- a/cipher/blowfish-amd64.S +++ b/cipher/blowfish-amd64.S @@ -133,7 +133,9 @@ __blowfish_enc_blk1: * output: * RX0: output plaintext block */ + CFI_STARTPROC(); movq %rbp, %r11; + CFI_REGISTER(%rbp, %r11); load_roundkey_enc(0); round_enc(2); @@ -147,8 +149,10 @@ __blowfish_enc_blk1: add_roundkey_enc(); movq %r11, %rbp; + CFI_RESTORE(%rbp) ret; + CFI_ENDPROC(); ELF(.size __blowfish_enc_blk1,.-__blowfish_enc_blk1;) .align 8 @@ -161,6 +165,7 @@ _gcry_blowfish_amd64_do_encrypt: * %rsi: u32 *ret_xl * %rdx: u32 *ret_xr */ + CFI_STARTPROC(); ENTER_SYSV_FUNC_PARAMS_0_4 movl (%rdx), RX0d; @@ -178,6 +183,7 @@ _gcry_blowfish_amd64_do_encrypt: EXIT_SYSV_FUNC ret; + CFI_ENDPROC(); ELF(.size _gcry_blowfish_amd64_do_encrypt,.-_gcry_blowfish_amd64_do_encrypt;) .align 8 @@ -190,6 +196,7 @@ _gcry_blowfish_amd64_encrypt_block: * %rsi: dst * %rdx: src */ + CFI_STARTPROC(); ENTER_SYSV_FUNC_PARAMS_0_4 movq %rsi, %r10; @@ -204,6 +211,7 @@ _gcry_blowfish_amd64_encrypt_block: EXIT_SYSV_FUNC ret; + CFI_ENDPROC(); ELF(.size _gcry_blowfish_amd64_encrypt_block,.-_gcry_blowfish_amd64_encrypt_block;) .align 8 @@ -216,9 +224,11 @@ _gcry_blowfish_amd64_decrypt_block: * %rsi: dst * %rdx: src */ + CFI_STARTPROC(); ENTER_SYSV_FUNC_PARAMS_0_4 movq %rbp, %r11; + CFI_REGISTER(%rbp, %r11); movq %rsi, %r10; movq %rdx, RIO; @@ -240,9 +250,11 @@ _gcry_blowfish_amd64_decrypt_block: write_block(); movq %r11, %rbp; + CFI_RESTORE(%rbp); EXIT_SYSV_FUNC ret; + CFI_ENDPROC(); ELF(.size _gcry_blowfish_amd64_decrypt_block,.-_gcry_blowfish_amd64_decrypt_block;) /********************************************************************** @@ -340,6 +352,7 @@ __blowfish_enc_blk4: * output: * RX0,RX1,RX2,RX3: four output ciphertext blocks */ + CFI_STARTPROC(); preload_roundkey_enc(0); round_enc4(0); @@ -355,6 +368,7 @@ __blowfish_enc_blk4: outbswap_block4(); ret; + CFI_ENDPROC(); ELF(.size __blowfish_enc_blk4,.-__blowfish_enc_blk4;) .align 8 @@ -367,6 +381,7 @@ __blowfish_dec_blk4: * output: * RX0,RX1,RX2,RX3: four output plaintext blocks */ + CFI_STARTPROC(); preload_roundkey_dec(17); inbswap_block4(); @@ -384,6 +399,7 @@ __blowfish_dec_blk4: outbswap_block4(); ret; + CFI_ENDPROC(); ELF(.size __blowfish_dec_blk4,.-__blowfish_dec_blk4;) .align 8 @@ -396,12 +412,17 @@ _gcry_blowfish_amd64_ctr_enc: * %rdx: src (4 blocks) * %rcx: iv (big endian, 64bit) */ + CFI_STARTPROC(); ENTER_SYSV_FUNC_PARAMS_0_4 pushq %rbp; + CFI_PUSH(%rbp); pushq %rbx; + CFI_PUSH(%rbx); pushq %r12; + CFI_PUSH(%r12); pushq %r13; + CFI_PUSH(%r13); /* %r11-%r13 are not used by __blowfish_enc_blk4 */ movq %rcx, %r13; /*iv*/ @@ -438,12 +459,17 @@ _gcry_blowfish_amd64_ctr_enc: movq RX3, 3 * 8(%r11); popq %r13; + CFI_POP(%r13); popq %r12; + CFI_POP(%r12); popq %rbx; + CFI_POP(%rbx); popq %rbp; + CFI_POP(%rbp); EXIT_SYSV_FUNC ret; + CFI_ENDPROC(); ELF(.size _gcry_blowfish_amd64_ctr_enc,.-_gcry_blowfish_amd64_ctr_enc;) .align 8 @@ -456,12 +482,17 @@ _gcry_blowfish_amd64_cbc_dec: * %rdx: src (4 blocks) * %rcx: iv (64bit) */ + CFI_STARTPROC(); ENTER_SYSV_FUNC_PARAMS_0_4 pushq %rbp; + CFI_PUSH(%rbp); pushq %rbx; + CFI_PUSH(%rbx); pushq %r12; + CFI_PUSH(%r12); pushq %r13; + CFI_PUSH(%r13); /* %r11-%r13 are not used by __blowfish_dec_blk4 */ movq %rsi, %r11; /*dst*/ @@ -489,12 +520,17 @@ _gcry_blowfish_amd64_cbc_dec: movq RX3, 3 * 8(%r11); popq %r13; + CFI_POP(%r13); popq %r12; + CFI_POP(%r12); popq %rbx; + CFI_POP(%rbx); popq %rbp; + CFI_POP(%rbp); EXIT_SYSV_FUNC ret; + CFI_ENDPROC(); ELF(.size _gcry_blowfish_amd64_cbc_dec,.-_gcry_blowfish_amd64_cbc_dec;) .align 8 @@ -507,12 +543,17 @@ _gcry_blowfish_amd64_cfb_dec: * %rdx: src (4 blocks) * %rcx: iv (64bit) */ + CFI_STARTPROC(); ENTER_SYSV_FUNC_PARAMS_0_4 pushq %rbp; + CFI_PUSH(%rbp); pushq %rbx; + CFI_PUSH(%rbx); pushq %r12; + CFI_PUSH(%r12); pushq %r13; + CFI_PUSH(%r13); /* %r11-%r13 are not used by __blowfish_enc_blk4 */ movq %rcx, %r13; /*iv*/ @@ -543,12 +584,17 @@ _gcry_blowfish_amd64_cfb_dec: movq RX3, 3 * 8(%r11); popq %r13; + CFI_POP(%r13); popq %r12; + CFI_POP(%r12); popq %rbx; + CFI_POP(%rbx); popq %rbp; + CFI_POP(%rbp); EXIT_SYSV_FUNC ret; + CFI_ENDPROC(); ELF(.size _gcry_blowfish_amd64_cfb_dec,.-_gcry_blowfish_amd64_cfb_dec;) #endif /*defined(USE_BLOWFISH)*/ |