]> git.cryptolib.org Git - avr-crypto-lib.git/blob - cubehash/cubehash_rotates.S
optimizing norx32
[avr-crypto-lib.git] / cubehash / cubehash_rotates.S
1 /* cubehash_rotates.S */
2 /*
3     This file is part of the ARM-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 rotate7left
21 rotate7left:
22         mov r0, r25
23         mov r25, r24
24         mov r24, r23
25         mov r23, r22
26         mov r22, r0
27         ror r0
28         ror r25
29         ror r24
30         ror r23
31         ror r22
32         ret
33
34 .global rotate11left
35 rotate11left:
36         mov r0, r25
37         mov r25, r24
38         mov r24, r23
39         mov r23, r22
40         mov r22, r0
41         rol r0
42         rol r23
43         rol r24
44         rol r25
45         rol r22
46         rol r0
47         rol r23
48         rol r24
49         rol r25
50         rol r22
51         rol r0
52         rol r23
53         rol r24
54         rol r25
55         rol r22
56         ret
57
58