diff options
author | Niels Möller <nisse@lysator.liu.se> | 2013-04-26 09:23:44 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2013-04-26 09:23:44 +0200 |
commit | 3eb603d0d810b9298f5624aaa8a293c4b51e4b2a (patch) | |
tree | dfc2ec4ca53377b1735d507bc1c8ba3a249aa5b1 /x86_64 | |
parent | 2b49c1792d48a99eff57a01bf31a8f5e765115c4 (diff) | |
download | nettle-3eb603d0d810b9298f5624aaa8a293c4b51e4b2a.tar.gz |
Use size_t rather than unsigned for all cipher-related functions.
Diffstat (limited to 'x86_64')
-rw-r--r-- | x86_64/aes-decrypt-internal.asm | 12 | ||||
-rw-r--r-- | x86_64/aes-encrypt-internal.asm | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/x86_64/aes-decrypt-internal.asm b/x86_64/aes-decrypt-internal.asm index 0d4f2f92..606b7c89 100644 --- a/x86_64/aes-decrypt-internal.asm +++ b/x86_64/aes-decrypt-internal.asm @@ -33,14 +33,14 @@ define(<TC>,<%r12d>) define(<CTX>, <%rdi>) define(<TABLE>, <%rsi>) -define(<PARAM_LENGTH>,<%edx>) C Length is only 32 bits +define(<PARAM_LENGTH>,<%rdx>) define(<PARAM_DST>, <%rcx>) define(<SRC>, <%r8>) define(<DST>, <%r9>) define(<KEY>,<%r14>) define(<COUNT>, <%r15d>) -define(<BLOCK_COUNT>, <%r13d>) +define(<BLOCK_COUNT>, <%r13>) C Must correspond to an old-style register, for movzb from %ah--%dh to C work. @@ -50,7 +50,7 @@ define(<TMP>,<%rbp>) C _aes_decrypt(struct aes_context *ctx, C const struct aes_table *T, - C unsigned length, uint8_t *dst, + C size_t length, uint8_t *dst, C uint8_t *src) .text ALIGN(16) @@ -68,8 +68,8 @@ PROLOGUE(_nettle_aes_decrypt) push %r15 mov PARAM_DST, DST - movl PARAM_LENGTH, BLOCK_COUNT - shrl $4, BLOCK_COUNT + mov PARAM_LENGTH, BLOCK_COUNT + shr $4, BLOCK_COUNT .Lblock_loop: mov CTX,KEY @@ -119,7 +119,7 @@ PROLOGUE(_nettle_aes_decrypt) AES_STORE(TA,TB,TC,SD, KEY, DST) add $16, DST - decl BLOCK_COUNT + dec BLOCK_COUNT jnz .Lblock_loop diff --git a/x86_64/aes-encrypt-internal.asm b/x86_64/aes-encrypt-internal.asm index 4ae0ec85..e1003c69 100644 --- a/x86_64/aes-encrypt-internal.asm +++ b/x86_64/aes-encrypt-internal.asm @@ -33,14 +33,14 @@ define(<TC>,<%r12d>) define(<CTX>, <%rdi>) define(<TABLE>, <%rsi>) -define(<PARAM_LENGTH>,<%edx>) C Length is only 32 bits +define(<PARAM_LENGTH>,<%rdx>) define(<PARAM_DST>, <%rcx>) define(<SRC>, <%r8>) define(<DST>, <%r9>) define(<KEY>,<%r14>) define(<COUNT>, <%r15d>) -define(<BLOCK_COUNT>, <%r13d>) +define(<BLOCK_COUNT>, <%r13>) C Must correspond to an old-style register, for movzb from %ah--%dh to C work. @@ -50,7 +50,7 @@ define(<TMP>,<%rbp>) C _aes_encrypt(struct aes_context *ctx, C const struct aes_table *T, - C unsigned length, uint8_t *dst, + C size_t length, uint8_t *dst, C uint8_t *src) .text ALIGN(16) @@ -68,8 +68,8 @@ PROLOGUE(_nettle_aes_encrypt) push %r15 mov PARAM_DST, DST - movl PARAM_LENGTH, BLOCK_COUNT - shrl $4, BLOCK_COUNT + mov PARAM_LENGTH, BLOCK_COUNT + shr $4, BLOCK_COUNT .Lblock_loop: mov CTX,KEY @@ -119,7 +119,7 @@ PROLOGUE(_nettle_aes_encrypt) AES_STORE(TA,TB,TC,SD, KEY, DST) add $16, DST - decl BLOCK_COUNT + dec BLOCK_COUNT jnz .Lblock_loop |