]> git.saurik.com Git - apple/xnu.git/blob - osfmk/ppc/asm.h
xnu-517.9.4.tar.gz
[apple/xnu.git] / osfmk / ppc / asm.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /*
23 * @OSF_COPYRIGHT@
24 */
25 #ifndef _PPC_ASM_H_
26 #define _PPC_ASM_H_
27
28 #define __ASMNL__ @
29 #define STRINGD .ascii
30
31 #ifdef ASSEMBLER
32
33
34 #define br0 0
35
36 #define ARG0 r3
37 #define ARG1 r4
38 #define ARG2 r5
39 #define ARG3 r6
40 #define ARG4 r7
41 #define ARG5 r8
42 #define ARG6 r9
43 #define ARG7 r10
44
45 #define tmp0 r0 /* Temporary GPR remapping (603e specific) */
46 #define tmp1 r1
47 #define tmp2 r2
48 #define tmp3 r3
49
50 /* SPR registers */
51
52 #define mq 0 /* MQ register for 601 emulation */
53 #define rtcu 4 /* RTCU - upper word of RTC for 601 emulation */
54 #define rtcl 5 /* RTCL - lower word of RTC for 601 emulation */
55 #define dsisr 18
56 #define ppcDAR 19
57 #define ppcdar 19
58 #define dar 19
59 #define SDR1 25
60 #define sdr1 25
61 #define srr0 26
62 #define srr1 27
63 #define vrsave 256 /* Vector Register save */
64 #define sprg0 272
65 #define sprg1 273
66 #define sprg2 274
67 #define sprg3 275
68 #define scomc 276
69 #define scomd 277
70 #define pvr 287
71
72 #define IBAT0U 528
73 #define IBAT0L 529
74 #define IBAT1U 530
75 #define IBAT1L 531
76 #define IBAT2U 532
77 #define IBAT2L 533
78 #define IBAT3U 534
79 #define IBAT3L 535
80 #define ibat0u 528
81 #define ibat0l 529
82 #define ibat1u 530
83 #define ibat1l 531
84 #define ibat2u 532
85 #define ibat2l 533
86 #define ibat3u 534
87 #define ibat3l 535
88
89 #define DBAT0U 536
90 #define DBAT0L 537
91 #define DBAT1U 538
92 #define DBAT1L 539
93 #define DBAT2U 540
94 #define DBAT2L 541
95 #define DBAT3U 542
96 #define DBAT3L 543
97 #define dbat0u 536
98 #define dbat0l 537
99 #define dbat1u 538
100 #define dbat1l 539
101 #define dbat2u 540
102 #define dbat2l 541
103 #define dbat3u 542
104 #define dbat3l 543
105
106 #define ummcr2 928 /* Performance monitor control */
107 #define upmc5 929 /* Performance monitor counter */
108 #define upmc6 930 /* Performance monitor counter */
109 #define ubamr 935 /* Performance monitor mask */
110 #define ummcr0 936 /* Performance monitor control */
111 #define upmc1 937 /* Performance monitor counter */
112 #define upmc2 938 /* Performance monitor counter */
113 #define usia 939 /* User sampled instruction address */
114 #define ummcr1 940 /* Performance monitor control */
115 #define upmc3 941 /* Performance monitor counter */
116 #define upmc4 942 /* Performance monitor counter */
117 #define usda 943 /* User sampled data address */
118 #define mmcr2 944 /* Performance monitor control */
119 #define pmc5 945 /* Performance monitor counter */
120 #define pmc6 946 /* Performance monitor counter */
121 #define bamr 951 /* Performance monitor mask */
122 #define mmcr0 952
123 #define pmc1 953
124 #define pmc2 954
125 #define sia 955
126 #define mmcr1 956
127 #define pmc3 957
128 #define pmc4 958
129 #define sda 959 /* Sampled data address */
130 #define dmiss 976 /* ea that missed */
131 #define trig0 976
132 #define dcmp 977 /* compare value for the va that missed */
133 #define trig1 977
134 #define hash1 978 /* pointer to first hash pteg */
135 #define trig2 978
136 #define hash2 979 /* pointer to second hash pteg */
137 #define imiss 980 /* ea that missed */
138 #define tlbmiss 980 /* ea that missed */
139 #define icmp 981 /* compare value for the va that missed */
140 #define ptehi 981 /* compare value for the va that missed */
141 #define rpa 982 /* required physical address register */
142 #define ptelo 982 /* required physical address register */
143 #define l3pdet 984 /* l3pdet */
144
145 #define HID0 1008 /* Checkstop and misc enables */
146 #define hid0 1008 /* Checkstop and misc enables */
147 #define HID1 1009 /* Clock configuration */
148 #define hid1 1009 /* Clock configuration */
149 #define HID2 1016 /* Other processor controls */
150 #define hid2 1016 /* Other processor controls */
151 #define iabr 1010 /* Instruction address breakpoint register */
152 #define ictrl 1011 /* Instruction Cache Control */
153 #define ldstdb 1012 /* Load/Store Debug */
154 #define hid4 1012 /* Misc stuff */
155 #define dabr 1013 /* Data address breakpoint register */
156 #define msscr0 1014 /* Memory subsystem control */
157 #define hid5 1014 /* Misc stuff */
158 #define msscr1 1015 /* Memory subsystem debug */
159 #define msssr0 1015 /* Memory Subsystem Status */
160 #define ldstcr 1016 /* Load/Store Status/Control */
161 #define l2cr2 1016 /* L2 Cache control 2 */
162 #define l2cr 1017 /* L2 Cache control */
163 #define l3cr 1018 /* L3 Cache control */
164 #define ictc 1019 /* I-cache throttling control */
165 #define thrm1 1020 /* Thermal management 1 */
166 #define thrm2 1021 /* Thermal management 2 */
167 #define thrm3 1022 /* Thermal management 3 */
168 #define pir 1023 /* Processor ID Register */
169
170
171 /* SPR registers (64-bit, PPC970 specific) */
172
173 #define scomc_gp 276
174 #define scomd_gp 277
175
176 #define hsprg0 304
177 #define hsprg1 305
178 #define hdec 310
179 #define hior 311
180 #define rmor 312
181 #define hrmor 313
182 #define hsrr0 314
183 #define hsrr1 315
184 #define lpcr 318
185 #define lpidr 319
186
187 #define ummcra_gp 770
188 #define upmc1_gp 771
189 #define upmc2_gp 772
190 #define upmc3_gp 773
191 #define upmc4_gp 774
192 #define upmc5_gp 775
193 #define upmc6_gp 776
194 #define upmc7_gp 777
195 #define upmc8_gp 778
196 #define ummcr0_gp 779
197 #define usiar_gp 780
198 #define usdar_gp 781
199 #define ummcr1_gp 782
200 #define uimc_gp 783
201
202 #define mmcra_gp 786
203 #define pmc1_gp 787
204 #define pmc2_gp 788
205 #define pmc3_gp 789
206 #define pmc4_gp 790
207 #define pmc5_gp 791
208 #define pmc6_gp 792
209 #define pmc7_gp 793
210 #define pmc8_gp 794
211 #define mmcr0_gp 795
212 #define siar_gp 796
213 #define sdar_gp 797
214 #define mmcr1_gp 798
215 #define imc_gp 799
216
217 #define trig0_gp 976
218 #define trig1_gp 977
219 #define trig2_gp 978
220
221 #define dabrx 1015
222
223 ; hid0 bits
224 #define emcp 0
225 #define emcpm 0x80000000
226 #define dbp 1
227 #define dbpm 0x40000000
228 #define eba 2
229 #define ebam 0x20000000
230 #define ebd 3
231 #define ebdm 0x10000000
232 #define sbclk 4
233 #define sbclkm 0x08000000
234 #define eclk 6
235 #define eclkm 0x02000000
236 #define par 7
237 #define parm 0x01000000
238 #define sten 7
239 #define stenm 0x01000000
240 #define dnap 7
241 #define dnapm 0x01000000
242 #define doze 8
243 #define dozem 0x00800000
244 #define nap 9
245 #define napm 0x00400000
246 #define sleep 10
247 #define sleepm 0x00200000
248 #define dpm 11
249 #define dpmm 0x00100000
250 #define riseg 12
251 #define risegm 0x00080000
252 #define eiec 13
253 #define eiecm 0x00040000
254 #define mum 14
255 #define mumm 0x00020000
256 #define nhr 15
257 #define nhrm 0x00010000
258 #define ice 16
259 #define icem 0x00008000
260 #define dce 17
261 #define dcem 0x00004000
262 #define ilock 18
263 #define ilockm 0x00002000
264 #define dlock 19
265 #define dlockm 0x00001000
266 #define exttben 19
267 #define icfi 20
268 #define icfim 0x00000800
269 #define dcfi 21
270 #define dcfim 0x00000400
271 #define spd 22
272 #define spdm 0x00000200
273 #define sge 24
274 #define sgem 0x00000080
275 #define dcfa 25
276 #define dcfam 0x00000040
277 #define btic 26
278 #define bticm 0x00000020
279 #define lrstk 27
280 #define lrstkm 0x00000010
281 #define abe 28
282 #define abem 0x00000008
283 #define fold 28
284 #define foldm 0x00000008
285 #define bht 29
286 #define bhtm 0x00000004
287 #define nopdst 30
288 #define nopdstm 0x00000002
289 #define nopti 31
290 #define noptim 0x00000001
291
292 ; hid1 bits
293 #define hid1pcem 0xF8000000
294 #define hid1prem 0x06000000
295 #define hid1dfs0 8
296 #define hid1dfs0m 0x00800000
297 #define hid1dfs1 9
298 #define hid1dfs1m 0x00400000
299 #define hid1pi0 14
300 #define hid1pi0m 0x00020000
301 #define hid1FCPErr 14
302 #define hid1ps 15
303 #define hid1FCD0PErr 15
304 #define hid1psm 0x00010000
305 #define hid1pc0 0x0000F800
306 #define hid1pr0 0x00000600
307 #define hid1pc1 0x000000F8
308 #define hid1pc0 0x0000F800
309 #define hid1pr1 0x00000006
310 #define hid1FCD1PErr 16
311 #define hid1FIERATErr 17
312
313 ; hid2 bits
314 #define hid2vmin 18
315 #define hid2vminm 0x00002000
316
317 ; msscr0 bits
318 #define shden 0
319 #define shdenm 0x80000000
320 #define shden3 1
321 #define shdenm3 0x40000000
322 #define l1intvs 2
323 #define l1intve 4
324 #define l1intvb 0x38000000
325 #define l2intvs 5
326 #define l2intve 7
327 #define l2intvb 0x07000000
328 #define dl1hwf 8
329 #define dl1hwfm 0x00800000
330 #define dbsiz 9
331 #define dbsizm 0x00400000
332 #define emode 10
333 #define emodem 0x00200000
334 #define abgd 11
335 #define abgdm 0x00100000
336 #define tfsts 24
337 #define tfste 25
338 #define tfstm 0x000000C0
339 #define l2pfes 30
340 #define l2pfee 31
341 #define l2pfem 0x00000003
342
343 ; msscr1 bits
344 #define cqd 15
345 #define cqdm 0x00010000
346 #define csqs 1
347 #define csqe 2
348 #define csqm 0x60000000
349
350 ; msssr1 bits - 7450
351 #define vgL2PARA 0
352 #define vgL3PARA 1
353 #define vgL2COQEL 2
354 #define vgL3COQEL 3
355 #define vgL2CTR 4
356 #define vgL3CTR 5
357 #define vgL2COQR 6
358 #define vgL3COQR 7
359 #define vgLMQ 8
360 #define vgSMC 9
361 #define vgSNP 10
362 #define vgBIU 11
363 #define vgSMCE 12
364 #define vgL2TAG 13
365 #define vgL2DAT 14
366 #define vgL3TAG 15
367 #define vgL3DAT 16
368 #define vgAPE 17
369 #define vgDPE 18
370 #define vgTEA 19
371
372 ; srr1 bits
373 #define icmck 1
374 #define icmckm 0x40000000
375 #define dcmck 2
376 #define dcmckm 0x20000000
377 #define l2mck 3
378 #define l2mckm 0x10000000
379 #define tlbmck 4
380 #define tlbmckm 0x08000000
381 #define brmck 5
382 #define brmckm 0x04000000
383 #define othmck 10
384 #define othmckm 0x00200000
385 #define l2dpmck 11
386 #define l2dpmckm 0x00100000
387 #define mcpmck 12
388 #define mcpmckm 0x00080000
389 #define teamck 13
390 #define teamckm 0x00040000
391 #define dpmck 14
392 #define dpmckm 0x00020000
393 #define apmck 15
394 #define apmckm 0x00010000
395
396 #define mckIFUE 42
397 #define mckLDST 43
398 #define mckXCs 44
399 #define mckXCe 45
400 #define mckNoErr 0
401 #define mckIFSLBPE 1
402 #define mckIFTLBPE 2
403 #define mckIFTLBUE 3
404
405 ; dsisr bits
406 #define mckUEdfr 16
407 #define mckUETwDfr 17
408 #define mckL1DCPE 18
409 #define mckL1DTPE 19
410 #define mckDEPE 20
411 #define mckTLBPE 21
412 #define mckSLBPE 23
413
414 ; Async MCK source
415 #define AsyMCKSrc 0x0226
416 #define AsyMCKRSrc 0x0227
417 #define AsyMCKext 0
418 #define AsyMCKfir 1
419 #define AsyMCKhri 2
420 #define AsyMCKdbg 3
421 #define AsyMCKncstp 4
422
423 ; Core FIR
424 #define cFIR 0x0300
425 #define cFIRrst 0x0310
426 #define cFIRICachePE 0
427 #define cFIRITagPE0 1
428 #define cFIRITagPE1 2
429 #define cFIRIEratPE 3
430 #define cFIRIFUL2UE 4
431 #define cFIRIFUCS 5
432 #define cFIRDCachePE 6
433 #define cFIRDTagPE 7
434 #define cFIRDEratPE 8
435 #define cFIRTLBPE 9
436 #define cFIRSLBPE 10
437 #define cFIRSL2UE 11
438
439 ; Core Error Inject
440 #define CoreErrI 0x0350
441 #define CoreIFU 0
442 #define CoreLSU 1
443 #define CoreRate0 2
444 #define CoreRate1 3
445 #define CoreOnce 0
446 #define CoreSolid 2
447 #define CorePulse 3
448
449 ; L2 FIR
450 #define l2FIR 0x0400
451 #define l2FIRrst 0x0410
452
453 ; Bus FIR
454 #define busFIR 0x0A00
455 #define busFIRrst 0x0A10
456
457 ; GUS Mode Register
458 #define GUSModeReg 0x0430
459 #define GUSMdmapen 0x00008000
460 #define GUSMstgtdis 0x00000080
461 #define GUSMstgttim 0x00000038
462 #define GUSMstgttoff 0x00000004
463
464 ; PowerTune
465 #define PowerTuneControlReg 0x0AA001
466 #define PowerTuneStatusReg 0x408001
467
468 ; HID4
469 #define hid4RMCI 23
470 #define hid4FAlgn 24
471 #define hid4DisPF 25
472 #define hid4ResPF 26
473 #define hid4EnSPTW 27
474 #define hid4L1DCFI 28
475 #define hid4DisDERpg 31
476 #define hid4DisDCTpg 36
477 #define hid4DisDCpg 41
478 #define hid4DisTLBpg 48
479 #define hid4DisSLBpg 54
480 #define hid4MckEIEna 55
481
482 ; L2 cache control
483 #define l2e 0
484 #define l2em 0x80000000
485 #define l2pe 1
486 #define l2pem 0x40000000
487 #define l2siz 2
488 #define l2sizf 3
489 #define l2sizm 0x30000000
490 #define l2clk 4
491 #define l2clkf 6
492 #define l2clkm 0x0E000000
493 #define l2ram 7
494 #define l2ramf 8
495 #define l2ramm 0x01800000
496 #define l2do 9
497 #define l2dom 0x00400000
498 #define l2i 10
499 #define l2im 0x00200000
500 #define l2ctl 11
501 #define l2ctlm 0x00100000
502 #define l2ionly 11
503 #define l2ionlym 0x00100000
504 #define l2wt 12
505 #define l2wtm 0x00080000
506 #define l2ts 13
507 #define l2tsm 0x00040000
508 #define l2oh 14
509 #define l2ohf 15
510 #define l2ohm 0x00030000
511 #define l2donly 15
512 #define l2donlym 0x00010000
513 #define l2sl 16
514 #define l2slm 0x00008000
515 #define l2df 17
516 #define l2dfm 0x00004000
517 #define l2byp 18
518 #define l2bypm 0x00002000
519 #define l2fa 19
520 #define l2fam 0x00001000
521 #define l2hwf 20
522 #define l2hwfm 0x00000800
523 #define l2io 21
524 #define l2iom 0x00000400
525 #define l2clkstp 22
526 #define l2clkstpm 0x00000200
527 #define l2dro 23
528 #define l2drom 0x00000100
529 #define l2ctr 24
530 #define l2ctrf 30
531 #define l2ctrm 0x000000FE
532 #define l2ip 31
533 #define l2ipm 0x00000001
534
535 ; L3 cache control
536 #define l3e 0
537 #define l3em 0x80000000
538 #define l3pe 1
539 #define l3pem 0x40000000
540 #define l3siz 3
541 #define l3sizm 0x10000000
542 #define l3clken 4
543 #define l3clkenm 0x08000000
544 #define l3dx 5
545 #define l3dxm 0x04000000
546 #define l3clk 6
547 #define l3clkf 8
548 #define l3clkm 0x03800000
549 #define l3io 9
550 #define l3iom 0x00400000
551 #define l3spo 13
552 #define l3spom 0x00040000
553 #define l3cksp 14
554 #define l3ckspf 15
555 #define l3ckspm 0x00030000
556 #define l3psp 16
557 #define l3pspf 18
558 #define l3pspm 0x0000E000
559 #define l3rep 19
560 #define l3repm 0x00001000
561 #define l3hwf 20
562 #define l3hwfm 0x00000800
563 #define l3i 21
564 #define l3im 0x00000400
565 #define l3rt 22
566 #define l3rtf 23
567 #define l3rtm 0x00000300
568 #define l3dro 23
569 #define l3drom 0x00000100
570 #define l3cya 24
571 #define l3cyam 0x00000080
572 #define l3donly 25
573 #define l3donlym 0x00000040
574 #define l3dmem 29
575 #define l3dmemm 0x00000004
576 #define l3dmsiz 31
577 #define l3dmsizm 0x00000001
578
579 #define thrmtin 0
580 #define thrmtinm 0x80000000
581 #define thrmtiv 1
582 #define thrmtivm 0x40000000
583 #define thrmthrs 2
584 #define thrmthre 8
585 #define thrmthrm 0x3F800000
586 #define thrmtid 29
587 #define thrmtidm 0x00000004
588 #define thrmtie 30
589 #define thrmtiem 0x00000002
590 #define thrmv 31
591 #define thrmvm 0x00000001
592
593 #define thrmsitvs 15
594 #define thrmsitve 30
595 #define thrmsitvm 0x0001FFFE
596 #define thrme 31
597 #define thrmem 0x00000001
598
599 #define ictcfib 23
600 #define ictcfie 30
601 #define ictcfim 0x000001FE
602 #define ictce 31
603 #define ictcem 0x00000001
604
605 #define cr0_lt 0
606 #define cr0_gt 1
607 #define cr0_eq 2
608 #define cr0_so 3
609 #define cr0_un 3
610 #define cr1_lt 4
611 #define cr1_gt 5
612 #define cr1_eq 6
613 #define cr1_so 7
614 #define cr1_un 7
615 #define cr2_lt 8
616 #define cr2_gt 9
617 #define cr2_eq 10
618 #define cr2_so 11
619 #define cr2_un 11
620 #define cr3_lt 12
621 #define cr3_gt 13
622 #define cr3_eq 14
623 #define cr3_so 15
624 #define cr3_un 15
625 #define cr4_lt 16
626 #define cr4_gt 17
627 #define cr4_eq 18
628 #define cr4_so 19
629 #define cr4_un 19
630 #define cr5_lt 20
631 #define cr5_gt 21
632 #define cr5_eq 22
633 #define cr5_so 23
634 #define cr5_un 23
635 #define cr6_lt 24
636 #define cr6_gt 25
637 #define cr6_eq 26
638 #define cr6_so 27
639 #define cr6_un 27
640 #define cr7_lt 28
641 #define cr7_gt 29
642 #define cr7_eq 30
643 #define cr7_so 31
644 #define cr7_un 31
645
646 #define slbESID 36
647 #define slbKey 52
648 #define slbIndex 52
649 #define slbV 36
650 #define slbVm 0x08000000
651 #define slbCnt 64
652
653 /*
654 * Macros to access high and low word values of an address
655 */
656
657 #define HIGH_CADDR(x) ha16(x)
658 #define HIGH_ADDR(x) hi16(x)
659 #define LOW_ADDR(x) lo16(x)
660
661 #endif /* ASSEMBLER */
662
663 /* Tags are placed before Immediately Following Code (IFC) for the debugger
664 * to be able to deduce where to find various registers when backtracing
665 *
666 * We only define the values as we use them, see SVR4 ABI PowerPc Supplement
667 * for more details (defined in ELF spec).
668 */
669
670 #define TAG_NO_FRAME_USED 0x00000000
671
672 /* (should use genassym to get these offsets) */
673
674 #define FM_BACKPTR 0
675 #define FM_CR_SAVE 4
676 #define FM_LR_SAVE 8 /* MacOSX is NOT following the ABI at the moment.. */
677 #define FM_SIZE 64 /* minimum frame contents, backptr and LR save. Make sure it is quadaligned */
678 #define FM_ARG0 56
679 #define FM_ALIGN(l) ((l+15)&-16)
680 #define PK_SYSCALL_BEGIN 0x7000
681
682
683 /* redzone is the area under the stack pointer which must be preserved
684 * when taking a trap, interrupt etc.
685 */
686 #define FM_REDZONE 224 /* is ((32-14+1)*4) */
687
688 #define COPYIN_ARG0_OFFSET FM_ARG0
689
690 #ifdef MACH_KERNEL
691 #include <mach_kdb.h>
692 #else /* MACH_KERNEL */
693 #define MACH_KDB 0
694 #endif /* MACH_KERNEL */
695
696 #define BREAKPOINT_TRAP tw 4,r4,r4
697
698 /* There is another definition of ALIGN for .c sources */
699 #ifndef __LANGUAGE_ASSEMBLY
700 #define ALIGN 4
701 #endif /* __LANGUAGE_ASSEMBLY */
702
703 #ifndef FALIGN
704 #define FALIGN 4 /* Align functions on words for now. Cachelines is better */
705 #endif
706
707 #define LB(x,n) n
708 #if __STDC__
709 #define LCL(x) L ## x
710 #define EXT(x) _ ## x
711 #define LEXT(x) _ ## x ## :
712 #define LBc(x,n) n ## :
713 #define LBb(x,n) n ## b
714 #define LBf(x,n) n ## f
715 #else /* __STDC__ */
716 #define LCL(x) L/**/x
717 #define EXT(x) _/**/x
718 #define LEXT(x) _/**/x/**/:
719 #define LBc(x,n) n/**/:
720 #define LBb(x,n) n/**/b
721 #define LBf(x,n) n/**/f
722 #endif /* __STDC__ */
723
724 #define String .asciz
725 #define Value .word
726 #define Times(a,b) (a*b)
727 #define Divide(a,b) (a/b)
728
729 #define data16 .byte 0x66
730 #define addr16 .byte 0x67
731
732 #define MCOUNT
733
734 #define ELF_FUNC(x)
735 #define ELF_DATA(x)
736 #define ELF_SIZE(x,s)
737
738 #define Entry(x,tag) .text@.align FALIGN@ .globl EXT(x)@ LEXT(x)
739 #define ENTRY(x,tag) Entry(x,tag)@MCOUNT
740 #define ENTRY2(x,y,tag) .text@ .align FALIGN@ .globl EXT(x)@ .globl EXT(y)@ \
741 LEXT(x)@ LEXT(y) @\
742 MCOUNT
743 #if __STDC__
744 #define ASENTRY(x) .globl x @ .align FALIGN; x ## @ MCOUNT
745 #else
746 #define ASENTRY(x) .globl x @ .align FALIGN; x @ MCOUNT
747 #endif /* __STDC__ */
748 #define DATA(x) .globl EXT(x) @ .align ALIGN @ LEXT(x)
749
750
751 #define End(x) ELF_SIZE(x,.-x)
752 #define END(x) End(EXT(x))
753 #define ENDDATA(x) END(x)
754 #define Enddata(x) End(x)
755
756 /* These defines are here for .c files that wish to reference global symbols
757 * within __asm__ statements.
758 */
759 #define CC_SYM_PREFIX "_"
760
761 #endif /* _PPC_ASM_H_ */