From: Niels Möller Date: Sun, 16 Oct 2005 10:08:45 +0000 (+0200) Subject: * sparc/machine.m4 (AES_ROUND): Annotated instructions. X-Git-Tag: nettle_1.14_release_20051205~120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a6961580e2d64c31dc67efa23c778ad085448f6e;p=thirdparty%2Fnettle.git * sparc/machine.m4 (AES_ROUND): Annotated instructions. Rev: src/nettle/sparc/machine.m4:1.6 --- diff --git a/sparc/machine.m4 b/sparc/machine.m4 index 954e8c51..5f3731a0 100644 --- a/sparc/machine.m4 +++ b/sparc/machine.m4 @@ -32,35 +32,35 @@ C FIXME: Could use registers pointing directly to the four tables C FIXME: Needs better instruction scheduling, and perhaps more temporaries C Alternatively, we can use a single table and some rotations define(, < - and $3, 0xff, TMP1 - sll TMP1, 2, TMP1 - add TMP1, AES_TABLE0, TMP1 - ld [$2 + TMP1], $8 + and $3, 0xff, TMP1 C 0 + sll TMP1, 2, TMP1 C 0 + add TMP1, AES_TABLE0, TMP1 C 0 + ld [$2 + TMP1], $8 C 0 - srl $4, 6, TMP2 - and TMP2, 0x3fc, TMP2 - add TMP2, AES_TABLE1, TMP2 - ld [$2 + TMP2], TMP2 + srl $4, 6, TMP2 C 1 + and TMP2, 0x3fc, TMP2 C 1 + add TMP2, AES_TABLE1, TMP2 C 1 + ld [$2 + TMP2], TMP2 C 1 nop - xor $8, TMP2, $8 + xor $8, TMP2, $8 C 1 - srl $5, 14, TMP1 - and TMP1, 0x3fc, TMP1 - add TMP1, AES_TABLE2, TMP1 - ld [$2 + TMP1], TMP1 + srl $5, 14, TMP1 C 2 + and TMP1, 0x3fc, TMP1 C 2 + add TMP1, AES_TABLE2, TMP1 C 2 + ld [$2 + TMP1], TMP1 C 2 nop - xor $8, TMP1, $8 + xor $8, TMP1, $8 C 2 - srl $6, 22, TMP2 - and TMP2, 0x3fc, TMP2 - add TMP2, AES_TABLE3, TMP2 - ld [$2 + TMP2], TMP2 + srl $6, 22, TMP2 C 3 + and TMP2, 0x3fc, TMP2 C 3 + add TMP2, AES_TABLE3, TMP2 C 3 + ld [$2 + TMP2], TMP2 C 3 nop - xor $8, TMP2, $8 + xor $8, TMP2, $8 C 3 - ld [$7 + eval(4*$1)], TMP2 + ld [$7 + eval(4*$1)], TMP2 C 4 nop - xor $8, TMP2, $8>)dnl + xor $8, TMP2, $8>)dnl C 4 C AES_FINAL_ROUND(i, T, a, b, c, d, key, dst) C Compute one word in the final round function. Output is converted to