Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Alexey Brodkin | a67ef28 | 2015-02-03 13:58:20 +0300 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 1995, 1997, 2007-2013 Free Software Foundation, Inc. |
Alexey Brodkin | a67ef28 | 2015-02-03 13:58:20 +0300 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | /* ANSI concatenation macros. */ |
| 7 | |
| 8 | #define CONCAT1(a, b) CONCAT2(a, b) |
| 9 | #define CONCAT2(a, b) a ## b |
| 10 | |
| 11 | /* Use the right prefix for global labels. */ |
| 12 | |
| 13 | #define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x) |
| 14 | |
| 15 | #ifndef WORKING_ASSEMBLER |
| 16 | #define abs_l abs |
| 17 | #define asl_l asl |
| 18 | #define mov_l mov |
| 19 | #endif |
| 20 | |
| 21 | #define FUNC(X) .type SYM(X),@function |
| 22 | #define HIDDEN_FUNC(X) FUNC(X)` .hidden X |
| 23 | #define ENDFUNC0(X) .Lfe_##X: .size X,.Lfe_##X-X |
| 24 | #define ENDFUNC(X) ENDFUNC0(X) |
| 25 | |
| 26 | .section .text |
| 27 | .align 4 |
| 28 | .global SYM(__st_r13_to_r15) |
| 29 | .global SYM(__st_r13_to_r16) |
| 30 | .global SYM(__st_r13_to_r17) |
| 31 | .global SYM(__st_r13_to_r18) |
| 32 | .global SYM(__st_r13_to_r19) |
| 33 | .global SYM(__st_r13_to_r20) |
| 34 | .global SYM(__st_r13_to_r21) |
| 35 | .global SYM(__st_r13_to_r22) |
| 36 | .global SYM(__st_r13_to_r23) |
| 37 | .global SYM(__st_r13_to_r24) |
| 38 | .global SYM(__st_r13_to_r25) |
| 39 | HIDDEN_FUNC(__st_r13_to_r15) |
| 40 | HIDDEN_FUNC(__st_r13_to_r16) |
| 41 | HIDDEN_FUNC(__st_r13_to_r17) |
| 42 | HIDDEN_FUNC(__st_r13_to_r18) |
| 43 | HIDDEN_FUNC(__st_r13_to_r19) |
| 44 | HIDDEN_FUNC(__st_r13_to_r20) |
| 45 | HIDDEN_FUNC(__st_r13_to_r21) |
| 46 | HIDDEN_FUNC(__st_r13_to_r22) |
| 47 | HIDDEN_FUNC(__st_r13_to_r23) |
| 48 | HIDDEN_FUNC(__st_r13_to_r24) |
| 49 | HIDDEN_FUNC(__st_r13_to_r25) |
| 50 | .align 4 |
| 51 | SYM(__st_r13_to_r25): |
| 52 | st r25, [sp,48] |
| 53 | SYM(__st_r13_to_r24): |
| 54 | st r24, [sp,44] |
| 55 | SYM(__st_r13_to_r23): |
| 56 | st r23, [sp,40] |
| 57 | SYM(__st_r13_to_r22): |
| 58 | st r22, [sp,36] |
| 59 | SYM(__st_r13_to_r21): |
| 60 | st r21, [sp,32] |
| 61 | SYM(__st_r13_to_r20): |
| 62 | st r20, [sp,28] |
| 63 | SYM(__st_r13_to_r19): |
| 64 | st r19, [sp,24] |
| 65 | SYM(__st_r13_to_r18): |
| 66 | st r18, [sp,20] |
| 67 | SYM(__st_r13_to_r17): |
| 68 | st r17, [sp,16] |
| 69 | SYM(__st_r13_to_r16): |
| 70 | st r16, [sp,12] |
| 71 | SYM(__st_r13_to_r15): |
| 72 | #ifdef __ARC700__ |
| 73 | st r15, [sp,8] ; minimum function size to avoid stall: 6 bytes. |
| 74 | #else |
| 75 | st_s r15, [sp,8] |
| 76 | #endif |
| 77 | st_s r14, [sp,4] |
| 78 | j_s.d [%blink] |
| 79 | st_s r13, [sp,0] |
| 80 | ENDFUNC(__st_r13_to_r15) |
| 81 | ENDFUNC(__st_r13_to_r16) |
| 82 | ENDFUNC(__st_r13_to_r17) |
| 83 | ENDFUNC(__st_r13_to_r18) |
| 84 | ENDFUNC(__st_r13_to_r19) |
| 85 | ENDFUNC(__st_r13_to_r20) |
| 86 | ENDFUNC(__st_r13_to_r21) |
| 87 | ENDFUNC(__st_r13_to_r22) |
| 88 | ENDFUNC(__st_r13_to_r23) |
| 89 | ENDFUNC(__st_r13_to_r24) |
| 90 | ENDFUNC(__st_r13_to_r25) |
| 91 | |
| 92 | .section .text |
| 93 | .align 4 |
| 94 | ; ================================== |
| 95 | ; the loads |
| 96 | |
| 97 | .global SYM(__ld_r13_to_r15) |
| 98 | .global SYM(__ld_r13_to_r16) |
| 99 | .global SYM(__ld_r13_to_r17) |
| 100 | .global SYM(__ld_r13_to_r18) |
| 101 | .global SYM(__ld_r13_to_r19) |
| 102 | .global SYM(__ld_r13_to_r20) |
| 103 | .global SYM(__ld_r13_to_r21) |
| 104 | .global SYM(__ld_r13_to_r22) |
| 105 | .global SYM(__ld_r13_to_r23) |
| 106 | .global SYM(__ld_r13_to_r24) |
| 107 | .global SYM(__ld_r13_to_r25) |
| 108 | HIDDEN_FUNC(__ld_r13_to_r15) |
| 109 | HIDDEN_FUNC(__ld_r13_to_r16) |
| 110 | HIDDEN_FUNC(__ld_r13_to_r17) |
| 111 | HIDDEN_FUNC(__ld_r13_to_r18) |
| 112 | HIDDEN_FUNC(__ld_r13_to_r19) |
| 113 | HIDDEN_FUNC(__ld_r13_to_r20) |
| 114 | HIDDEN_FUNC(__ld_r13_to_r21) |
| 115 | HIDDEN_FUNC(__ld_r13_to_r22) |
| 116 | HIDDEN_FUNC(__ld_r13_to_r23) |
| 117 | HIDDEN_FUNC(__ld_r13_to_r24) |
| 118 | HIDDEN_FUNC(__ld_r13_to_r25) |
| 119 | SYM(__ld_r13_to_r25): |
| 120 | ld r25, [sp,48] |
| 121 | SYM(__ld_r13_to_r24): |
| 122 | ld r24, [sp,44] |
| 123 | SYM(__ld_r13_to_r23): |
| 124 | ld r23, [sp,40] |
| 125 | SYM(__ld_r13_to_r22): |
| 126 | ld r22, [sp,36] |
| 127 | SYM(__ld_r13_to_r21): |
| 128 | ld r21, [sp,32] |
| 129 | SYM(__ld_r13_to_r20): |
| 130 | ld r20, [sp,28] |
| 131 | SYM(__ld_r13_to_r19): |
| 132 | ld r19, [sp,24] |
| 133 | SYM(__ld_r13_to_r18): |
| 134 | ld r18, [sp,20] |
| 135 | SYM(__ld_r13_to_r17): |
| 136 | ld r17, [sp,16] |
| 137 | SYM(__ld_r13_to_r16): |
| 138 | ld r16, [sp,12] |
| 139 | SYM(__ld_r13_to_r15): |
| 140 | #ifdef __ARC700__ |
| 141 | ld r15, [sp,8] ; minimum function size to avoid stall: 6 bytes. |
| 142 | #else |
| 143 | ld_s r15, [sp,8] |
| 144 | #endif |
| 145 | ld_s r14, [sp,4] |
| 146 | j_s.d [%blink] |
| 147 | ld_s r13, [sp,0] |
| 148 | ENDFUNC(__ld_r13_to_r15) |
| 149 | ENDFUNC(__ld_r13_to_r16) |
| 150 | ENDFUNC(__ld_r13_to_r17) |
| 151 | ENDFUNC(__ld_r13_to_r18) |
| 152 | ENDFUNC(__ld_r13_to_r19) |
| 153 | ENDFUNC(__ld_r13_to_r20) |
| 154 | ENDFUNC(__ld_r13_to_r21) |
| 155 | ENDFUNC(__ld_r13_to_r22) |
| 156 | ENDFUNC(__ld_r13_to_r23) |
| 157 | ENDFUNC(__ld_r13_to_r24) |
| 158 | ENDFUNC(__ld_r13_to_r25) |
| 159 | |
| 160 | .global SYM(__ld_r13_to_r14_ret) |
| 161 | .global SYM(__ld_r13_to_r15_ret) |
| 162 | .global SYM(__ld_r13_to_r16_ret) |
| 163 | .global SYM(__ld_r13_to_r17_ret) |
| 164 | .global SYM(__ld_r13_to_r18_ret) |
| 165 | .global SYM(__ld_r13_to_r19_ret) |
| 166 | .global SYM(__ld_r13_to_r20_ret) |
| 167 | .global SYM(__ld_r13_to_r21_ret) |
| 168 | .global SYM(__ld_r13_to_r22_ret) |
| 169 | .global SYM(__ld_r13_to_r23_ret) |
| 170 | .global SYM(__ld_r13_to_r24_ret) |
| 171 | .global SYM(__ld_r13_to_r25_ret) |
| 172 | HIDDEN_FUNC(__ld_r13_to_r14_ret) |
| 173 | HIDDEN_FUNC(__ld_r13_to_r15_ret) |
| 174 | HIDDEN_FUNC(__ld_r13_to_r16_ret) |
| 175 | HIDDEN_FUNC(__ld_r13_to_r17_ret) |
| 176 | HIDDEN_FUNC(__ld_r13_to_r18_ret) |
| 177 | HIDDEN_FUNC(__ld_r13_to_r19_ret) |
| 178 | HIDDEN_FUNC(__ld_r13_to_r20_ret) |
| 179 | HIDDEN_FUNC(__ld_r13_to_r21_ret) |
| 180 | HIDDEN_FUNC(__ld_r13_to_r22_ret) |
| 181 | HIDDEN_FUNC(__ld_r13_to_r23_ret) |
| 182 | HIDDEN_FUNC(__ld_r13_to_r24_ret) |
| 183 | HIDDEN_FUNC(__ld_r13_to_r25_ret) |
| 184 | .section .text |
| 185 | .align 4 |
| 186 | SYM(__ld_r13_to_r25_ret): |
| 187 | ld r25, [sp,48] |
| 188 | SYM(__ld_r13_to_r24_ret): |
| 189 | ld r24, [sp,44] |
| 190 | SYM(__ld_r13_to_r23_ret): |
| 191 | ld r23, [sp,40] |
| 192 | SYM(__ld_r13_to_r22_ret): |
| 193 | ld r22, [sp,36] |
| 194 | SYM(__ld_r13_to_r21_ret): |
| 195 | ld r21, [sp,32] |
| 196 | SYM(__ld_r13_to_r20_ret): |
| 197 | ld r20, [sp,28] |
| 198 | SYM(__ld_r13_to_r19_ret): |
| 199 | ld r19, [sp,24] |
| 200 | SYM(__ld_r13_to_r18_ret): |
| 201 | ld r18, [sp,20] |
| 202 | SYM(__ld_r13_to_r17_ret): |
| 203 | ld r17, [sp,16] |
| 204 | SYM(__ld_r13_to_r16_ret): |
| 205 | ld r16, [sp,12] |
| 206 | SYM(__ld_r13_to_r15_ret): |
| 207 | ld r15, [sp,8] |
| 208 | SYM(__ld_r13_to_r14_ret): |
| 209 | ld blink,[sp,r12] |
| 210 | ld_s r14, [sp,4] |
| 211 | ld.ab r13, [sp,r12] |
| 212 | j_s.d [%blink] |
| 213 | add_s sp,sp,4 |
| 214 | ENDFUNC(__ld_r13_to_r14_ret) |
| 215 | ENDFUNC(__ld_r13_to_r15_ret) |
| 216 | ENDFUNC(__ld_r13_to_r16_ret) |
| 217 | ENDFUNC(__ld_r13_to_r17_ret) |
| 218 | ENDFUNC(__ld_r13_to_r18_ret) |
| 219 | ENDFUNC(__ld_r13_to_r19_ret) |
| 220 | ENDFUNC(__ld_r13_to_r20_ret) |
| 221 | ENDFUNC(__ld_r13_to_r21_ret) |
| 222 | ENDFUNC(__ld_r13_to_r22_ret) |
| 223 | ENDFUNC(__ld_r13_to_r23_ret) |
| 224 | ENDFUNC(__ld_r13_to_r24_ret) |
| 225 | ENDFUNC(__ld_r13_to_r25_ret) |