]> git.cryptolib.org Git - arm-crypto-lib.git/blob - bmw/bmw_small_speed_asmmix_f0.S
8225271c749074c89afcb0158ad68d269380a807
[arm-crypto-lib.git] / bmw / bmw_small_speed_asmmix_f0.S
1 /* bmw_small_speed_asm_f0.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         .syntax unified
21
22 .macro S32_0 out:req in:req
23         lsr \out, \in, #1
24         eor \out, \out, \in, LSL #3
25         eor \out, \out, \in, ROR #28
26         eor \out, \out, \in, ROR #13
27 .endm
28
29 .macro S32_1 out:req in:req
30         lsr \out, \in, #1
31         eor \out, \out, \in, LSL #2
32         eor \out, \out, \in, ROR #24
33         eor \out, \out, \in, ROR #9
34 .endm
35
36 .macro S32_2 out:req in:req
37         lsr \out, \in, #2
38         eor \out, \out, \in, LSL #1
39         eor \out, \out, \in, ROR #20
40         eor \out, \out, \in, ROR #7
41 .endm
42
43 .macro S32_3 out:req in:req
44         lsr \out, \in, #2
45         eor \out, \out, \in, LSL #2
46         eor \out, \out, \in, ROR #17
47         eor \out, \out, \in, ROR #3
48 .endm
49
50 .macro S32_4 in:req
51         eor \in, \in, \in, LSR #1
52 .endm
53
54 .macro S32_5 in:req
55         eor \in, \in, \in, LSR #2
56 .endm
57
58
59         .text
60         .align 2
61         .thumb
62         .thumb_func
63         .type   bmw_small_f0, %function
64         .global bmw_small_f0
65 bmw_small_f0:
66         push {r4, r5, r6, r7, r8, r9, r10, r11, r12, r14}
67
68 #include "f0_small_autogen_mix.i"
69
70         pop {r4, r5, r6, r7, r8, r9, r10, r11, r12, PC}
71