~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
symm/salsa20-arm-neon.S: Indent some reordered instructions.
[catacomb]
/
symm
/
salsa20-arm-neon.S
diff --git
a/symm/salsa20-arm-neon.S
b/symm/salsa20-arm-neon.S
index
cea4019
..
ce37948
100644
(file)
--- a/
symm/salsa20-arm-neon.S
+++ b/
symm/salsa20-arm-neon.S
@@
-25,18
+25,19
@@
/// MA 02111-1307, USA.
///--------------------------------------------------------------------------
/// MA 02111-1307, USA.
///--------------------------------------------------------------------------
-///
External definition
s.
+///
Preliminarie
s.
#include "config.h"
#include "asm-common.h"
#include "config.h"
#include "asm-common.h"
-///--------------------------------------------------------------------------
-/// Main.code.
-
.arch armv7-a
.fpu neon
.arch armv7-a
.fpu neon
+
.text
.text
+///--------------------------------------------------------------------------
+/// Main code.
+
FUNC(salsa20_core_arm_neon)
// Arguments are in registers.
FUNC(salsa20_core_arm_neon)
// Arguments are in registers.
@@
-71,11
+72,6
@@
FUNC(salsa20_core_arm_neon)
// [ 8 9 10 11] [ 8 13 2 7] (c, q10)
// [12 13 14 15] [12 1 6 11] (d, q11)
//
// [ 8 9 10 11] [ 8 13 2 7] (c, q10)
// [12 13 14 15] [12 1 6 11] (d, q11)
//
- // [ 0 1 2 3] (a, q8)
- // [ 4 5 6 7] (b, q9)
- // [ 8 9 10 11] (c, q10)
- // [12 13 14 15] (d, q11)
- //
// We need a copy for later. Rather than waste time copying them by
// hand, we'll use the three-address nature of the instruction set.
// But this means that the main loop is offset by a bit.
// We need a copy for later. Rather than waste time copying them by
// hand, we'll use the three-address nature of the instruction set.
// But this means that the main loop is offset by a bit.
@@
-102,7
+98,7
@@
FUNC(salsa20_core_arm_neon)
// d ^= (c + b) <<< 13
vadd.u32 q0, q10, q9
// d ^= (c + b) <<< 13
vadd.u32 q0, q10, q9
- vext.32 q9, q9, q9, #3
+
vext.32 q9, q9, q9, #3
vshl.u32 q1, q0, #13
vshr.u32 q0, q0, #19
vorr q0, q0, q1
vshl.u32 q1, q0, #13
vshr.u32 q0, q0, #19
vorr q0, q0, q1
@@
-110,8
+106,8
@@
FUNC(salsa20_core_arm_neon)
// a ^= (d + c) <<< 18
vadd.u32 q0, q11, q10
// a ^= (d + c) <<< 18
vadd.u32 q0, q11, q10
- vext.32 q10, q10, q10, #2
- vext.32 q11, q11, q11, #1
+
vext.32 q10, q10, q10, #2
+
vext.32 q11, q11, q11, #1
vshl.u32 q1, q0, #18
vshr.u32 q0, q0, #14
vorr q0, q0, q1
vshl.u32 q1, q0, #18
vshr.u32 q0, q0, #14
vorr q0, q0, q1
@@
-208,7
+204,7
@@
FUNC(salsa20_core_arm_neon)
// Almost there. Firstly the feedfoward addition. Also, establish a
// constant which will be useful later.
9: vadd.u32 q0, q8, q12 // 0, 5, 10, 15
// Almost there. Firstly the feedfoward addition. Also, establish a
// constant which will be useful later.
9: vadd.u32 q0, q8, q12 // 0, 5, 10, 15
- vmov.i64 q12, #0xffffffff // = (
-1, 0, -1, 0
)
+ vmov.i64 q12, #0xffffffff // = (
0, -1; 0, -1
)
vadd.u32 q1, q9, q13 // 4, 9, 14, 3
vadd.u32 q2, q10, q14 // 8, 13, 2, 7
vadd.u32 q3, q11, q15 // 12, 1, 6, 11
vadd.u32 q1, q9, q13 // 4, 9, 14, 3
vadd.u32 q2, q10, q14 // 8, 13, 2, 7
vadd.u32 q3, q11, q15 // 12, 1, 6, 11