Subversion Repositories FlightCtrl

Rev

Rev 2300 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2285 - 1
   1               		.file	"mymath.c"
2
   2               		.arch atmega1284p
3
   3               	__SREG__ = 0x3f
4
   4               	__SP_H__ = 0x3e
5
   5               	__SP_L__ = 0x3d
6
   6               	__tmp_reg__ = 0
7
   7               	__zero_reg__ = 1
8
   8               		.global __do_copy_data
9
   9               		.global __do_clear_bss
10
  10               	.global	pgm_sinlookup
11
  11               		.section	.progmem.data,"a",@progbits
12
  14               	pgm_sinlookup:
13
  15 0000 0000      		.word	0
14
  16 0002 8F00      		.word	143
15
  17 0004 1E01      		.word	286
16
  18 0006 AD01      		.word	429
17
  19 0008 3B02      		.word	571
18
  20 000a CA02      		.word	714
19
  21 000c 5803      		.word	856
20
  22 000e E603      		.word	998
21
  23 0010 7404      		.word	1140
22
  24 0012 0205      		.word	1282
23
  25 0014 8F05      		.word	1423
24
  26 0016 1B06      		.word	1563
25
  27 0018 A706      		.word	1703
26
  28 001a 3307      		.word	1843
27
  29 001c BE07      		.word	1982
28
  30 001e 4808      		.word	2120
29
  31 0020 D208      		.word	2258
30
  32 0022 5B09      		.word	2395
31
  33 0024 E309      		.word	2531
32
  34 0026 6B0A      		.word	2667
33
  35 0028 F20A      		.word	2802
34
  36 002a 780B      		.word	2936
35
  37 002c FD0B      		.word	3069
36
  38 002e 810C      		.word	3201
37
  39 0030 040D      		.word	3332
38
  40 0032 860D      		.word	3462
39
  41 0034 070E      		.word	3591
40
  42 0036 870E      		.word	3719
41
  43 0038 060F      		.word	3846
42
  44 003a 840F      		.word	3972
43
  45 003c 0010      		.word	4096
44
  46 003e 7B10      		.word	4219
45
  47 0040 F510      		.word	4341
46
  48 0042 6E11      		.word	4462
47
  49 0044 E511      		.word	4581
48
  50 0046 5B12      		.word	4699
49
  51 0048 CF12      		.word	4815
50
  52 004a 4213      		.word	4930
51
  53 004c B313      		.word	5043
52
  54 004e 2314      		.word	5155
53
  55 0050 9214      		.word	5266
54
  56 0052 FE14      		.word	5374
55
  57 0054 6A15      		.word	5482
56
  58 0056 D315      		.word	5587
57
  59 0058 3B16      		.word	5691
58
  60 005a A116      		.word	5793
59
  61 005c 0517      		.word	5893
60
  62 005e 6717      		.word	5991
61
  63 0060 C817      		.word	6088
62
  64 0062 2718      		.word	6183
63
  65 0064 8318      		.word	6275
64
  66 0066 DE18      		.word	6366
65
  67 0068 3719      		.word	6455
66
  68 006a 8E19      		.word	6542
67
  69 006c E319      		.word	6627
68
  70 006e 361A      		.word	6710
69
  71 0070 871A      		.word	6791
70
  72 0072 D61A      		.word	6870
71
  73 0074 231B      		.word	6947
72
  74 0076 6E1B      		.word	7022
73
  75 0078 B61B      		.word	7094
74
  76 007a FD1B      		.word	7165
75
  77 007c 411C      		.word	7233
76
  78 007e 831C      		.word	7299
77
  79 0080 C31C      		.word	7363
78
  80 0082 001D      		.word	7424
79
  81 0084 3C1D      		.word	7484
80
  82 0086 751D      		.word	7541
81
  83 0088 AB1D      		.word	7595
82
  84 008a E01D      		.word	7648
83
  85 008c 121E      		.word	7698
84
  86 008e 421E      		.word	7746
85
  87 0090 6F1E      		.word	7791
86
  88 0092 9A1E      		.word	7834
87
  89 0094 C31E      		.word	7875
88
  90 0096 E91E      		.word	7913
89
  91 0098 0D1F      		.word	7949
90
  92 009a 2E1F      		.word	7982
91
  93 009c 4D1F      		.word	8013
92
  94 009e 691F      		.word	8041
93
  95 00a0 841F      		.word	8068
94
  96 00a2 9B1F      		.word	8091
95
  97 00a4 B01F      		.word	8112
96
  98 00a6 C31F      		.word	8131
97
  99 00a8 D31F      		.word	8147
98
 100 00aa E11F      		.word	8161
99
 101 00ac EC1F      		.word	8172
100
 102 00ae F51F      		.word	8181
101
 103 00b0 FB1F      		.word	8187
102
 104 00b2 FF1F      		.word	8191
103
 105 00b4 0020      		.word	8192
104
 106               		.text
105
 107               	.global	c_sin_8192
106
 109               	c_sin_8192:
107
 110               	/* prologue: frame size=0 */
108
 111 0000 CF93      		push r28
109
 112               	/* prologue end (size=1) */
110
 113 0002 FC01      		movw r30,r24
111
 114 0004 97FF      		sbrs r25,7
112
 115 0006 00C0      		rjmp .L2
113
 116 0008 CFEF      		ldi r28,lo8(-1)
114
 117 000a F095      		com r31
115
 118 000c E195      		neg r30
116
 119 000e FF4F      		sbci r31,lo8(-1)
117
 120 0010 00C0      		rjmp .L4
118
 121               	.L2:
119
 122 0012 C1E0      		ldi r28,lo8(1)
120
 123               	.L4:
121
 124 0014 28E6      		ldi r18,lo8(360)
