Rev 20 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 1
1 .cpu cortex-m3
2 .eabi_attribute 20, 1
3 .eabi_attribute 21, 1
4 .eabi_attribute 23, 3
5 .eabi_attribute 24, 1
6 .eabi_attribute 25, 1
7 .eabi_attribute 26, 1
8 .eabi_attribute 30, 1
9 .eabi_attribute 34, 1
10 .eabi_attribute 18, 4
11 .file "small_printf.c"
12 .text
13 .Ltext0:
14 .cfi_sections .debug_frame
15 .section .text.printchar,"ax",%progbits
16 .align 1
17 .arch armv7-m
18 .syntax unified
19 .thumb
20 .thumb_func
21 .fpu softvfp
23 printchar:
24 .LVL0:
25 .LFB3:
26 .file 1 "../libSmallPrintf/src/small_printf.c"
1:../libSmallPrintf/src/small_printf.c **** /*
2:../libSmallPrintf/src/small_printf.c **** Copyright 2001, 2002 Georges Menie (www.menie.org)
3:../libSmallPrintf/src/small_printf.c **** stdarg version contributed by Christian Ettinger
4:../libSmallPrintf/src/small_printf.c ****
5:../libSmallPrintf/src/small_printf.c **** This program is free software; you can redistribute it and/or modify
6:../libSmallPrintf/src/small_printf.c **** it under the terms of the GNU Lesser General Public License as published by
7:../libSmallPrintf/src/small_printf.c **** the Free Software Foundation; either version 2 of the License, or
8:../libSmallPrintf/src/small_printf.c **** (at your option) any later version.
9:../libSmallPrintf/src/small_printf.c ****
10:../libSmallPrintf/src/small_printf.c **** This program is distributed in the hope that it will be useful,
11:../libSmallPrintf/src/small_printf.c **** but WITHOUT ANY WARRANTY; without even the implied warranty of
12:../libSmallPrintf/src/small_printf.c **** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13:../libSmallPrintf/src/small_printf.c **** GNU Lesser General Public License for more details.
14:../libSmallPrintf/src/small_printf.c ****
15:../libSmallPrintf/src/small_printf.c **** You should have received a copy of the GNU Lesser General Public License
16:../libSmallPrintf/src/small_printf.c **** along with this program; if not, write to the Free Software
17:../libSmallPrintf/src/small_printf.c **** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18:../libSmallPrintf/src/small_printf.c **** */
19:../libSmallPrintf/src/small_printf.c ****
20:../libSmallPrintf/src/small_printf.c **** /* Includes */
21:../libSmallPrintf/src/small_printf.c ****
22:../libSmallPrintf/src/small_printf.c ****
23:../libSmallPrintf/src/small_printf.c **** #include "libSmallPrintf/small_printf.h"
24:../libSmallPrintf/src/small_printf.c ****
25:../libSmallPrintf/src/small_printf.c **** #include <stdarg.h>
26:../libSmallPrintf/src/small_printf.c **** #include <stdio.h>
27:../libSmallPrintf/src/small_printf.c **** #include <string.h>
28:../libSmallPrintf/src/small_printf.c ****
29:../libSmallPrintf/src/small_printf.c **** /*
30:../libSmallPrintf/src/small_printf.c **** putchar is the only external dependency for this file,
31:../libSmallPrintf/src/small_printf.c **** if you have a working putchar, leave it commented out.
32:../libSmallPrintf/src/small_printf.c **** If not, uncomment the define below and
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 2
33:../libSmallPrintf/src/small_printf.c **** replace outbyte(c) by your own function call.
34:../libSmallPrintf/src/small_printf.c **** */
35:../libSmallPrintf/src/small_printf.c ****
36:../libSmallPrintf/src/small_printf.c ****
37:../libSmallPrintf/src/small_printf.c ****
38:../libSmallPrintf/src/small_printf.c **** static void printchar(char **str, int c)
39:../libSmallPrintf/src/small_printf.c **** {
27 .loc 1 39 1 view -0
28 .cfi_startproc
29 @ args = 0, pretend = 0, frame = 0
30 @ frame_needed = 0, uses_anonymous_args = 0
31 .loc 1 39 1 is_stmt 0 view .LVU1
32 0000 08B5 push {r3, lr}
33 .LCFI0:
34 .cfi_def_cfa_offset 8
35 .cfi_offset 3, -8
36 .cfi_offset 14, -4
40:../libSmallPrintf/src/small_printf.c ****
41:../libSmallPrintf/src/small_printf.c ****
42:../libSmallPrintf/src/small_printf.c **** if (str) {
37 .loc 1 42 2 is_stmt 1 view .LVU2
38 .loc 1 42 5 is_stmt 0 view .LVU3
39 0002 28B1 cbz r0, .L2
43:../libSmallPrintf/src/small_printf.c **** **str = c;
40 .loc 1 43 3 is_stmt 1 view .LVU4
41 .loc 1 43 4 is_stmt 0 view .LVU5
42 0004 0268 ldr r2, [r0]
43 .loc 1 43 9 view .LVU6
44 0006 1170 strb r1, [r2]
44:../libSmallPrintf/src/small_printf.c **** ++(*str);
45 .loc 1 44 3 is_stmt 1 view .LVU7
46 .loc 1 44 6 is_stmt 0 view .LVU8
47 0008 0268 ldr r2, [r0]
48 .loc 1 44 3 view .LVU9
49 000a 0132 adds r2, r2, #1
50 000c 0260 str r2, [r0]
51 .LVL1:
52 .L1:
45:../libSmallPrintf/src/small_printf.c **** }
46:../libSmallPrintf/src/small_printf.c **** else (void)PutCharSerial(c);
47:../libSmallPrintf/src/small_printf.c **** }
53 .loc 1 47 1 view .LVU10
54 000e 08BD pop {r3, pc}
55 .LVL2:
56 .L2:
57 .loc 1 47 1 view .LVU11
58 0010 0846 mov r0, r1
59 .LVL3:
60 .LBB2:
46:../libSmallPrintf/src/small_printf.c **** }
61 .loc 1 46 7 is_stmt 1 view .LVU12
46:../libSmallPrintf/src/small_printf.c **** }
62 .loc 1 46 13 is_stmt 0 view .LVU13
63 0012 FFF7FEFF bl PutCharSerial
64 .LVL4:
46:../libSmallPrintf/src/small_printf.c **** }
65 .loc 1 46 13 view .LVU14
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 3
66 .LBE2:
67 .loc 1 47 1 view .LVU15
68 0016 FAE7 b .L1
69 .cfi_endproc
70 .LFE3:
72 .section .text.prints,"ax",%progbits
73 .align 1
74 .syntax unified
75 .thumb
76 .thumb_func
77 .fpu softvfp
79 prints:
80 .LVL5:
81 .LFB4:
48:../libSmallPrintf/src/small_printf.c ****
49:../libSmallPrintf/src/small_printf.c **** #define PAD_RIGHT 1
50:../libSmallPrintf/src/small_printf.c **** #define PAD_ZERO 2
51:../libSmallPrintf/src/small_printf.c ****
52:../libSmallPrintf/src/small_printf.c **** static int prints(char **out, const char *string, int width, int pad)
53:../libSmallPrintf/src/small_printf.c **** {
82 .loc 1 53 1 is_stmt 1 view -0
83 .cfi_startproc
84 @ args = 0, pretend = 0, frame = 0
85 @ frame_needed = 0, uses_anonymous_args = 0
86 .loc 1 53 1 is_stmt 0 view .LVU17
87 0000 2DE9F041 push {r4, r5, r6, r7, r8, lr}
88 .LCFI1:
89 .cfi_def_cfa_offset 24
90 .cfi_offset 4, -24
91 .cfi_offset 5, -20
92 .cfi_offset 6, -16
93 .cfi_offset 7, -12
94 .cfi_offset 8, -8
95 .cfi_offset 14, -4
96 0004 0746 mov r7, r0
97 0006 0E46 mov r6, r1
54:../libSmallPrintf/src/small_printf.c **** register int pc = 0, padchar = ' ';
98 .loc 1 54 2 is_stmt 1 view .LVU18
99 .LVL6:
55:../libSmallPrintf/src/small_printf.c ****
56:../libSmallPrintf/src/small_printf.c **** if (width > 0) {
100 .loc 1 56 2 view .LVU19
101 .loc 1 56 5 is_stmt 0 view .LVU20
102 0008 151E subs r5, r2, #0
103 000a 06DD ble .L21
104 .LBB3:
57:../libSmallPrintf/src/small_printf.c **** register int len = 0;
58:../libSmallPrintf/src/small_printf.c **** register const char *ptr;
59:../libSmallPrintf/src/small_printf.c **** for (ptr = string; *ptr; ++ptr) ++len;
105 .loc 1 59 12 view .LVU21
106 000c 0A46 mov r2, r1
107 .LVL7:
57:../libSmallPrintf/src/small_printf.c **** register int len = 0;
108 .loc 1 57 16 view .LVU22
109 000e 0021 movs r1, #0
110 .LVL8:
111 .L6:
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 4
112 .loc 1 59 22 discriminator 1 view .LVU23
113 0010 1078 ldrb r0, [r2] @ zero_extendqisi2
114 .loc 1 59 3 discriminator 1 view .LVU24
115 0012 80B1 cbz r0, .L22
116 .loc 1 59 35 is_stmt 1 discriminator 3 view .LVU25
117 0014 0131 adds r1, r1, #1
118 .LVL9:
119 .loc 1 59 28 is_stmt 0 discriminator 3 view .LVU26
120 0016 0132 adds r2, r2, #1
121 .LVL10:
122 .loc 1 59 28 discriminator 3 view .LVU27
123 0018 FAE7 b .L6
124 .LVL11:
125 .L21:
126 .loc 1 59 28 discriminator 3 view .LVU28
127 .LBE3:
54:../libSmallPrintf/src/small_printf.c ****
128 .loc 1 54 23 view .LVU29
129 001a 4FF02008 mov r8, #32
130 .LVL12:
131 .L7:
60:../libSmallPrintf/src/small_printf.c **** if (len >= width) width = 0;
61:../libSmallPrintf/src/small_printf.c **** else width -= len;
62:../libSmallPrintf/src/small_printf.c **** if (pad & PAD_ZERO) padchar = '0';
63:../libSmallPrintf/src/small_printf.c **** }
64:../libSmallPrintf/src/small_printf.c **** if (!(pad & PAD_RIGHT)) {
132 .loc 1 64 2 is_stmt 1 view .LVU30
133 .loc 1 64 5 is_stmt 0 view .LVU31
134 001e 13F00104 ands r4, r3, #1
135 0022 1CD0 beq .L10
54:../libSmallPrintf/src/small_printf.c ****
136 .loc 1 54 15 view .LVU32
137 0024 0024 movs r4, #0
138 .LVL13:
139 .L13:
65:../libSmallPrintf/src/small_printf.c **** for ( ; width > 0; --width) {
66:../libSmallPrintf/src/small_printf.c **** printchar (out, padchar);
67:../libSmallPrintf/src/small_printf.c **** ++pc;
68:../libSmallPrintf/src/small_printf.c **** }
69:../libSmallPrintf/src/small_printf.c **** }
70:../libSmallPrintf/src/small_printf.c **** for ( ; *string ; ++string) {
140 .loc 1 70 10 discriminator 1 view .LVU33
141 0026 3178 ldrb r1, [r6] @ zero_extendqisi2
142 .loc 1 70 2 discriminator 1 view .LVU34
143 0028 11B3 cbz r1, .L15
71:../libSmallPrintf/src/small_printf.c **** printchar (out, *string);
144 .loc 1 71 3 is_stmt 1 discriminator 2 view .LVU35
145 002a 3846 mov r0, r7
146 002c FFF7FEFF bl printchar
147 .LVL14:
72:../libSmallPrintf/src/small_printf.c **** ++pc;
148 .loc 1 72 3 discriminator 2 view .LVU36
149 0030 0134 adds r4, r4, #1
150 .LVL15:
70:../libSmallPrintf/src/small_printf.c **** printchar (out, *string);
151 .loc 1 70 20 is_stmt 0 discriminator 2 view .LVU37
152 0032 0136 adds r6, r6, #1
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 5
153 .LVL16:
70:../libSmallPrintf/src/small_printf.c **** printchar (out, *string);
154 .loc 1 70 20 discriminator 2 view .LVU38
155 0034 F7E7 b .L13
156 .LVL17:
157 .L22:
158 .LBB4:
60:../libSmallPrintf/src/small_printf.c **** else width -= len;
159 .loc 1 60 3 is_stmt 1 view .LVU39
60:../libSmallPrintf/src/small_printf.c **** else width -= len;
160 .loc 1 60 6 is_stmt 0 view .LVU40
161 0036 A942 cmp r1, r5
162 0038 01DA bge .L18
61:../libSmallPrintf/src/small_printf.c **** if (pad & PAD_ZERO) padchar = '0';
163 .loc 1 61 8 is_stmt 1 view .LVU41
61:../libSmallPrintf/src/small_printf.c **** if (pad & PAD_ZERO) padchar = '0';
164 .loc 1 61 14 is_stmt 0 view .LVU42
165 003a 6D1A subs r5, r5, r1
166 .LVL18:
61:../libSmallPrintf/src/small_printf.c **** if (pad & PAD_ZERO) padchar = '0';
167 .loc 1 61 14 view .LVU43
168 003c 00E0 b .L9
169 .L18:
60:../libSmallPrintf/src/small_printf.c **** else width -= len;
170 .loc 1 60 27 view .LVU44
171 003e 0025 movs r5, #0
172 .LVL19:
173 .L9:
62:../libSmallPrintf/src/small_printf.c **** }
174 .loc 1 62 3 is_stmt 1 view .LVU45
62:../libSmallPrintf/src/small_printf.c **** }
175 .loc 1 62 6 is_stmt 0 view .LVU46
176 0040 13F0020F tst r3, #2
177 0044 02D1 bne .L19
178 .LBE4:
54:../libSmallPrintf/src/small_printf.c ****
179 .loc 1 54 23 view .LVU47
180 0046 4FF02008 mov r8, #32
181 004a E8E7 b .L7
182 .L19:
183 .LBB5:
62:../libSmallPrintf/src/small_printf.c **** }
184 .loc 1 62 31 view .LVU48
185 004c 4FF03008 mov r8, #48
186 0050 E5E7 b .L7
187 .LVL20:
188 .L12:
62:../libSmallPrintf/src/small_printf.c **** }
189 .loc 1 62 31 view .LVU49
190 .LBE5:
66:../libSmallPrintf/src/small_printf.c **** ++pc;
191 .loc 1 66 4 is_stmt 1 discriminator 2 view .LVU50
192 0052 4146 mov r1, r8
193 0054 3846 mov r0, r7
194 0056 FFF7FEFF bl printchar
195 .LVL21:
67:../libSmallPrintf/src/small_printf.c **** }
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 6
196 .loc 1 67 4 discriminator 2 view .LVU51
197 005a 0134 adds r4, r4, #1
198 .LVL22:
65:../libSmallPrintf/src/small_printf.c **** printchar (out, padchar);
199 .loc 1 65 22 is_stmt 0 discriminator 2 view .LVU52
200 005c 013D subs r5, r5, #1
201 .LVL23:
202 .L10:
65:../libSmallPrintf/src/small_printf.c **** printchar (out, padchar);
203 .loc 1 65 3 discriminator 1 view .LVU53
204 005e 002D cmp r5, #0
205 0060 F7DC bgt .L12
65:../libSmallPrintf/src/small_printf.c **** printchar (out, padchar);
206 .loc 1 65 3 discriminator 1 view .LVU54
207 0062 E0E7 b .L13
208 .L16:
73:../libSmallPrintf/src/small_printf.c **** }
74:../libSmallPrintf/src/small_printf.c **** for ( ; width > 0; --width) {
75:../libSmallPrintf/src/small_printf.c **** printchar (out, padchar);
209 .loc 1 75 3 is_stmt 1 discriminator 2 view .LVU55
210 0064 4146 mov r1, r8
211 0066 3846 mov r0, r7
212 0068 FFF7FEFF bl printchar
213 .LVL24:
76:../libSmallPrintf/src/small_printf.c **** ++pc;
214 .loc 1 76 3 discriminator 2 view .LVU56
215 006c 0134 adds r4, r4, #1
216 .LVL25:
74:../libSmallPrintf/src/small_printf.c **** printchar (out, padchar);
217 .loc 1 74 21 is_stmt 0 discriminator 2 view .LVU57
218 006e 013D subs r5, r5, #1
219 .LVL26:
220 .L15:
74:../libSmallPrintf/src/small_printf.c **** printchar (out, padchar);
221 .loc 1 74 2 discriminator 1 view .LVU58
222 0070 002D cmp r5, #0
223 0072 F7DC bgt .L16
77:../libSmallPrintf/src/small_printf.c **** }
78:../libSmallPrintf/src/small_printf.c ****
79:../libSmallPrintf/src/small_printf.c **** return pc;
224 .loc 1 79 2 is_stmt 1 view .LVU59
80:../libSmallPrintf/src/small_printf.c **** }
225 .loc 1 80 1 is_stmt 0 view .LVU60
226 0074 2046 mov r0, r4
227 0076 BDE8F081 pop {r4, r5, r6, r7, r8, pc}
228 .loc 1 80 1 view .LVU61
229 .cfi_endproc
230 .LFE4:
232 .section .text.printi,"ax",%progbits
233 .align 1
234 .syntax unified
235 .thumb
236 .thumb_func
237 .fpu softvfp
239 printi:
240 .LVL27:
241 .LFB5:
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 7
81:../libSmallPrintf/src/small_printf.c ****
82:../libSmallPrintf/src/small_printf.c **** /* the following should be enough for 32 bit int */
83:../libSmallPrintf/src/small_printf.c **** #define PRINT_BUF_LEN 12
84:../libSmallPrintf/src/small_printf.c ****
85:../libSmallPrintf/src/small_printf.c **** static int printi(char **out, int i, int b, int sg, int width, int pad, int letbase)
86:../libSmallPrintf/src/small_printf.c **** {
242 .loc 1 86 1 is_stmt 1 view -0
243 .cfi_startproc
244 @ args = 12, pretend = 0, frame = 16
245 @ frame_needed = 0, uses_anonymous_args = 0
246 .loc 1 86 1 is_stmt 0 view .LVU63
247 0000 F0B5 push {r4, r5, r6, r7, lr}
248 .LCFI2:
249 .cfi_def_cfa_offset 20
250 .cfi_offset 4, -20
251 .cfi_offset 5, -16
252 .cfi_offset 6, -12
253 .cfi_offset 7, -8
254 .cfi_offset 14, -4
255 0002 85B0 sub sp, sp, #20
256 .LCFI3:
257 .cfi_def_cfa_offset 40
258 0004 0746 mov r7, r0
259 0006 0C98 ldr r0, [sp, #48]
260 .LVL28:
87:../libSmallPrintf/src/small_printf.c **** char print_buf[PRINT_BUF_LEN];
261 .loc 1 87 2 is_stmt 1 view .LVU64
88:../libSmallPrintf/src/small_printf.c **** register char *s;
262 .loc 1 88 2 view .LVU65
89:../libSmallPrintf/src/small_printf.c **** register int t, neg = 0, pc = 0;
263 .loc 1 89 2 view .LVU66
90:../libSmallPrintf/src/small_printf.c **** register unsigned int u = i;
264 .loc 1 90 2 view .LVU67
91:../libSmallPrintf/src/small_printf.c ****
92:../libSmallPrintf/src/small_printf.c **** if (i == 0) {
265 .loc 1 92 2 view .LVU68
266 .loc 1 92 5 is_stmt 0 view .LVU69
267 0008 59B1 cbz r1, .L35
268 000a 1E46 mov r6, r3
269 000c 0C46 mov r4, r1
93:../libSmallPrintf/src/small_printf.c **** print_buf[0] = '0';
94:../libSmallPrintf/src/small_printf.c **** print_buf[1] = '\0';
95:../libSmallPrintf/src/small_printf.c **** return prints (out, print_buf, width, pad);
96:../libSmallPrintf/src/small_printf.c **** }
97:../libSmallPrintf/src/small_printf.c ****
98:../libSmallPrintf/src/small_printf.c **** if (sg && b == 10 && i < 0) {
270 .loc 1 98 2 is_stmt 1 view .LVU70
271 .loc 1 98 5 is_stmt 0 view .LVU71
272 000e 13B1 cbz r3, .L26
273 .loc 1 98 9 discriminator 1 view .LVU72
274 0010 0A2A cmp r2, #10
275 0012 13D0 beq .L36
89:../libSmallPrintf/src/small_printf.c **** register unsigned int u = i;
276 .loc 1 89 18 view .LVU73
277 0014 0026 movs r6, #0
278 .LVL29:
279 .L26:
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 8
99:../libSmallPrintf/src/small_printf.c **** neg = 1;
100:../libSmallPrintf/src/small_printf.c **** u = -i;
101:../libSmallPrintf/src/small_printf.c **** }
102:../libSmallPrintf/src/small_printf.c ****
103:../libSmallPrintf/src/small_printf.c **** s = print_buf + PRINT_BUF_LEN-1;
280 .loc 1 103 2 is_stmt 1 view .LVU74
104:../libSmallPrintf/src/small_printf.c **** *s = '\0';
281 .loc 1 104 2 view .LVU75
282 .loc 1 104 5 is_stmt 0 view .LVU76
283 0016 0023 movs r3, #0
284 .LVL30:
285 .loc 1 104 5 view .LVU77
286 0018 8DF80F30 strb r3, [sp, #15]
105:../libSmallPrintf/src/small_printf.c ****
106:../libSmallPrintf/src/small_printf.c **** while (u) {
287 .loc 1 106 2 is_stmt 1 view .LVU78
103:../libSmallPrintf/src/small_printf.c **** *s = '\0';
288 .loc 1 103 4 is_stmt 0 view .LVU79
289 001c 0DF10F05 add r5, sp, #15
290 .LVL31:
291 .loc 1 106 8 view .LVU80
292 0020 18E0 b .L27
293 .LVL32:
294 .L35:
93:../libSmallPrintf/src/small_printf.c **** print_buf[1] = '\0';
295 .loc 1 93 3 is_stmt 1 view .LVU81
93:../libSmallPrintf/src/small_printf.c **** print_buf[1] = '\0';
296 .loc 1 93 16 is_stmt 0 view .LVU82
297 0022 3023 movs r3, #48
298 .LVL33:
93:../libSmallPrintf/src/small_printf.c **** print_buf[1] = '\0';
299 .loc 1 93 16 view .LVU83
300 0024 8DF80430 strb r3, [sp, #4]
94:../libSmallPrintf/src/small_printf.c **** return prints (out, print_buf, width, pad);
301 .loc 1 94 3 is_stmt 1 view .LVU84
94:../libSmallPrintf/src/small_printf.c **** return prints (out, print_buf, width, pad);
302 .loc 1 94 16 is_stmt 0 view .LVU85
303 0028 0023 movs r3, #0
304 002a 8DF80530 strb r3, [sp, #5]
95:../libSmallPrintf/src/small_printf.c **** }
305 .loc 1 95 3 is_stmt 1 view .LVU86
95:../libSmallPrintf/src/small_printf.c **** }
306 .loc 1 95 10 is_stmt 0 view .LVU87
307 002e 0B9B ldr r3, [sp, #44]
308 0030 0A9A ldr r2, [sp, #40]
309 .LVL34:
95:../libSmallPrintf/src/small_printf.c **** }
310 .loc 1 95 10 view .LVU88
311 0032 01A9 add r1, sp, #4
312 .LVL35:
95:../libSmallPrintf/src/small_printf.c **** }
313 .loc 1 95 10 view .LVU89
314 0034 3846 mov r0, r7
315 0036 FFF7FEFF bl prints
316 .LVL36:
317 003a 29E0 b .L23
318 .LVL37:
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 9
319 .L36:
98:../libSmallPrintf/src/small_printf.c **** neg = 1;
320 .loc 1 98 20 discriminator 2 view .LVU90
321 003c 0029 cmp r1, #0
322 003e 01DB blt .L37
89:../libSmallPrintf/src/small_printf.c **** register unsigned int u = i;
323 .loc 1 89 18 view .LVU91
324 0040 0026 movs r6, #0
325 0042 E8E7 b .L26
326 .L37:
99:../libSmallPrintf/src/small_printf.c **** u = -i;
327 .loc 1 99 3 is_stmt 1 view .LVU92
328 .LVL38:
100:../libSmallPrintf/src/small_printf.c **** }
329 .loc 1 100 3 view .LVU93
100:../libSmallPrintf/src/small_printf.c **** }
330 .loc 1 100 7 is_stmt 0 view .LVU94
331 0044 4C42 rsbs r4, r1, #0
332 .LVL39:
99:../libSmallPrintf/src/small_printf.c **** u = -i;
333 .loc 1 99 7 view .LVU95
334 0046 0126 movs r6, #1
335 0048 E5E7 b .L26
336 .LVL40:
337 .L28:
107:../libSmallPrintf/src/small_printf.c **** t = u % b;
108:../libSmallPrintf/src/small_printf.c **** if( t >= 10 )
109:../libSmallPrintf/src/small_printf.c **** t += letbase - '0' - 10;
110:../libSmallPrintf/src/small_printf.c **** *--s = t + '0';
338 .loc 1 110 3 is_stmt 1 view .LVU96
339 .loc 1 110 12 is_stmt 0 view .LVU97
340 004a 3033 adds r3, r3, #48
341 .LVL41:
342 .loc 1 110 8 view .LVU98
343 004c 05F8013D strb r3, [r5, #-1]!
344 .LVL42:
111:../libSmallPrintf/src/small_printf.c **** u /= b;
345 .loc 1 111 3 is_stmt 1 view .LVU99
346 .loc 1 111 5 is_stmt 0 view .LVU100
347 0050 B4FBF2F4 udiv r4, r4, r2
348 .LVL43:
349 .L27:
106:../libSmallPrintf/src/small_printf.c **** t = u % b;
350 .loc 1 106 8 view .LVU101
351 0054 4CB1 cbz r4, .L38
107:../libSmallPrintf/src/small_printf.c **** t = u % b;
352 .loc 1 107 3 is_stmt 1 view .LVU102
107:../libSmallPrintf/src/small_printf.c **** t = u % b;
353 .loc 1 107 9 is_stmt 0 view .LVU103
354 0056 B4FBF2F3 udiv r3, r4, r2
355 005a 02FB1343 mls r3, r2, r3, r4
356 .LVL44:
108:../libSmallPrintf/src/small_printf.c **** t += letbase - '0' - 10;
357 .loc 1 108 3 is_stmt 1 view .LVU104
108:../libSmallPrintf/src/small_printf.c **** t += letbase - '0' - 10;
358 .loc 1 108 5 is_stmt 0 view .LVU105
359 005e 092B cmp r3, #9
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 10
360 0060 F3DD ble .L28
109:../libSmallPrintf/src/small_printf.c **** *--s = t + '0';
361 .loc 1 109 4 is_stmt 1 view .LVU106
109:../libSmallPrintf/src/small_printf.c **** *--s = t + '0';
362 .loc 1 109 23 is_stmt 0 view .LVU107
363 0062 A0F13A01 sub r1, r0, #58
109:../libSmallPrintf/src/small_printf.c **** *--s = t + '0';
364 .loc 1 109 6 view .LVU108
365 0066 0B44 add r3, r3, r1
366 .LVL45:
109:../libSmallPrintf/src/small_printf.c **** *--s = t + '0';
367 .loc 1 109 6 view .LVU109
368 0068 EFE7 b .L28
369 .LVL46:
370 .L38:
112:../libSmallPrintf/src/small_printf.c **** }
113:../libSmallPrintf/src/small_printf.c ****
114:../libSmallPrintf/src/small_printf.c **** if (neg) {
371 .loc 1 114 2 is_stmt 1 view .LVU110
372 .loc 1 114 5 is_stmt 0 view .LVU111
373 006a 56B1 cbz r6, .L30
115:../libSmallPrintf/src/small_printf.c **** if( width && (pad & PAD_ZERO) ) {
374 .loc 1 115 3 is_stmt 1 view .LVU112
375 .loc 1 115 5 is_stmt 0 view .LVU113
376 006c 0A9B ldr r3, [sp, #40]
377 006e 1BB1 cbz r3, .L31
378 .loc 1 115 13 discriminator 1 view .LVU114
379 0070 0B9B ldr r3, [sp, #44]
380 0072 13F0020F tst r3, #2
381 0076 0DD1 bne .L39
382 .L31:
116:../libSmallPrintf/src/small_printf.c **** printchar (out, '-');
117:../libSmallPrintf/src/small_printf.c **** ++pc;
118:../libSmallPrintf/src/small_printf.c **** --width;
119:../libSmallPrintf/src/small_printf.c **** }
120:../libSmallPrintf/src/small_printf.c **** else {
121:../libSmallPrintf/src/small_printf.c **** *--s = '-';
383 .loc 1 121 4 is_stmt 1 view .LVU115
384 .LVL47:
385 .loc 1 121 9 is_stmt 0 view .LVU116
386 0078 2D23 movs r3, #45
387 007a 05F8013C strb r3, [r5, #-1]
388 007e 013D subs r5, r5, #1
389 .LVL48:
89:../libSmallPrintf/src/small_printf.c **** register unsigned int u = i;
390 .loc 1 89 27 view .LVU117
391 0080 0026 movs r6, #0
392 .LVL49:
393 .L30:
122:../libSmallPrintf/src/small_printf.c **** }
123:../libSmallPrintf/src/small_printf.c **** }
124:../libSmallPrintf/src/small_printf.c ****
125:../libSmallPrintf/src/small_printf.c **** return pc + prints (out, s, width, pad);
394 .loc 1 125 2 is_stmt 1 view .LVU118
395 .loc 1 125 14 is_stmt 0 view .LVU119
396 0082 0B9B ldr r3, [sp, #44]
397 0084 0A9A ldr r2, [sp, #40]
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 11
398 0086 2946 mov r1, r5
399 0088 3846 mov r0, r7
400 008a FFF7FEFF bl prints
401 .LVL50:
402 .loc 1 125 12 view .LVU120
403 008e 3044 add r0, r0, r6
404 .LVL51:
405 .L23:
126:../libSmallPrintf/src/small_printf.c **** }
406 .loc 1 126 1 view .LVU121
407 0090 05B0 add sp, sp, #20
408 .LCFI4:
409 .cfi_remember_state
410 .cfi_def_cfa_offset 20
411 @ sp needed
412 0092 F0BD pop {r4, r5, r6, r7, pc}
413 .LVL52:
414 .L39:
415 .LCFI5:
416 .cfi_restore_state
116:../libSmallPrintf/src/small_printf.c **** ++pc;
417 .loc 1 116 4 is_stmt 1 view .LVU122
418 0094 2D21 movs r1, #45
419 0096 3846 mov r0, r7
420 0098 FFF7FEFF bl printchar
421 .LVL53:
117:../libSmallPrintf/src/small_printf.c **** --width;
422 .loc 1 117 4 view .LVU123
118:../libSmallPrintf/src/small_printf.c **** }
423 .loc 1 118 4 view .LVU124
424 009c 0A9B ldr r3, [sp, #40]
425 009e 013B subs r3, r3, #1
426 00a0 0A93 str r3, [sp, #40]
427 .LVL54:
118:../libSmallPrintf/src/small_printf.c **** }
428 .loc 1 118 4 is_stmt 0 view .LVU125
429 00a2 EEE7 b .L30
430 .cfi_endproc
431 .LFE5:
433 .section .text.small_print,"ax",%progbits
434 .align 1
435 .syntax unified
436 .thumb
437 .thumb_func
438 .fpu softvfp
440 small_print:
441 .LVL55:
442 .LFB6:
127:../libSmallPrintf/src/small_printf.c ****
128:../libSmallPrintf/src/small_printf.c **** static int small_print(char **out, const char *format, va_list args )
129:../libSmallPrintf/src/small_printf.c **** {
443 .loc 1 129 1 is_stmt 1 view -0
444 .cfi_startproc
445 @ args = 0, pretend = 0, frame = 16
446 @ frame_needed = 0, uses_anonymous_args = 0
447 .loc 1 129 1 is_stmt 0 view .LVU127
448 0000 70B5 push {r4, r5, r6, lr}
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 12
449 .LCFI6:
450 .cfi_def_cfa_offset 16
451 .cfi_offset 4, -16
452 .cfi_offset 5, -12
453 .cfi_offset 6, -8
454 .cfi_offset 14, -4
455 0002 88B0 sub sp, sp, #32
456 .LCFI7:
457 .cfi_def_cfa_offset 48
458 0004 0646 mov r6, r0
459 0006 0C46 mov r4, r1
460 0008 0592 str r2, [sp, #20]
130:../libSmallPrintf/src/small_printf.c **** register int width, pad;
461 .loc 1 130 2 is_stmt 1 view .LVU128
131:../libSmallPrintf/src/small_printf.c **** register int pc = 0;
462 .loc 1 131 2 view .LVU129
463 .LVL56:
132:../libSmallPrintf/src/small_printf.c **** char scr[2];
464 .loc 1 132 2 view .LVU130
133:../libSmallPrintf/src/small_printf.c ****
134:../libSmallPrintf/src/small_printf.c **** for (; *format != 0; ++format) {
465 .loc 1 134 2 view .LVU131
131:../libSmallPrintf/src/small_printf.c **** char scr[2];
466 .loc 1 131 15 is_stmt 0 view .LVU132
467 000a 0025 movs r5, #0
468 .loc 1 134 2 view .LVU133
469 000c A9E0 b .L41
470 .LVL57:
471 .L76:
135:../libSmallPrintf/src/small_printf.c **** if (*format == '%') {
136:../libSmallPrintf/src/small_printf.c **** ++format;
472 .loc 1 136 4 is_stmt 1 view .LVU134
473 000e 611C adds r1, r4, #1
474 .LVL58:
137:../libSmallPrintf/src/small_printf.c **** width = pad = 0;
475 .loc 1 137 4 view .LVU135
138:../libSmallPrintf/src/small_printf.c **** if (*format == '\0') break;
476 .loc 1 138 4 view .LVU136
477 .loc 1 138 8 is_stmt 0 view .LVU137
478 0010 6378 ldrb r3, [r4, #1] @ zero_extendqisi2
479 .loc 1 138 7 view .LVU138
480 0012 002B cmp r3, #0
481 0014 00F0AE80 beq .L43
139:../libSmallPrintf/src/small_printf.c **** if (*format == '%') goto out;
482 .loc 1 139 4 is_stmt 1 view .LVU139
483 .loc 1 139 7 is_stmt 0 view .LVU140
484 0018 252B cmp r3, #37
485 001a 00F09580 beq .L62
140:../libSmallPrintf/src/small_printf.c **** if (*format == '-') {
486 .loc 1 140 4 is_stmt 1 view .LVU141
487 .loc 1 140 7 is_stmt 0 view .LVU142
488 001e 2D2B cmp r3, #45
489 0020 07D0 beq .L67
137:../libSmallPrintf/src/small_printf.c **** if (*format == '\0') break;
490 .loc 1 137 16 view .LVU143
491 0022 0023 movs r3, #0
492 .LVL59:
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 13
493 .L45:
141:../libSmallPrintf/src/small_printf.c **** ++format;
142:../libSmallPrintf/src/small_printf.c **** pad = PAD_RIGHT;
143:../libSmallPrintf/src/small_printf.c **** }
144:../libSmallPrintf/src/small_printf.c **** while (*format == '0') {
494 .loc 1 144 11 view .LVU144
495 0024 0A78 ldrb r2, [r1] @ zero_extendqisi2
496 .loc 1 144 10 view .LVU145
497 0026 302A cmp r2, #48
498 0028 06D1 bne .L68
145:../libSmallPrintf/src/small_printf.c **** ++format;
499 .loc 1 145 5 is_stmt 1 view .LVU146
500 002a 0131 adds r1, r1, #1
501 .LVL60:
146:../libSmallPrintf/src/small_printf.c **** pad |= PAD_ZERO;
502 .loc 1 146 5 view .LVU147
503 .loc 1 146 9 is_stmt 0 view .LVU148
504 002c 43F00203 orr r3, r3, #2
505 .LVL61:
506 .loc 1 146 9 view .LVU149
507 0030 F8E7 b .L45
508 .LVL62:
509 .L67:
141:../libSmallPrintf/src/small_printf.c **** ++format;
510 .loc 1 141 5 is_stmt 1 view .LVU150
511 0032 A11C adds r1, r4, #2
512 .LVL63:
142:../libSmallPrintf/src/small_printf.c **** }
513 .loc 1 142 5 view .LVU151
142:../libSmallPrintf/src/small_printf.c **** }
514 .loc 1 142 9 is_stmt 0 view .LVU152
515 0034 0123 movs r3, #1
516 0036 F5E7 b .L45
517 .LVL64:
518 .L68:
147:../libSmallPrintf/src/small_printf.c **** }
148:../libSmallPrintf/src/small_printf.c **** if ('*' == *format)
519 .loc 1 148 4 is_stmt 1 view .LVU153
520 .loc 1 148 7 is_stmt 0 view .LVU154
521 0038 2A2A cmp r2, #42
522 003a 2BD1 bne .L64
149:../libSmallPrintf/src/small_printf.c **** {
150:../libSmallPrintf/src/small_printf.c **** width = va_arg( args, int ); // get width from next argument
523 .loc 1 150 5 is_stmt 1 view .LVU155
524 .loc 1 150 11 is_stmt 0 view .LVU156
525 003c 059A ldr r2, [sp, #20]
526 003e 101D adds r0, r2, #4
527 0040 0590 str r0, [sp, #20]
528 0042 1268 ldr r2, [r2]
529 .LVL65:
151:../libSmallPrintf/src/small_printf.c **** format++;
530 .loc 1 151 5 is_stmt 1 view .LVU157
531 .loc 1 151 11 is_stmt 0 view .LVU158
532 0044 4C1C adds r4, r1, #1
533 .LVL66:
534 .L48:
152:../libSmallPrintf/src/small_printf.c **** }
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 14
153:../libSmallPrintf/src/small_printf.c **** else
154:../libSmallPrintf/src/small_printf.c **** {
155:../libSmallPrintf/src/small_printf.c **** for ( ; *format >= '0' && *format <= '9'; ++format)
156:../libSmallPrintf/src/small_printf.c **** {
157:../libSmallPrintf/src/small_printf.c **** width *= 10;
158:../libSmallPrintf/src/small_printf.c **** width += *format - '0';
159:../libSmallPrintf/src/small_printf.c **** }
160:../libSmallPrintf/src/small_printf.c **** }
161:../libSmallPrintf/src/small_printf.c **** if( *format == 'l') { /* skip l in ld etc */
535 .loc 1 161 4 is_stmt 1 view .LVU159
536 .loc 1 161 8 is_stmt 0 view .LVU160
537 0046 2178 ldrb r1, [r4] @ zero_extendqisi2
538 .loc 1 161 6 view .LVU161
539 0048 6C29 cmp r1, #108
540 004a 25D0 beq .L69
541 .L50:
162:../libSmallPrintf/src/small_printf.c **** format++;
163:../libSmallPrintf/src/small_printf.c **** }
164:../libSmallPrintf/src/small_printf.c **** if( *format == 's' ) {
542 .loc 1 164 4 is_stmt 1 view .LVU162
543 .loc 1 164 8 is_stmt 0 view .LVU163
544 004c 2178 ldrb r1, [r4] @ zero_extendqisi2
545 .loc 1 164 6 view .LVU164
546 004e 7329 cmp r1, #115
547 0050 24D0 beq .L70
165:../libSmallPrintf/src/small_printf.c **** register char *s = (char *)va_arg( args, int );
166:../libSmallPrintf/src/small_printf.c **** pc += prints (out, s?s:"(null)", width, pad);
167:../libSmallPrintf/src/small_printf.c **** continue;
168:../libSmallPrintf/src/small_printf.c **** }
169:../libSmallPrintf/src/small_printf.c **** if( *format == 'd' ) {
548 .loc 1 169 4 is_stmt 1 view .LVU165
549 .loc 1 169 6 is_stmt 0 view .LVU166
550 0052 6429 cmp r1, #100
551 0054 2DD0 beq .L71
170:../libSmallPrintf/src/small_printf.c **** pc += printi (out, va_arg( args, int ), 10, 1, width, pad, 'a');
171:../libSmallPrintf/src/small_printf.c **** continue;
172:../libSmallPrintf/src/small_printf.c **** }
173:../libSmallPrintf/src/small_printf.c **** if( *format == 'x' ) {
552 .loc 1 173 4 is_stmt 1 view .LVU167
553 .loc 1 173 6 is_stmt 0 view .LVU168
554 0056 7829 cmp r1, #120
555 0058 3AD0 beq .L72
174:../libSmallPrintf/src/small_printf.c **** pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'a');
175:../libSmallPrintf/src/small_printf.c **** continue;
176:../libSmallPrintf/src/small_printf.c **** }
177:../libSmallPrintf/src/small_printf.c **** if( *format == 'X' ) {
556 .loc 1 177 4 is_stmt 1 view .LVU169
557 .loc 1 177 6 is_stmt 0 view .LVU170
558 005a 5829 cmp r1, #88
559 005c 47D0 beq .L73
178:../libSmallPrintf/src/small_printf.c **** pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'A');
179:../libSmallPrintf/src/small_printf.c **** continue;
180:../libSmallPrintf/src/small_printf.c **** }
181:../libSmallPrintf/src/small_printf.c **** if( *format == 'u' ) {
560 .loc 1 181 4 is_stmt 1 view .LVU171
561 .loc 1 181 6 is_stmt 0 view .LVU172
562 005e 7529 cmp r1, #117
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 15
563 0060 54D0 beq .L74
182:../libSmallPrintf/src/small_printf.c **** pc += printi (out, va_arg( args, int ), 10, 0, width, pad, 'a');
183:../libSmallPrintf/src/small_printf.c **** continue;
184:../libSmallPrintf/src/small_printf.c **** }
185:../libSmallPrintf/src/small_printf.c **** if( *format == 'c' ) {
564 .loc 1 185 4 is_stmt 1 view .LVU173
565 .loc 1 185 6 is_stmt 0 view .LVU174
566 0062 6329 cmp r1, #99
567 0064 61D0 beq .L75
186:../libSmallPrintf/src/small_printf.c **** /* char are converted to int then pushed on the stack */
187:../libSmallPrintf/src/small_printf.c **** scr[0] = (char)va_arg( args, int );
188:../libSmallPrintf/src/small_printf.c **** scr[1] = '\0';
189:../libSmallPrintf/src/small_printf.c **** pc += prints (out, scr, width, pad);
190:../libSmallPrintf/src/small_printf.c **** continue;
191:../libSmallPrintf/src/small_printf.c **** }
192:../libSmallPrintf/src/small_printf.c **** if( *format == 'n' )
568 .loc 1 192 4 is_stmt 1 view .LVU175
569 .loc 1 192 6 is_stmt 0 view .LVU176
570 0066 6E29 cmp r1, #110
571 0068 7AD1 bne .L53
572 .LBB6:
193:../libSmallPrintf/src/small_printf.c **** { /* convert number printed so far and store in *va_arg( args, int)... */
194:../libSmallPrintf/src/small_printf.c **** int *dp = va_arg( args, int );
573 .loc 1 194 5 is_stmt 1 view .LVU177
574 .loc 1 194 15 is_stmt 0 view .LVU178
575 006a 059B ldr r3, [sp, #20]
576 .LVL67:
577 .loc 1 194 15 view .LVU179
578 006c 1A1D adds r2, r3, #4
579 .LVL68:
580 .loc 1 194 15 view .LVU180
581 006e 0592 str r2, [sp, #20]
582 0070 1B68 ldr r3, [r3]
583 .LVL69:
195:../libSmallPrintf/src/small_printf.c **** *dp = pc;
584 .loc 1 195 5 is_stmt 1 view .LVU181
585 .loc 1 195 9 is_stmt 0 view .LVU182
586 0072 1D60 str r5, [r3]
196:../libSmallPrintf/src/small_printf.c **** continue;
587 .loc 1 196 5 is_stmt 1 view .LVU183
588 0074 74E0 b .L53
589 .LVL70:
590 .L49:
591 .loc 1 196 5 is_stmt 0 view .LVU184
592 .LBE6:
157:../libSmallPrintf/src/small_printf.c **** width += *format - '0';
593 .loc 1 157 6 is_stmt 1 discriminator 2 view .LVU185
157:../libSmallPrintf/src/small_printf.c **** width += *format - '0';
594 .loc 1 157 12 is_stmt 0 discriminator 2 view .LVU186
595 0076 02EB8202 add r2, r2, r2, lsl #2
596 .LVL71:
157:../libSmallPrintf/src/small_printf.c **** width += *format - '0';
597 .loc 1 157 12 discriminator 2 view .LVU187
598 007a 5400 lsls r4, r2, #1
599 .LVL72:
158:../libSmallPrintf/src/small_printf.c **** }
600 .loc 1 158 6 is_stmt 1 discriminator 2 view .LVU188
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 16
158:../libSmallPrintf/src/small_printf.c **** }
601 .loc 1 158 23 is_stmt 0 discriminator 2 view .LVU189
602 007c A0F13002 sub r2, r0, #48
158:../libSmallPrintf/src/small_printf.c **** }
603 .loc 1 158 12 discriminator 2 view .LVU190
604 0080 2244 add r2, r2, r4
605 .LVL73:
155:../libSmallPrintf/src/small_printf.c **** {
606 .loc 1 155 47 discriminator 2 view .LVU191
607 0082 0131 adds r1, r1, #1
608 .LVL74:
609 .L47:
155:../libSmallPrintf/src/small_printf.c **** {
610 .loc 1 155 13 discriminator 1 view .LVU192
611 0084 0878 ldrb r0, [r1] @ zero_extendqisi2
155:../libSmallPrintf/src/small_printf.c **** {
612 .loc 1 155 28 discriminator 1 view .LVU193
613 0086 A0F13004 sub r4, r0, #48
614 008a E4B2 uxtb r4, r4
155:../libSmallPrintf/src/small_printf.c **** {
615 .loc 1 155 5 discriminator 1 view .LVU194
616 008c 092C cmp r4, #9
617 008e F2D9 bls .L49
155:../libSmallPrintf/src/small_printf.c **** {
618 .loc 1 155 5 discriminator 1 view .LVU195
619 0090 0C46 mov r4, r1
620 0092 D8E7 b .L48
621 .LVL75:
622 .L64:
137:../libSmallPrintf/src/small_printf.c **** if (*format == '\0') break;
623 .loc 1 137 10 view .LVU196
624 0094 0022 movs r2, #0
625 0096 F5E7 b .L47
626 .LVL76:
627 .L69:
162:../libSmallPrintf/src/small_printf.c **** }
628 .loc 1 162 5 is_stmt 1 view .LVU197
162:../libSmallPrintf/src/small_printf.c **** }
629 .loc 1 162 11 is_stmt 0 view .LVU198
630 0098 0134 adds r4, r4, #1
631 .LVL77:
162:../libSmallPrintf/src/small_printf.c **** }
632 .loc 1 162 11 view .LVU199
633 009a D7E7 b .L50
634 .L70:
635 .LBB7:
165:../libSmallPrintf/src/small_printf.c **** pc += prints (out, s?s:"(null)", width, pad);
636 .loc 1 165 5 is_stmt 1 view .LVU200
165:../libSmallPrintf/src/small_printf.c **** pc += prints (out, s?s:"(null)", width, pad);
637 .loc 1 165 32 is_stmt 0 view .LVU201
638 009c 0599 ldr r1, [sp, #20]
639 009e 081D adds r0, r1, #4
640 00a0 0590 str r0, [sp, #20]
641 00a2 0968 ldr r1, [r1]
642 .LVL78:
166:../libSmallPrintf/src/small_printf.c **** continue;
643 .loc 1 166 5 is_stmt 1 view .LVU202
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 17
166:../libSmallPrintf/src/small_printf.c **** continue;
644 .loc 1 166 11 is_stmt 0 view .LVU203
645 00a4 01B9 cbnz r1, .L52
646 00a6 3749 ldr r1, .L78
647 .LVL79:
648 .L52:
166:../libSmallPrintf/src/small_printf.c **** continue;
649 .loc 1 166 11 discriminator 4 view .LVU204
650 00a8 3046 mov r0, r6
651 .LVL80:
166:../libSmallPrintf/src/small_printf.c **** continue;
652 .loc 1 166 11 discriminator 4 view .LVU205
653 00aa FFF7FEFF bl prints
654 .LVL81:
166:../libSmallPrintf/src/small_printf.c **** continue;
655 .loc 1 166 8 discriminator 4 view .LVU206
656 00ae 0544 add r5, r5, r0
657 .LVL82:
167:../libSmallPrintf/src/small_printf.c **** }
658 .loc 1 167 5 is_stmt 1 discriminator 4 view .LVU207
659 00b0 56E0 b .L53
660 .LVL83:
661 .L71:
167:../libSmallPrintf/src/small_printf.c **** }
662 .loc 1 167 5 is_stmt 0 discriminator 4 view .LVU208
663 .LBE7:
170:../libSmallPrintf/src/small_printf.c **** continue;
664 .loc 1 170 5 is_stmt 1 view .LVU209
170:../libSmallPrintf/src/small_printf.c **** continue;
665 .loc 1 170 11 is_stmt 0 view .LVU210
666 00b2 0599 ldr r1, [sp, #20]
667 00b4 081D adds r0, r1, #4
668 00b6 0590 str r0, [sp, #20]
669 00b8 0968 ldr r1, [r1]
670 00ba 6120 movs r0, #97
671 00bc 0290 str r0, [sp, #8]
672 00be 0193 str r3, [sp, #4]
673 00c0 0092 str r2, [sp]
674 00c2 0123 movs r3, #1
675 .LVL84:
170:../libSmallPrintf/src/small_printf.c **** continue;
676 .loc 1 170 11 view .LVU211
677 00c4 0A22 movs r2, #10
678 .LVL85:
170:../libSmallPrintf/src/small_printf.c **** continue;
679 .loc 1 170 11 view .LVU212
680 00c6 3046 mov r0, r6
681 00c8 FFF7FEFF bl printi
682 .LVL86:
170:../libSmallPrintf/src/small_printf.c **** continue;
683 .loc 1 170 8 view .LVU213
684 00cc 0544 add r5, r5, r0
685 .LVL87:
171:../libSmallPrintf/src/small_printf.c **** }
686 .loc 1 171 5 is_stmt 1 view .LVU214
687 00ce 47E0 b .L53
688 .LVL88:
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 18
689 .L72:
174:../libSmallPrintf/src/small_printf.c **** continue;
690 .loc 1 174 5 view .LVU215
174:../libSmallPrintf/src/small_printf.c **** continue;
691 .loc 1 174 11 is_stmt 0 view .LVU216
692 00d0 0599 ldr r1, [sp, #20]
693 00d2 081D adds r0, r1, #4
694 00d4 0590 str r0, [sp, #20]
695 00d6 0968 ldr r1, [r1]
696 00d8 6120 movs r0, #97
697 00da 0290 str r0, [sp, #8]
698 00dc 0193 str r3, [sp, #4]
699 00de 0092 str r2, [sp]
700 00e0 0023 movs r3, #0
701 .LVL89:
174:../libSmallPrintf/src/small_printf.c **** continue;
702 .loc 1 174 11 view .LVU217
703 00e2 1022 movs r2, #16
704 .LVL90:
174:../libSmallPrintf/src/small_printf.c **** continue;
705 .loc 1 174 11 view .LVU218
706 00e4 3046 mov r0, r6
707 00e6 FFF7FEFF bl printi
708 .LVL91:
174:../libSmallPrintf/src/small_printf.c **** continue;
709 .loc 1 174 8 view .LVU219
710 00ea 0544 add r5, r5, r0
711 .LVL92:
175:../libSmallPrintf/src/small_printf.c **** }
712 .loc 1 175 5 is_stmt 1 view .LVU220
713 00ec 38E0 b .L53
714 .LVL93:
715 .L73:
178:../libSmallPrintf/src/small_printf.c **** continue;
716 .loc 1 178 5 view .LVU221
178:../libSmallPrintf/src/small_printf.c **** continue;
717 .loc 1 178 11 is_stmt 0 view .LVU222
718 00ee 0599 ldr r1, [sp, #20]
719 00f0 081D adds r0, r1, #4
720 00f2 0590 str r0, [sp, #20]
721 00f4 0968 ldr r1, [r1]
722 00f6 4120 movs r0, #65
723 00f8 0290 str r0, [sp, #8]
724 00fa 0193 str r3, [sp, #4]
725 00fc 0092 str r2, [sp]
726 00fe 0023 movs r3, #0
727 .LVL94:
178:../libSmallPrintf/src/small_printf.c **** continue;
728 .loc 1 178 11 view .LVU223
729 0100 1022 movs r2, #16
730 .LVL95:
178:../libSmallPrintf/src/small_printf.c **** continue;
731 .loc 1 178 11 view .LVU224
732 0102 3046 mov r0, r6
733 0104 FFF7FEFF bl printi
734 .LVL96:
178:../libSmallPrintf/src/small_printf.c **** continue;
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 19
735 .loc 1 178 8 view .LVU225
736 0108 0544 add r5, r5, r0
737 .LVL97:
179:../libSmallPrintf/src/small_printf.c **** }
738 .loc 1 179 5 is_stmt 1 view .LVU226
739 010a 29E0 b .L53
740 .LVL98:
741 .L74:
182:../libSmallPrintf/src/small_printf.c **** continue;
742 .loc 1 182 5 view .LVU227
182:../libSmallPrintf/src/small_printf.c **** continue;
743 .loc 1 182 11 is_stmt 0 view .LVU228
744 010c 0599 ldr r1, [sp, #20]
745 010e 081D adds r0, r1, #4
746 0110 0590 str r0, [sp, #20]
747 0112 0968 ldr r1, [r1]
748 0114 6120 movs r0, #97
749 0116 0290 str r0, [sp, #8]
750 0118 0193 str r3, [sp, #4]
751 011a 0092 str r2, [sp]
752 011c 0023 movs r3, #0
753 .LVL99:
182:../libSmallPrintf/src/small_printf.c **** continue;
754 .loc 1 182 11 view .LVU229
755 011e 0A22 movs r2, #10
756 .LVL100:
182:../libSmallPrintf/src/small_printf.c **** continue;
757 .loc 1 182 11 view .LVU230
758 0120 3046 mov r0, r6
759 0122 FFF7FEFF bl printi
760 .LVL101:
182:../libSmallPrintf/src/small_printf.c **** continue;
761 .loc 1 182 8 view .LVU231
762 0126 0544 add r5, r5, r0
763 .LVL102:
183:../libSmallPrintf/src/small_printf.c **** }
764 .loc 1 183 5 is_stmt 1 view .LVU232
765 0128 1AE0 b .L53
766 .LVL103:
767 .L75:
187:../libSmallPrintf/src/small_printf.c **** scr[1] = '\0';
768 .loc 1 187 5 view .LVU233
187:../libSmallPrintf/src/small_printf.c **** scr[1] = '\0';
769 .loc 1 187 20 is_stmt 0 view .LVU234
770 012a 0599 ldr r1, [sp, #20]
771 012c 081D adds r0, r1, #4
772 012e 0590 str r0, [sp, #20]
187:../libSmallPrintf/src/small_printf.c **** scr[1] = '\0';
773 .loc 1 187 14 view .LVU235
774 0130 0978 ldrb r1, [r1] @ zero_extendqisi2
187:../libSmallPrintf/src/small_printf.c **** scr[1] = '\0';
775 .loc 1 187 12 view .LVU236
776 0132 8DF81C10 strb r1, [sp, #28]
188:../libSmallPrintf/src/small_printf.c **** pc += prints (out, scr, width, pad);
777 .loc 1 188 5 is_stmt 1 view .LVU237
188:../libSmallPrintf/src/small_printf.c **** pc += prints (out, scr, width, pad);
778 .loc 1 188 12 is_stmt 0 view .LVU238
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 20
779 0136 0021 movs r1, #0
780 0138 8DF81D10 strb r1, [sp, #29]
189:../libSmallPrintf/src/small_printf.c **** continue;
781 .loc 1 189 5 is_stmt 1 view .LVU239
189:../libSmallPrintf/src/small_printf.c **** continue;
782 .loc 1 189 11 is_stmt 0 view .LVU240
783 013c 07A9 add r1, sp, #28
784 013e 3046 mov r0, r6
785 0140 FFF7FEFF bl prints
786 .LVL104:
189:../libSmallPrintf/src/small_printf.c **** continue;
787 .loc 1 189 8 view .LVU241
788 0144 0544 add r5, r5, r0
789 .LVL105:
190:../libSmallPrintf/src/small_printf.c **** }
790 .loc 1 190 5 is_stmt 1 view .LVU242
791 0146 0BE0 b .L53
792 .LVL106:
793 .L62:
136:../libSmallPrintf/src/small_printf.c **** width = pad = 0;
794 .loc 1 136 4 is_stmt 0 view .LVU243
795 0148 0C46 mov r4, r1
796 014a 0FE0 b .L42
797 .LVL107:
798 .L77:
197:../libSmallPrintf/src/small_printf.c **** }
198:../libSmallPrintf/src/small_printf.c **** }
199:../libSmallPrintf/src/small_printf.c **** else {
200:../libSmallPrintf/src/small_printf.c **** out:
201:../libSmallPrintf/src/small_printf.c **** /* deal with LF -> CRLF mapping */
202:../libSmallPrintf/src/small_printf.c **** if(*format == '\n')
203:../libSmallPrintf/src/small_printf.c **** {
204:../libSmallPrintf/src/small_printf.c **** printchar(out,'\r');
799 .loc 1 204 5 is_stmt 1 view .LVU244
800 014c 0D21 movs r1, #13
801 014e 3046 mov r0, r6
802 0150 FFF7FEFF bl printchar
803 .LVL108:
205:../libSmallPrintf/src/small_printf.c **** ++pc; // extra char
804 .loc 1 205 5 view .LVU245
805 0154 0135 adds r5, r5, #1
806 .LVL109:
807 .L59:
206:../libSmallPrintf/src/small_printf.c **** }
207:../libSmallPrintf/src/small_printf.c **** printchar (out, *format);
808 .loc 1 207 4 view .LVU246
809 0156 2178 ldrb r1, [r4] @ zero_extendqisi2
810 0158 3046 mov r0, r6
811 015a FFF7FEFF bl printchar
812 .LVL110:
208:../libSmallPrintf/src/small_printf.c **** ++pc;
813 .loc 1 208 4 view .LVU247
814 015e 0135 adds r5, r5, #1
815 .LVL111:
816 .L53:
134:../libSmallPrintf/src/small_printf.c **** if (*format == '%') {
817 .loc 1 134 23 is_stmt 0 view .LVU248
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 21
818 0160 0134 adds r4, r4, #1
819 .LVL112:
820 .L41:
134:../libSmallPrintf/src/small_printf.c **** if (*format == '%') {
821 .loc 1 134 9 discriminator 1 view .LVU249
822 0162 2378 ldrb r3, [r4] @ zero_extendqisi2
134:../libSmallPrintf/src/small_printf.c **** if (*format == '%') {
823 .loc 1 134 2 discriminator 1 view .LVU250
824 0164 33B1 cbz r3, .L43
135:../libSmallPrintf/src/small_printf.c **** ++format;
825 .loc 1 135 3 is_stmt 1 view .LVU251
135:../libSmallPrintf/src/small_printf.c **** ++format;
826 .loc 1 135 6 is_stmt 0 view .LVU252
827 0166 252B cmp r3, #37
828 0168 3FF451AF beq .L76
829 .L42:
202:../libSmallPrintf/src/small_printf.c **** {
830 .loc 1 202 4 is_stmt 1 view .LVU253
202:../libSmallPrintf/src/small_printf.c **** {
831 .loc 1 202 7 is_stmt 0 view .LVU254
832 016c 2378 ldrb r3, [r4] @ zero_extendqisi2
202:../libSmallPrintf/src/small_printf.c **** {
833 .loc 1 202 6 view .LVU255
834 016e 0A2B cmp r3, #10
835 0170 F1D1 bne .L59
202:../libSmallPrintf/src/small_printf.c **** {
836 .loc 1 202 6 view .LVU256
837 0172 EBE7 b .L77
838 .LVL113:
839 .L43:
209:../libSmallPrintf/src/small_printf.c **** }
210:../libSmallPrintf/src/small_printf.c **** }
211:../libSmallPrintf/src/small_printf.c **** if (out) **out = '\0';
840 .loc 1 211 2 is_stmt 1 view .LVU257
841 .loc 1 211 5 is_stmt 0 view .LVU258
842 0174 16B1 cbz r6, .L40
843 .loc 1 211 11 is_stmt 1 discriminator 1 view .LVU259
844 .loc 1 211 12 is_stmt 0 discriminator 1 view .LVU260
845 0176 3368 ldr r3, [r6]
846 .loc 1 211 17 discriminator 1 view .LVU261
847 0178 0022 movs r2, #0
848 017a 1A70 strb r2, [r3]
212:../libSmallPrintf/src/small_printf.c **** return pc;
849 .loc 1 212 2 is_stmt 1 discriminator 1 view .LVU262
850 .L40:
213:../libSmallPrintf/src/small_printf.c **** }
851 .loc 1 213 1 is_stmt 0 view .LVU263
852 017c 2846 mov r0, r5
853 017e 08B0 add sp, sp, #32
854 .LCFI8:
855 .cfi_def_cfa_offset 16
856 @ sp needed
857 0180 70BD pop {r4, r5, r6, pc}
858 .LVL114:
859 .L79:
860 .loc 1 213 1 view .LVU264
861 0182 00BF .align 2
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 22
862 .L78:
863 0184 00000000 .word .LC0
864 .cfi_endproc
865 .LFE6:
867 .section .text.small_printf,"ax",%progbits
868 .align 1
869 .global small_printf
870 .syntax unified
871 .thumb
872 .thumb_func
873 .fpu softvfp
875 small_printf:
876 .LVL115:
877 .LFB7:
214:../libSmallPrintf/src/small_printf.c ****
215:../libSmallPrintf/src/small_printf.c ****
216:../libSmallPrintf/src/small_printf.c **** int small_printf(const char *format, ...)
217:../libSmallPrintf/src/small_printf.c **** {
878 .loc 1 217 1 is_stmt 1 view -0
879 .cfi_startproc
880 @ args = 4, pretend = 16, frame = 8
881 @ frame_needed = 0, uses_anonymous_args = 1
882 .loc 1 217 1 is_stmt 0 view .LVU266
883 0000 0FB4 push {r0, r1, r2, r3}
884 .LCFI9:
885 .cfi_def_cfa_offset 16
886 .cfi_offset 0, -16
887 .cfi_offset 1, -12
888 .cfi_offset 2, -8
889 .cfi_offset 3, -4
890 0002 00B5 push {lr}
891 .LCFI10:
892 .cfi_def_cfa_offset 20
893 .cfi_offset 14, -20
894 0004 83B0 sub sp, sp, #12
895 .LCFI11:
896 .cfi_def_cfa_offset 32
897 0006 04AA add r2, sp, #16
898 0008 52F8041B ldr r1, [r2], #4
218:../libSmallPrintf/src/small_printf.c **** int result = 0;
899 .loc 1 218 2 is_stmt 1 view .LVU267
900 .LVL116:
219:../libSmallPrintf/src/small_printf.c **** va_list args;
901 .loc 1 219 9 view .LVU268
220:../libSmallPrintf/src/small_printf.c ****
221:../libSmallPrintf/src/small_printf.c **** va_start( args, format );
902 .loc 1 221 9 view .LVU269
903 000c 0192 str r2, [sp, #4]
222:../libSmallPrintf/src/small_printf.c **** result = small_print( 0, format, args );
904 .loc 1 222 9 view .LVU270
905 .loc 1 222 18 is_stmt 0 view .LVU271
906 000e 0020 movs r0, #0
907 0010 FFF7FEFF bl small_print
908 .LVL117:
223:../libSmallPrintf/src/small_printf.c **** va_end(args);
909 .loc 1 223 9 is_stmt 1 view .LVU272
224:../libSmallPrintf/src/small_printf.c **** return result;
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 23
910 .loc 1 224 9 view .LVU273
225:../libSmallPrintf/src/small_printf.c **** }
911 .loc 1 225 1 is_stmt 0 view .LVU274
912 0014 03B0 add sp, sp, #12
913 .LCFI12:
914 .cfi_def_cfa_offset 20
915 @ sp needed
916 0016 5DF804EB ldr lr, [sp], #4
917 .LCFI13:
918 .cfi_restore 14
919 .cfi_def_cfa_offset 16
920 001a 04B0 add sp, sp, #16
921 .LCFI14:
922 .cfi_restore 3
923 .cfi_restore 2
924 .cfi_restore 1
925 .cfi_restore 0
926 .cfi_def_cfa_offset 0
927 001c 7047 bx lr
928 .cfi_endproc
929 .LFE7:
931 .section .text.small_sprintf,"ax",%progbits
932 .align 1
933 .global small_sprintf
934 .syntax unified
935 .thumb
936 .thumb_func
937 .fpu softvfp
939 small_sprintf:
940 .LVL118:
941 .LFB8:
226:../libSmallPrintf/src/small_printf.c ****
227:../libSmallPrintf/src/small_printf.c **** int small_sprintf(char *out, const char *format, ...)
228:../libSmallPrintf/src/small_printf.c **** {
942 .loc 1 228 1 is_stmt 1 view -0
943 .cfi_startproc
944 @ args = 4, pretend = 12, frame = 16
945 @ frame_needed = 0, uses_anonymous_args = 1
946 .loc 1 228 1 is_stmt 0 view .LVU276
947 0000 0EB4 push {r1, r2, r3}
948 .LCFI15:
949 .cfi_def_cfa_offset 12
950 .cfi_offset 1, -12
951 .cfi_offset 2, -8
952 .cfi_offset 3, -4
953 0002 00B5 push {lr}
954 .LCFI16:
955 .cfi_def_cfa_offset 16
956 .cfi_offset 14, -16
957 0004 84B0 sub sp, sp, #16
958 .LCFI17:
959 .cfi_def_cfa_offset 32
960 0006 0190 str r0, [sp, #4]
961 0008 05AA add r2, sp, #20
962 000a 52F8041B ldr r1, [r2], #4
229:../libSmallPrintf/src/small_printf.c **** int result = 0;
963 .loc 1 229 5 is_stmt 1 view .LVU277
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 24
964 .LVL119:
230:../libSmallPrintf/src/small_printf.c **** va_list args;
965 .loc 1 230 3 view .LVU278
231:../libSmallPrintf/src/small_printf.c **** va_start( args, format );
966 .loc 1 231 9 view .LVU279
967 000e 0392 str r2, [sp, #12]
232:../libSmallPrintf/src/small_printf.c **** result = small_print( &out, format, args );
968 .loc 1 232 9 view .LVU280
969 .loc 1 232 18 is_stmt 0 view .LVU281
970 0010 01A8 add r0, sp, #4
971 .LVL120:
972 .loc 1 232 18 view .LVU282
973 0012 FFF7FEFF bl small_print
974 .LVL121:
233:../libSmallPrintf/src/small_printf.c **** va_end(args);
975 .loc 1 233 9 is_stmt 1 view .LVU283
234:../libSmallPrintf/src/small_printf.c **** return result;
976 .loc 1 234 9 view .LVU284
235:../libSmallPrintf/src/small_printf.c **** }
977 .loc 1 235 1 is_stmt 0 view .LVU285
978 0016 04B0 add sp, sp, #16
979 .LCFI18:
980 .cfi_def_cfa_offset 16
981 @ sp needed
982 0018 5DF804EB ldr lr, [sp], #4
983 .LCFI19:
984 .cfi_restore 14
985 .cfi_def_cfa_offset 12
986 001c 03B0 add sp, sp, #12
987 .LCFI20:
988 .cfi_restore 3
989 .cfi_restore 2
990 .cfi_restore 1
991 .cfi_def_cfa_offset 0
992 001e 7047 bx lr
993 .cfi_endproc
994 .LFE8:
996 .section .rodata.small_print.str1.4,"aMS",%progbits,1
997 .align 2
998 .LC0:
999 0000 286E756C .ascii "(null)\000"
999 6C2900
1000 .text
1001 .Letext0:
1002 .file 2 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.7
1003 .file 3 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.7
1004 .file 4 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.7
1005 .file 5 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.7
1006 .file 6 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.7
1007 .file 7 "<built-in>"
ARM GAS C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s page 25
DEFINED SYMBOLS
*ABS*:0000000000000000 small_printf.c
C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s:16 .text.printchar:0000000000000000 $t
C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s:23 .text.printchar:0000000000000000 printchar
C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s:73 .text.prints:0000000000000000 $t
C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s:79 .text.prints:0000000000000000 prints
C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s:233 .text.printi:0000000000000000 $t
C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s:239 .text.printi:0000000000000000 printi
C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s:434 .text.small_print:0000000000000000 $t
C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s:440 .text.small_print:0000000000000000 small_print
C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s:863 .text.small_print:0000000000000184 $d
C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s:868 .text.small_printf:0000000000000000 $t
C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s:875 .text.small_printf:0000000000000000 small_printf
C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s:932 .text.small_sprintf:0000000000000000 $t
C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s:939 .text.small_sprintf:0000000000000000 small_sprintf
C:\Users\mike\AppData\Local\Temp\ccbLkH3V.s:997 .rodata.small_print.str1.4:0000000000000000 $d
UNDEFINED SYMBOLS
PutCharSerial