crypto: blowfish-x86_64: use ENTRY()/ENDPROC() for assembler functions and localize jump targets

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Jussi Kivilinna 2013-01-19 13:39:00 +02:00 committed by Herbert Xu
parent 8309b745bb
commit 5186e395fe
1 changed files with 14 additions and 25 deletions

View File

@ -20,6 +20,8 @@
* *
*/ */
#include <linux/linkage.h>
.file "blowfish-x86_64-asm.S" .file "blowfish-x86_64-asm.S"
.text .text
@ -116,11 +118,7 @@
bswapq RX0; \ bswapq RX0; \
xorq RX0, (RIO); xorq RX0, (RIO);
.align 8 ENTRY(__blowfish_enc_blk)
.global __blowfish_enc_blk
.type __blowfish_enc_blk,@function;
__blowfish_enc_blk:
/* input: /* input:
* %rdi: ctx, CTX * %rdi: ctx, CTX
* %rsi: dst * %rsi: dst
@ -148,19 +146,16 @@ __blowfish_enc_blk:
movq %r10, RIO; movq %r10, RIO;
test %cl, %cl; test %cl, %cl;
jnz __enc_xor; jnz .L__enc_xor;
write_block(); write_block();
ret; ret;
__enc_xor: .L__enc_xor:
xor_block(); xor_block();
ret; ret;
ENDPROC(__blowfish_enc_blk)
.align 8 ENTRY(blowfish_dec_blk)
.global blowfish_dec_blk
.type blowfish_dec_blk,@function;
blowfish_dec_blk:
/* input: /* input:
* %rdi: ctx, CTX * %rdi: ctx, CTX
* %rsi: dst * %rsi: dst
@ -189,6 +184,7 @@ blowfish_dec_blk:
movq %r11, %rbp; movq %r11, %rbp;
ret; ret;
ENDPROC(blowfish_dec_blk)
/********************************************************************** /**********************************************************************
4-way blowfish, four blocks parallel 4-way blowfish, four blocks parallel
@ -300,11 +296,7 @@ blowfish_dec_blk:
bswapq RX3; \ bswapq RX3; \
xorq RX3, 24(RIO); xorq RX3, 24(RIO);
.align 8 ENTRY(__blowfish_enc_blk_4way)
.global __blowfish_enc_blk_4way
.type __blowfish_enc_blk_4way,@function;
__blowfish_enc_blk_4way:
/* input: /* input:
* %rdi: ctx, CTX * %rdi: ctx, CTX
* %rsi: dst * %rsi: dst
@ -336,7 +328,7 @@ __blowfish_enc_blk_4way:
movq %r11, RIO; movq %r11, RIO;
test %bpl, %bpl; test %bpl, %bpl;
jnz __enc_xor4; jnz .L__enc_xor4;
write_block4(); write_block4();
@ -344,18 +336,15 @@ __blowfish_enc_blk_4way:
popq %rbp; popq %rbp;
ret; ret;
__enc_xor4: .L__enc_xor4:
xor_block4(); xor_block4();
popq %rbx; popq %rbx;
popq %rbp; popq %rbp;
ret; ret;
ENDPROC(__blowfish_enc_blk_4way)
.align 8 ENTRY(blowfish_dec_blk_4way)
.global blowfish_dec_blk_4way
.type blowfish_dec_blk_4way,@function;
blowfish_dec_blk_4way:
/* input: /* input:
* %rdi: ctx, CTX * %rdi: ctx, CTX
* %rsi: dst * %rsi: dst
@ -387,4 +376,4 @@ blowfish_dec_blk_4way:
popq %rbp; popq %rbp;
ret; ret;
ENDPROC(blowfish_dec_blk_4way)