122
 125 0016 31E0      		ldi r19,hi8(360)
123
 126 0018 CF01      		movw r24,r30
124
 127 001a B901      		movw r22,r18
125
 128 001c 0E94 0000 		call __divmodhi4
126
 129 0020 FC01      		movw r30,r24
127
 130 0022 8B35      		cpi r24,91
128
 131 0024 9105      		cpc r25,__zero_reg__
129
 132 0026 04F0      		brlt .L12
130
 133 0028 8B55      		subi r24,lo8(-(-91))
131
 134 002a 9040      		sbci r25,hi8(-(-91))
132
 135 002c 8A35      		cpi r24,90
133
 136 002e 9105      		cpc r25,__zero_reg__
134
 137 0030 00F4      		brsh .L7
135
 138 0032 84EB      		ldi r24,lo8(180)
136
 139 0034 90E0      		ldi r25,hi8(180)
137
 140 0036 8E1B      		sub r24,r30
138
 141 0038 9F0B      		sbc r25,r31
139
 142 003a FC01      		movw r30,r24
140
 143               	.L12:
141
 144 003c 41E0      		ldi r20,lo8(1)
142
 145 003e 00C0      		rjmp .L6
143
 146               	.L7:
144
 147 0040 CF01      		movw r24,r30
145
 148 0042 855B      		subi r24,lo8(-(-181))
146
 149 0044 9040      		sbci r25,hi8(-(-181))
147
 150 0046 8A35      		cpi r24,90
148
 151 0048 9105      		cpc r25,__zero_reg__
149
 152 004a 00F4      		brsh .L9
150
 153 004c E45B      		subi r30,lo8(-(-180))
151
 154 004e F040      		sbci r31,hi8(-(-180))
152
 155 0050 00C0      		rjmp .L11
153
 156               	.L9:
154
 157 0052 2E1B      		sub r18,r30
155
 158 0054 3F0B      		sbc r19,r31
156
 159 0056 F901      		movw r30,r18
157
 160               	.L11:
158
 161 0058 4FEF      		ldi r20,lo8(-1)
159
 162               	.L6:
160
 163 005a EE0F      		add r30,r30
161
 164 005c FF1F      		adc r31,r31
162
 165 005e E050      		subi r30,lo8(-(pgm_sinlookup))
163
 166 0060 F040      		sbci r31,hi8(-(pgm_sinlookup))
164
 167               	/* #APP */
165
 168 0062 2591      		lpm r18, Z+
166
 169 0064 3491      		lpm r19, Z
167
 170
168
 171               	/* #NOAPP */
169
 172 0066 8C2F      		mov r24,r28
170
 173 0068 9927      		clr r25
171
 174 006a 87FD      		sbrc r24,7
172
 175 006c 9095      		com r25
173
 176 006e 289F      		mul r18,r24
174
 177 0070 B001      		movw r22,r0
175
 178 0072 299F      		mul r18,r25
176
 179 0074 700D      		add r23,r0
177
 180 0076 389F      		mul r19,r24
178
 181 0078 700D      		add r23,r0
179
 182 007a 1124      		clr r1
180
 183 007c 842F      		mov r24,r20
181
 184 007e 9927      		clr r25
182
 185 0080 87FD      		sbrc r24,7
183
 186 0082 9095      		com r25
184
 187 0084 689F      		mul r22,r24
185
 188 0086 A001      		movw r20,r0
186
 189 0088 699F      		mul r22,r25
187
 190 008a 500D      		add r21,r0
188
 191 008c 789F      		mul r23,r24
189
 192 008e 500D      		add r21,r0
190
 193 0090 1124      		clr r1
191
 194 0092 CA01      		movw r24,r20
192
 195               	/* epilogue: frame size=0 */
193
 196 0094 CF91      		pop r28
194
 197 0096 0895      		ret
195
 198               	/* epilogue end (size=2) */
196
 199               	/* function c_sin_8192 size 80 (77) */
197
 201               	.global	c_cos_8192
198
 203               	c_cos_8192:
199
 204               	/* prologue: frame size=0 */
200
 205               	/* prologue end (size=0) */
201
 206 0098 2AE5      		ldi r18,lo8(90)
202
 207 009a 30E0      		ldi r19,hi8(90)
203
 208 009c 281B      		sub r18,r24
204
 209 009e 390B      		sbc r19,r25
205
 210 00a0 C901      		movw r24,r18
206
 211 00a2 0E94 0000 		call c_sin_8192
207
 212               	/* epilogue: frame size=0 */
208
 213 00a6 0895      		ret
209
 214               	/* epilogue end (size=1) */
210
 215               	/* function c_cos_8192 size 8 (7) */
211
 217               	/* File "mymath.c": code   88 = 0x0058 (  84), prologues   1, epilogues   3 */
212
DEFINED SYMBOLS
213
                            *ABS*:00000000 mymath.c
214
  C:\Temp/cctSHyeF.s:3      *ABS*:0000003f __SREG__
215
  C:\Temp/cctSHyeF.s:4      *ABS*:0000003e __SP_H__
216
  C:\Temp/cctSHyeF.s:5      *ABS*:0000003d __SP_L__
217
  C:\Temp/cctSHyeF.s:6      *ABS*:00000000 __tmp_reg__
218
  C:\Temp/cctSHyeF.s:7      *ABS*:00000001 __zero_reg__
219
  C:\Temp/cctSHyeF.s:14     .progmem.data:00000000 pgm_sinlookup
220
  C:\Temp/cctSHyeF.s:109    .text:00000000 c_sin_8192
221
  C:\Temp/cctSHyeF.s:203    .text:00000098 c_cos_8192
222
 
223
UNDEFINED SYMBOLS
224
__do_copy_data
225
__do_clear_bss
226
__divmodhi4