ARM GAS C:\Users\mike\AppData\Local\Temp\ccLjNCIz.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 "ap_math.cpp"
12 .text
13 .Ltext0:
14 .cfi_sections .debug_frame
15 .global __aeabi_i2d
16 .global __aeabi_ddiv
17 .global __aeabi_dmul
18 .global __aeabi_d2uiz
19 .section .text._ZN7ap_mathC2Ev,"ax",%progbits
20 .align 1
21 .global _ZN7ap_mathC2Ev
22 .arch armv7-m
23 .syntax unified
24 .thumb
25 .thumb_func
26 .fpu softvfp
28 _ZN7ap_mathC2Ev:
29 .LVL0:
30 .LFB226:
31 .file 1 "../libOLED/src/ap_math.cpp"
1:../libOLED/src/ap_math.cpp **** /*
2:../libOLED/src/ap_math.cpp **** * ap_math.c
3:../libOLED/src/ap_math.cpp ****
4:../libOLED/src/ap_math.cpp **** *
5:../libOLED/src/ap_math.cpp **** * Created on: 31 Jan 2016
6:../libOLED/src/ap_math.cpp **** * Author: Mike
7:../libOLED/src/ap_math.cpp **** */
8:../libOLED/src/ap_math.cpp ****
9:../libOLED/src/ap_math.cpp **** #include <math.h>
10:../libOLED/src/ap_math.cpp **** #include "libOLED/ap_math.h"
11:../libOLED/src/ap_math.cpp **** /* this is an approximate maths library where all the answers are accurate enough */
12:../libOLED/src/ap_math.cpp **** ap_math::ap_math()
32 .loc 1 12 1 view -0
33 .cfi_startproc
34 @ args = 0, pretend = 0, frame = 0
35 @ frame_needed = 0, uses_anonymous_args = 0
36 .loc 1 12 1 is_stmt 0 view .LVU1
37 0000 70B5 push {r4, r5, r6, lr}
38 .LCFI0:
39 .cfi_def_cfa_offset 16
40 .cfi_offset 4, -16
41 .cfi_offset 5, -12
42 .cfi_offset 6, -8
43 .cfi_offset 14, -4
44 0002 0646 mov r6, r0
45 .LBB2:
46 .loc 1 12 18 view .LVU2
ARM GAS C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s page 2
47 0004 4FF48073 mov r3, #256
48 0008 0360 str r3, [r0]
49 .LBB3:
13:../libOLED/src/ap_math.cpp **** {
14:../libOLED/src/ap_math.cpp **** uint16_t i;
50 .loc 1 14 5 is_stmt 1 view .LVU3
15:../libOLED/src/ap_math.cpp **** for(i=0;i<SINE_STEPS;i++)
51 .loc 1 15 5 view .LVU4
52 .LVL1:
53 .loc 1 15 10 is_stmt 0 view .LVU5
54 000a 0024 movs r4, #0
55 .LVL2:
56 .L3:
57 .loc 1 15 14 discriminator 3 view .LVU6
58 000c B4F5B47F cmp r4, #360
59 0010 18D2 bcs .L2
16:../libOLED/src/ap_math.cpp **** sintab[i]=sin(i/(SINE_STEPS*2.0)*3.14159)*AP_K;
60 .loc 1 16 5 is_stmt 1 discriminator 2 view .LVU7
61 .loc 1 16 20 is_stmt 0 discriminator 2 view .LVU8
62 0012 2046 mov r0, r4
63 0014 FFF7FEFF bl __aeabi_i2d
64 .LVL3:
65 0018 0022 movs r2, #0
66 001a 0D4B ldr r3, .L5+8
67 001c FFF7FEFF bl __aeabi_ddiv
68 .LVL4:
69 .loc 1 16 18 discriminator 2 view .LVU9
70 0020 09A3 adr r3, .L5
71 0022 D3E90023 ldrd r2, [r3]
72 0026 FFF7FEFF bl __aeabi_dmul
73 .LVL5:
74 002a FFF7FEFF bl sin
75 .LVL6:
76 .loc 1 16 46 discriminator 2 view .LVU10
77 002e 0022 movs r2, #0
78 0030 084B ldr r3, .L5+12
79 0032 FFF7FEFF bl __aeabi_dmul
80 .LVL7:
81 .loc 1 16 14 discriminator 2 view .LVU11
82 0036 3519 adds r5, r6, r4
83 0038 FFF7FEFF bl __aeabi_d2uiz
84 .LVL8:
85 003c 2871 strb r0, [r5, #4]
15:../libOLED/src/ap_math.cpp **** for(i=0;i<SINE_STEPS;i++)
86 .loc 1 15 5 discriminator 2 view .LVU12
87 003e 0134 adds r4, r4, #1
88 .LVL9:
15:../libOLED/src/ap_math.cpp **** for(i=0;i<SINE_STEPS;i++)
89 .loc 1 15 5 discriminator 2 view .LVU13
90 0040 A4B2 uxth r4, r4
91 .LVL10:
15:../libOLED/src/ap_math.cpp **** for(i=0;i<SINE_STEPS;i++)
92 .loc 1 15 5 discriminator 2 view .LVU14
93 0042 E3E7 b .L3
94 .L2:
15:../libOLED/src/ap_math.cpp **** for(i=0;i<SINE_STEPS;i++)
95 .loc 1 15 5 discriminator 2 view .LVU15
ARM GAS C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s page 3
96 .LBE3:
97 .LBE2:
17:../libOLED/src/ap_math.cpp **** }
98 .loc 1 17 3 view .LVU16
99 0044 3046 mov r0, r6
100 0046 70BD pop {r4, r5, r6, pc}
101 .LVL11:
102 .L6:
103 .loc 1 17 3 view .LVU17
104 .align 3
105 .L5:
106 0048 6E861BF0 .word -266631570
107 004c F9210940 .word 1074340345
108 0050 00808640 .word 1082556416
109 0054 00007040 .word 1081081856
110 .cfi_endproc
111 .LFE226:
113 .global _ZN7ap_mathC1Ev
114 .thumb_set _ZN7ap_mathC1Ev,_ZN7ap_mathC2Ev
115 .section .text._ZN7ap_math6ap_sinEi,"ax",%progbits
116 .align 1
117 .global _ZN7ap_math6ap_sinEi
118 .syntax unified
119 .thumb
120 .thumb_func
121 .fpu softvfp
123 _ZN7ap_math6ap_sinEi:
124 .LFB228:
18:../libOLED/src/ap_math.cpp ****
19:../libOLED/src/ap_math.cpp **** /* returns 255 * sin(ang) where ang is in degrees */
20:../libOLED/src/ap_math.cpp **** int
21:../libOLED/src/ap_math.cpp **** ap_math::ap_sin (int ang)
22:../libOLED/src/ap_math.cpp **** {
125 .loc 1 22 1 is_stmt 1 view -0
126 .cfi_startproc
127 @ args = 0, pretend = 0, frame = 0
128 @ frame_needed = 0, uses_anonymous_args = 0
129 @ link register save eliminated.
130 .LVL12:
131 .L9:
23:../libOLED/src/ap_math.cpp **** /* wrap into range */
24:../libOLED/src/ap_math.cpp **** while (ang < 0)
132 .loc 1 24 3 view .LVU19
133 .loc 1 24 14 is_stmt 0 view .LVU20
134 0000 0029 cmp r1, #0
135 0002 02DA bge .L8
25:../libOLED/src/ap_math.cpp **** {
26:../libOLED/src/ap_math.cpp **** ang += SINE_STEPS * 4;
136 .loc 1 26 7 is_stmt 1 view .LVU21
137 .loc 1 26 11 is_stmt 0 view .LVU22
138 0004 01F5B461 add r1, r1, #1440
139 .LVL13:
24:../libOLED/src/ap_math.cpp **** {
140 .loc 1 24 3 view .LVU23
141 0008 FAE7 b .L9
142 .LVL14:
143 .L8:
ARM GAS C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s page 4
27:../libOLED/src/ap_math.cpp **** }
28:../libOLED/src/ap_math.cpp **** while (ang >= SINE_STEPS * 4)
144 .loc 1 28 3 is_stmt 1 view .LVU24
145 .loc 1 28 14 is_stmt 0 view .LVU25
146 000a B1F5B46F cmp r1, #1440
147 000e 02DB blt .L10
29:../libOLED/src/ap_math.cpp **** {
30:../libOLED/src/ap_math.cpp **** ang -= SINE_STEPS * 4;
148 .loc 1 30 7 is_stmt 1 view .LVU26
149 .loc 1 30 11 is_stmt 0 view .LVU27
150 0010 A1F5B461 sub r1, r1, #1440
151 .LVL15:
28:../libOLED/src/ap_math.cpp **** {
152 .loc 1 28 3 view .LVU28
153 0014 F9E7 b .L8
154 .L10:
31:../libOLED/src/ap_math.cpp **** }
32:../libOLED/src/ap_math.cpp ****
33:../libOLED/src/ap_math.cpp **** if (ang >= 0 && ang < SINE_STEPS)
155 .loc 1 33 3 is_stmt 1 view .LVU29
156 0016 B1F5B47F cmp r1, #360
157 001a 15D3 bcc .L17
34:../libOLED/src/ap_math.cpp **** {
35:../libOLED/src/ap_math.cpp **** return (sintab[ang]);
36:../libOLED/src/ap_math.cpp **** }
37:../libOLED/src/ap_math.cpp **** else if (ang == SINE_STEPS)
158 .loc 1 37 8 view .LVU30
159 001c B1F5B47F cmp r1, #360
160 0020 15D0 beq .L18
38:../libOLED/src/ap_math.cpp **** {
39:../libOLED/src/ap_math.cpp **** return AP_K;
40:../libOLED/src/ap_math.cpp **** }
41:../libOLED/src/ap_math.cpp **** else if (ang > SINE_STEPS && ang <= SINE_STEPS * 2)
161 .loc 1 41 8 view .LVU31
162 .loc 1 41 29 is_stmt 0 view .LVU32
163 0022 A1F26912 subw r2, r1, #361
164 .loc 1 41 8 view .LVU33
165 0026 B2F5B47F cmp r2, #360
166 002a 12D3 bcc .L19
42:../libOLED/src/ap_math.cpp **** {
43:../libOLED/src/ap_math.cpp **** return (sintab[SINE_STEPS * 2 - ang]);
44:../libOLED/src/ap_math.cpp **** }
45:../libOLED/src/ap_math.cpp **** else if (ang == 3 * SINE_STEPS)
167 .loc 1 45 8 is_stmt 1 view .LVU34
168 002c B1F5876F cmp r1, #1080
169 0030 14D0 beq .L20
46:../libOLED/src/ap_math.cpp **** {
47:../libOLED/src/ap_math.cpp **** return -AP_K;
48:../libOLED/src/ap_math.cpp **** }
49:../libOLED/src/ap_math.cpp **** if (ang > SINE_STEPS * 2 && ang < SINE_STEPS * 3)
170 .loc 1 49 3 view .LVU35
171 .loc 1 49 28 is_stmt 0 view .LVU36
172 0032 A1F2D123 subw r3, r1, #721
173 .loc 1 49 3 view .LVU37
174 0036 B3F5B37F cmp r3, #358
175 003a 12D8 bhi .L16
50:../libOLED/src/ap_math.cpp **** {
ARM GAS C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s page 5
51:../libOLED/src/ap_math.cpp **** return (-sintab[ang - SINE_STEPS * 2]);
176 .loc 1 51 7 is_stmt 1 view .LVU38
177 .loc 1 51 27 is_stmt 0 view .LVU39
178 003c A1F53471 sub r1, r1, #720
179 .LVL16:
180 .loc 1 51 43 view .LVU40
181 0040 0144 add r1, r1, r0
182 .LVL17:
183 .loc 1 51 43 view .LVU41
184 0042 0879 ldrb r0, [r1, #4] @ zero_extendqisi2
185 .LVL18:
186 .loc 1 51 44 view .LVU42
187 0044 4042 rsbs r0, r0, #0
188 0046 7047 bx lr
189 .LVL19:
190 .L17:
35:../libOLED/src/ap_math.cpp **** }
191 .loc 1 35 7 is_stmt 1 view .LVU43
35:../libOLED/src/ap_math.cpp **** }
192 .loc 1 35 25 is_stmt 0 view .LVU44
193 0048 0144 add r1, r1, r0
194 .LVL20:
35:../libOLED/src/ap_math.cpp **** }
195 .loc 1 35 25 view .LVU45
196 004a 0879 ldrb r0, [r1, #4] @ zero_extendqisi2
197 .LVL21:
35:../libOLED/src/ap_math.cpp **** }
198 .loc 1 35 26 view .LVU46
199 004c 7047 bx lr
200 .LVL22:
201 .L18:
39:../libOLED/src/ap_math.cpp **** }
202 .loc 1 39 7 is_stmt 1 view .LVU47
39:../libOLED/src/ap_math.cpp **** }
203 .loc 1 39 14 is_stmt 0 view .LVU48
204 004e 0068 ldr r0, [r0]
205 .LVL23:
39:../libOLED/src/ap_math.cpp **** }
206 .loc 1 39 14 view .LVU49
207 0050 7047 bx lr
208 .LVL24:
209 .L19:
43:../libOLED/src/ap_math.cpp **** }
210 .loc 1 43 7 is_stmt 1 view .LVU50
43:../libOLED/src/ap_math.cpp **** }
211 .loc 1 43 37 is_stmt 0 view .LVU51
212 0052 C1F53471 rsb r1, r1, #720
213 .LVL25:
43:../libOLED/src/ap_math.cpp **** }
214 .loc 1 43 42 view .LVU52
215 0056 0144 add r1, r1, r0
216 0058 0879 ldrb r0, [r1, #4] @ zero_extendqisi2
217 .LVL26:
43:../libOLED/src/ap_math.cpp **** }
218 .loc 1 43 43 view .LVU53
219 005a 7047 bx lr
220 .LVL27:
ARM GAS C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s page 6
221 .L20:
47:../libOLED/src/ap_math.cpp **** }
222 .loc 1 47 7 is_stmt 1 view .LVU54
47:../libOLED/src/ap_math.cpp **** }
223 .loc 1 47 15 is_stmt 0 view .LVU55
224 005c 0068 ldr r0, [r0]
225 .LVL28:
47:../libOLED/src/ap_math.cpp **** }
226 .loc 1 47 14 view .LVU56
227 005e 4042 rsbs r0, r0, #0
47:../libOLED/src/ap_math.cpp **** }
228 .loc 1 47 15 view .LVU57
229 0060 7047 bx lr
230 .LVL29:
231 .L16:
52:../libOLED/src/ap_math.cpp **** }
53:../libOLED/src/ap_math.cpp **** else
54:../libOLED/src/ap_math.cpp **** /* ang > 270 and ang < 360 */
55:../libOLED/src/ap_math.cpp **** {
56:../libOLED/src/ap_math.cpp **** return (-sintab[SINE_STEPS * 4 - ang]);
232 .loc 1 56 7 is_stmt 1 view .LVU58
233 .loc 1 56 38 is_stmt 0 view .LVU59
234 0062 C1F5B461 rsb r1, r1, #1440
235 .LVL30:
236 .loc 1 56 43 view .LVU60
237 0066 0144 add r1, r1, r0
238 0068 0879 ldrb r0, [r1, #4] @ zero_extendqisi2
239 .LVL31:
240 .loc 1 56 44 view .LVU61
241 006a 4042 rsbs r0, r0, #0
57:../libOLED/src/ap_math.cpp **** }
58:../libOLED/src/ap_math.cpp **** }
242 .loc 1 58 1 view .LVU62
243 006c 7047 bx lr
244 .cfi_endproc
245 .LFE228:
247 .section .text._ZN7ap_math6ap_cosEi,"ax",%progbits
248 .align 1
249 .global _ZN7ap_math6ap_cosEi
250 .syntax unified
251 .thumb
252 .thumb_func
253 .fpu softvfp
255 _ZN7ap_math6ap_cosEi:
256 .LVL32:
257 .LFB229:
59:../libOLED/src/ap_math.cpp ****
60:../libOLED/src/ap_math.cpp **** /* returns 255 * cos(ang) where ang is in degrees */
61:../libOLED/src/ap_math.cpp **** int
62:../libOLED/src/ap_math.cpp **** ap_math::ap_cos (int ang)
63:../libOLED/src/ap_math.cpp **** {
258 .loc 1 63 1 is_stmt 1 view -0
259 .cfi_startproc
260 @ args = 0, pretend = 0, frame = 0
261 @ frame_needed = 0, uses_anonymous_args = 0
262 .loc 1 63 1 is_stmt 0 view .LVU64
263 0000 08B5 push {r3, lr}
ARM GAS C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s page 7
264 .LCFI1:
265 .cfi_def_cfa_offset 8
266 .cfi_offset 3, -8
267 .cfi_offset 14, -4
64:../libOLED/src/ap_math.cpp **** return ap_sin (SINE_STEPS - ang);
268 .loc 1 64 3 is_stmt 1 view .LVU65
269 .loc 1 64 17 is_stmt 0 view .LVU66
270 0002 C1F5B471 rsb r1, r1, #360
271 .LVL33:
272 .loc 1 64 17 view .LVU67
273 0006 FFF7FEFF bl _ZN7ap_math6ap_sinEi
274 .LVL34:
65:../libOLED/src/ap_math.cpp **** }
275 .loc 1 65 1 view .LVU68
276 000a 08BD pop {r3, pc}
277 .cfi_endproc
278 .LFE229:
280 .text
281 .Letext0:
282 .file 2 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.7
283 .file 3 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.7
284 .file 4 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.7
285 .file 5 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.7
286 .file 6 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.7
287 .file 7 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.7
288 .file 8 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.7
289 .file 9 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.7
290 .file 10 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.
291 .file 11 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.
292 .file 12 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.
293 .file 13 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.
294 .file 14 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.
295 .file 15 "c:\\users\\mike\\appdata\\roaming\\xpacks\\@gnu-mcu-eclipse\\arm-none-eabi-gcc\\8.2.1-1.
296 .file 16 "../libOLED/inc/libOLED/ap_math.h"
297 .file 17 "<built-in>"
ARM GAS C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s page 8
DEFINED SYMBOLS
*ABS*:0000000000000000 ap_math.cpp
C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s:20 .text._ZN7ap_mathC2Ev:0000000000000000 $t
C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s:28 .text._ZN7ap_mathC2Ev:0000000000000000 _ZN7ap_mathC2Ev
C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s:106 .text._ZN7ap_mathC2Ev:0000000000000048 $d
C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s:28 .text._ZN7ap_mathC2Ev:0000000000000000 _ZN7ap_mathC1Ev
C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s:116 .text._ZN7ap_math6ap_sinEi:0000000000000000 $t
C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s:123 .text._ZN7ap_math6ap_sinEi:0000000000000000 _ZN7ap_math6ap_sinEi
C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s:248 .text._ZN7ap_math6ap_cosEi:0000000000000000 $t
C:\Users\mike\AppData\Local\Temp\ccLjNCIz.s:255 .text._ZN7ap_math6ap_cosEi:0000000000000000 _ZN7ap_math6ap_cosEi
UNDEFINED SYMBOLS
__aeabi_i2d
__aeabi_ddiv
__aeabi_dmul
__aeabi_d2uiz
sin