X-Git-Url: https://git.cryptolib.org/?p=arm-crypto-lib.git;a=blobdiff_plain;f=bmw%2Fbmw_small_speed_asmmix_f0.S;fp=bmw%2Fbmw_small_speed_asmmix_f0.S;h=8225271c749074c89afcb0158ad68d269380a807;hp=0000000000000000000000000000000000000000;hb=3a80fbe29e33b818ccebbaba7f8bbe48c5ccd173;hpb=2a4779378a7bf4322a0e6b2024284092135e8a3d diff --git a/bmw/bmw_small_speed_asmmix_f0.S b/bmw/bmw_small_speed_asmmix_f0.S new file mode 100644 index 0000000..8225271 --- /dev/null +++ b/bmw/bmw_small_speed_asmmix_f0.S @@ -0,0 +1,71 @@ +/* bmw_small_speed_asm_f0.S */ +/* + This file is part of the ARM-Crypto-Lib. + Copyright (C) 2006-2010 Daniel Otte (daniel.otte@rub.de) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + + .syntax unified + +.macro S32_0 out:req in:req + lsr \out, \in, #1 + eor \out, \out, \in, LSL #3 + eor \out, \out, \in, ROR #28 + eor \out, \out, \in, ROR #13 +.endm + +.macro S32_1 out:req in:req + lsr \out, \in, #1 + eor \out, \out, \in, LSL #2 + eor \out, \out, \in, ROR #24 + eor \out, \out, \in, ROR #9 +.endm + +.macro S32_2 out:req in:req + lsr \out, \in, #2 + eor \out, \out, \in, LSL #1 + eor \out, \out, \in, ROR #20 + eor \out, \out, \in, ROR #7 +.endm + +.macro S32_3 out:req in:req + lsr \out, \in, #2 + eor \out, \out, \in, LSL #2 + eor \out, \out, \in, ROR #17 + eor \out, \out, \in, ROR #3 +.endm + +.macro S32_4 in:req + eor \in, \in, \in, LSR #1 +.endm + +.macro S32_5 in:req + eor \in, \in, \in, LSR #2 +.endm + + + .text + .align 2 + .thumb + .thumb_func + .type bmw_small_f0, %function + .global bmw_small_f0 +bmw_small_f0: + push {r4, r5, r6, r7, r8, r9, r10, r11, r12, r14} + +#include "f0_small_autogen_mix.i" + + pop {r4, r5, r6, r7, r8, r9, r10, r11, r12, PC} +