]> git.cryptolib.org Git - avr-crypto-lib.git/blob - cubehash/xchg.S
fixing style, typos and uart
[avr-crypto-lib.git] / cubehash / xchg.S
1 /* xchg.S */
2 /*
3     This file is part of the AVR-Crypto-Lib.
4     Copyright (C) 2006-2010 Daniel Otte (daniel.otte@rub.de)
5
6     This program is free software: you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation, either version 3 of the License, or
9     (at your option) any later version.
10
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 .global xchg32_array
21 xchg32_array:
22    movw r26, r24
23    movw r30, r22
24 1:
25    ld r24, X
26    ld r25, Z
27    st X+, r25
28    st Z+, r24
29    ld r24, X
30    ld r25, Z
31    st X+, r25
32    st Z+, r24
33    ld r24, X
34    ld r25, Z
35    st X+, r25
36    st Z+, r24
37    ld r24, X
38    ld r25, Z
39    st X+, r25
40    st Z+, r24
41    dec r20
42    brne 1b
43    ret
44