| OLD | NEW |
| 1 /*************************************************************************** | 1 /*************************************************************************** |
| 2 * Copyright (c) 2009,2010, Code Aurora Forum. All rights reserved. | 2 * Copyright (c) 2009,2010, Code Aurora Forum. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 ***************************************************************************/ | 6 ***************************************************************************/ |
| 7 | 7 |
| 8 /*************************************************************************** | 8 /*************************************************************************** |
| 9 Neon memset: Attempts to do a memset with Neon registers if possible, | 9 Neon memset: Attempts to do a memset with Neon registers if possible, |
| 10 Inputs: | 10 Inputs: |
| 11 s: The buffer to write to | 11 s: The buffer to write to |
| 12 c: The integer data to write to the buffer | 12 c: The integer data to write to the buffer |
| 13 n: The size_t count. | 13 n: The size_t count. |
| 14 Outputs: | 14 Outputs: |
| 15 | 15 |
| 16 ***************************************************************************/ | 16 ***************************************************************************/ |
| 17 | 17 |
| 18 .syntax unified | 18 .syntax unified |
| 19 | 19 |
| 20 .code 32 | 20 .code 32 |
| 21 .fpu neon | 21 .fpu neon |
| 22 .align 4 | 22 .align 4 |
| 23 .globl memset16_neon | 23 .globl memset16_neon |
| 24 .hidden memset16_neon |
| 24 | 25 |
| 25 memset16_neon: | 26 memset16_neon: |
| 26 cmp r2, #0 | 27 cmp r2, #0 |
| 27 bxeq lr | 28 bxeq lr |
| 28 | 29 |
| 29 /* Keep in mind that r2 -- the count argument -- is for the | 30 /* Keep in mind that r2 -- the count argument -- is for the |
| 30 * number of 16-bit items to copy. | 31 * number of 16-bit items to copy. |
| 31 */ | 32 */ |
| 32 lsl r2, r2, #1 | 33 lsl r2, r2, #1 |
| 33 | 34 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 str r1, [r0], #4 | 135 str r1, [r0], #4 |
| 135 memset_2: | 136 memset_2: |
| 136 cmp r2, #0 | 137 cmp r2, #0 |
| 137 ble memset_end | 138 ble memset_end |
| 138 strh r1, [r0], #2 | 139 strh r1, [r0], #2 |
| 139 memset_end: | 140 memset_end: |
| 140 pop {r0} | 141 pop {r0} |
| 141 bx lr | 142 bx lr |
| 142 | 143 |
| 143 .end | 144 .end |
| OLD | NEW |