internal-speck64-avr.S 2.99 KB
Newer Older
Rhys Weatherley committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272
#if defined(__AVR__)
#include <avr/io.h>
/* Automatically generated - do not edit */

	.text
.global speck64_128_encrypt
	.type speck64_128_encrypt, @function
speck64_128_encrypt:
	push r28
	push r29
	push r2
	push r3
	push r4
	push r5
	push r6
	push r7
	push r8
	push r9
	push r10
	push r11
	push r12
	push r13
	push r14
	push r15
	push r16
	push r17
	push r23
	push r22
	movw r30,r24
	movw r26,r20
	in r28,0x3d
	in r29,0x3e
.L__stack_usage = 20
	ld r18,Z
	ldd r19,Z+1
	ldd r20,Z+2
	ldd r21,Z+3
	ldd r22,Z+4
	ldd r23,Z+5
	ldd r2,Z+6
	ldd r3,Z+7
	ldd r4,Z+8
	ldd r5,Z+9
	ldd r6,Z+10
	ldd r7,Z+11
	ldd r8,Z+12
	ldd r9,Z+13
	ldd r10,Z+14
	ldd r11,Z+15
	ld r14,X+
	ld r15,X+
	ld r24,X+
	ld r25,X+
	ld r30,X+
	ld r31,X+
	ld r12,X+
	ld r13,X+
	mov r16,r1
25:
	add r31,r14
	adc r12,r15
	adc r13,r24
	adc r30,r25
	eor r31,r18
	eor r12,r19
	eor r13,r20
	eor r30,r21
	lsl r14
	rol r15
	rol r24
	rol r25
	adc r14,r1
	lsl r14
	rol r15
	rol r24
	rol r25
	adc r14,r1
	lsl r14
	rol r15
	rol r24
	rol r25
	adc r14,r1
	eor r14,r31
	eor r15,r12
	eor r24,r13
	eor r25,r30
	mov r0,r22
	mov r22,r23
	add r22,r18
	mov r23,r2
	adc r23,r19
	mov r2,r3
	adc r2,r20
	mov r3,r0
	adc r3,r21
	eor r22,r16
	lsl r18
	rol r19
	rol r20
	rol r21
	adc r18,r1
	lsl r18
	rol r19
	rol r20
	rol r21
	adc r18,r1
	lsl r18
	rol r19
	rol r20
	rol r21
	adc r18,r1
	eor r18,r22
	eor r19,r23
	eor r20,r2
	eor r21,r3
	inc r16
	add r12,r14
	adc r13,r15
	adc r30,r24
	adc r31,r25
	eor r12,r18
	eor r13,r19
	eor r30,r20
	eor r31,r21
	lsl r14
	rol r15
	rol r24
	rol r25
	adc r14,r1
	lsl r14
	rol r15
	rol r24
	rol r25
	adc r14,r1
	lsl r14
	rol r15
	rol r24
	rol r25
	adc r14,r1
	eor r14,r12
	eor r15,r13
	eor r24,r30
	eor r25,r31
	mov r0,r4
	mov r4,r5
	add r4,r18
	mov r5,r6
	adc r5,r19
	mov r6,r7
	adc r6,r20
	mov r7,r0
	adc r7,r21
	eor r4,r16
	lsl r18
	rol r19
	rol r20
	rol r21
	adc r18,r1
	lsl r18
	rol r19
	rol r20
	rol r21
	adc r18,r1
	lsl r18
	rol r19
	rol r20
	rol r21
	adc r18,r1
	eor r18,r4
	eor r19,r5
	eor r20,r6
	eor r21,r7
	inc r16
	add r13,r14
	adc r30,r15
	adc r31,r24
	adc r12,r25
	eor r13,r18
	eor r30,r19
	eor r31,r20
	eor r12,r21
	lsl r14
	rol r15
	rol r24
	rol r25
	adc r14,r1
	lsl r14
	rol r15
	rol r24
	rol r25
	adc r14,r1
	lsl r14
	rol r15
	rol r24
	rol r25
	adc r14,r1
	eor r14,r13
	eor r15,r30
	eor r24,r31
	eor r25,r12
	mov r0,r12
	mov r12,r31
	mov r31,r30
	mov r30,r13
	mov r13,r0
	mov r0,r8
	mov r8,r9
	add r8,r18
	mov r9,r10
	adc r9,r19
	mov r10,r11
	adc r10,r20
	mov r11,r0
	adc r11,r21
	eor r8,r16
	lsl r18
	rol r19
	rol r20
	rol r21
	adc r18,r1
	lsl r18
	rol r19
	rol r20
	rol r21
	adc r18,r1
	lsl r18
	rol r19
	rol r20
	rol r21
	adc r18,r1
	eor r18,r8
	eor r19,r9
	eor r20,r10
	eor r21,r11
	inc r16
	ldi r17,27
	cpse r16,r17
	rjmp 25b
	ldd r26,Y+1
	ldd r27,Y+2
	st X+,r14
	st X+,r15
	st X+,r24
	st X+,r25
	st X+,r30
	st X+,r31
	st X+,r12
	st X+,r13
	pop r0
	pop r0
	pop r17
	pop r16
	pop r15
	pop r14
	pop r13
	pop r12
	pop r11
	pop r10
	pop r9
	pop r8
	pop r7
	pop r6
	pop r5
	pop r4
	pop r3
	pop r2
	pop r29
	pop r28
	ret
	.size speck64_128_encrypt, .-speck64_128_encrypt

#endif