1@/****************************************************************************** 2@ * 3@ * Copyright (C) 2018 The Android Open Source Project 4@ * 5@ * Licensed under the Apache License, Version 2.0 (the "License"); 6@ * you may not use this file except in compliance with the License. 7@ * You may obtain a copy of the License at: 8@ * 9@ * http://www.apache.org/licenses/LICENSE-2.0 10@ * 11@ * Unless required by applicable law or agreed to in writing, software 12@ * distributed under the License is distributed on an "AS IS" BASIS, 13@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14@ * See the License for the specific language governing permissions and 15@ * limitations under the License. 16@ * 17@ ***************************************************************************** 18@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore 19@*/ 20 21 22 .code 32 23 .eabi_attribute 24, 1 @Tag_ABI_align_needed 24 .eabi_attribute 25, 1 @Tag_ABI_align_preserved 25.text 26.p2align 2 27 .global ixheaacd_shiftrountine 28 .type ixheaacd_shiftrountine, %function 29ixheaacd_shiftrountine: 30 CMP r3, #0 31 STMFD sp!, {r4-r7, r12} 32 MOV r12, #0x1f 33 BGE SROUTINE_L1 34 RSB r3, r3, #0 35 CMP r3, r12 36 MOVGT r3, r12 37 SUBS r2, r2, #2 38@ LDMMIFD sp!, {r4-r7, r12} 39 LDMFDMI sp!, {r4-r7, r12} 40 BXMI lr 41SROUTINE_L2: 42 LDR r12, [r0, #0] 43 LDR r4, [r1, #0] 44 MOV r12, r12, ASR r3 45 MOV r4, r4, ASR r3 46 STR r12, [r0], #4 47 STR r4, [r1], #4 48 49 LDR r12, [r0, #0] 50 LDR r4, [r1, #0] 51 MOV r12, r12, ASR r3 52 MOV r4, r4, ASR r3 53 SUBS r2, r2, #2 54 STR r12, [r0], #4 55 STR r4, [r1], #4 56 57 BPL SROUTINE_L2 58 LDMFD sp!, {r4-r7, r12} 59 BX lr 60SROUTINE_L1: 61 SUBS r4, r2, #2 62 RSB r2, r3, #0x1f 63@ LDMMIFD sp!, {r4-r7, r12} 64 LDMFDMI sp!, {r4-r7, r12} 65 BXMI lr 66SROUTINE_L3: 67 LDR r12, [r0, #0] 68 LDR r5, [r1, #0] 69 70 MOVS r7, r12, ASR r2 71 CMNLT r7, #1 72 MOVLT r6, #0x80000000 73 MVNGT r6, #0x80000000 74 MOVEQ r6, r12, LSL r3 75 76 MOVS r7, r5, ASR r2 77 CMNLT r7, #1 78 MOVLT r12, #0x80000000 79 MVNGT r12, #0x80000000 80 MOVEQ r12, r5, LSL r3 81 STR r6, [r0], #4 82 STR r12, [r1], #4 83 84 LDR r12, [r0, #0] 85 LDR r5, [r1, #0] 86 87 MOVS r7, r12, ASR r2 88 CMNLT r7, #1 89 MOVLT r6, #0x80000000 90 MVNGT r6, #0x80000000 91 MOVEQ r6, r12, LSL r3 92 93 MOVS r7, r5, ASR r2 94 CMNLT r7, #1 95 MOVLT r12, #0x80000000 96 MVNGT r12, #0x80000000 97 MOVEQ r12, r5, LSL r3 98 SUBS r4, r4, #2 99 STR r6, [r0], #4 100 STR r12, [r1], #4 101 102 BPL SROUTINE_L3 103 LDMFD sp!, {r4-r7, r12} 104 BX lr 105 106 107