Eliminate cvtToSRTLbl (dead code)
[ghc.git] / compiler / cmm / CLabel.hs
1 {-# OPTIONS -w #-}
2 -- The above warning supression flag is a temporary kludge.
3 -- While working on this module you are encouraged to remove it and fix
4 -- any warnings in the module. See
5 -- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
6 -- for details
7
8 -----------------------------------------------------------------------------
9 --
10 -- Object-file symbols (called CLabel for histerical raisins).
11 --
12 -- (c) The University of Glasgow 2004-2006
13 --
14 -----------------------------------------------------------------------------
15
16 module CLabel (
17 CLabel, -- abstract type
18 ForeignLabelSource(..),
19 pprDebugCLabel,
20
21 mkClosureLabel,
22 mkSRTLabel,
23 mkInfoTableLabel,
24 mkEntryLabel,
25 mkSlowEntryLabel,
26 mkConEntryLabel,
27 mkStaticConEntryLabel,
28 mkRednCountsLabel,
29 mkConInfoTableLabel,
30 mkStaticInfoTableLabel,
31 mkLargeSRTLabel,
32 mkApEntryLabel,
33 mkApInfoTableLabel,
34 mkClosureTableLabel,
35
36 mkLocalClosureLabel,
37 mkLocalInfoTableLabel,
38 mkLocalEntryLabel,
39 mkLocalConEntryLabel,
40 mkLocalStaticConEntryLabel,
41 mkLocalConInfoTableLabel,
42 mkLocalStaticInfoTableLabel,
43 mkLocalClosureTableLabel,
44
45 mkReturnPtLabel,
46 mkReturnInfoLabel,
47 mkAltLabel,
48 mkDefaultLabel,
49 mkBitmapLabel,
50 mkStringLitLabel,
51
52 mkAsmTempLabel,
53
54 mkPlainModuleInitLabel,
55
56 mkSplitMarkerLabel,
57 mkDirty_MUT_VAR_Label,
58 mkUpdInfoLabel,
59 mkBHUpdInfoLabel,
60 mkIndStaticInfoLabel,
61 mkMainCapabilityLabel,
62 mkMAP_FROZEN_infoLabel,
63 mkMAP_DIRTY_infoLabel,
64 mkEMPTY_MVAR_infoLabel,
65
66 mkTopTickyCtrLabel,
67 mkCAFBlackHoleInfoTableLabel,
68 mkCAFBlackHoleEntryLabel,
69 mkRtsPrimOpLabel,
70 mkRtsSlowTickyCtrLabel,
71
72 mkSelectorInfoLabel,
73 mkSelectorEntryLabel,
74
75 mkCmmInfoLabel,
76 mkCmmEntryLabel,
77 mkCmmRetInfoLabel,
78 mkCmmRetLabel,
79 mkCmmCodeLabel,
80 mkCmmDataLabel,
81 mkCmmGcPtrLabel,
82
83 mkRtsApFastLabel,
84
85 mkPrimCallLabel,
86
87 mkForeignLabel,
88 addLabelSize,
89 foreignLabelStdcallInfo,
90
91 mkCCLabel, mkCCSLabel,
92
93 DynamicLinkerLabelInfo(..),
94 mkDynamicLinkerLabel,
95 dynamicLinkerLabelInfo,
96
97 mkPicBaseLabel,
98 mkDeadStripPreventer,
99
100 mkHpcTicksLabel,
101
102 hasCAF,
103 entryLblToInfoLbl, cvtToClosureLbl,
104 needsCDecl, isAsmTemp, maybeAsmTemp, externallyVisibleCLabel,
105 isMathFun,
106 isCFunctionLabel, isGcPtrLabel, labelDynamic,
107
108 pprCLabel
109 ) where
110
111 #include "HsVersions.h"
112
113 import IdInfo
114 import StaticFlags
115 import BasicTypes
116 import Literal
117 import Packages
118 import DataCon
119 import PackageConfig
120 import Module
121 import Name
122 import Unique
123 import PrimOp
124 import Config
125 import CostCentre
126 import Outputable
127 import FastString
128 import DynFlags
129 import UniqSet
130
131 -- -----------------------------------------------------------------------------
132 -- The CLabel type
133
134 {-
135 | CLabel is an abstract type that supports the following operations:
136
137 - Pretty printing
138
139 - In a C file, does it need to be declared before use? (i.e. is it
140 guaranteed to be already in scope in the places we need to refer to it?)
141
142 - If it needs to be declared, what type (code or data) should it be
143 declared to have?
144
145 - Is it visible outside this object file or not?
146
147 - Is it "dynamic" (see details below)
148
149 - Eq and Ord, so that we can make sets of CLabels (currently only
150 used in outputting C as far as I can tell, to avoid generating
151 more than one declaration for any given label).
152
153 - Converting an info table label into an entry label.
154 -}
155
156 data CLabel
157 = -- | A label related to the definition of a particular Id or Con in a .hs file.
158 IdLabel
159 Name
160 CafInfo
161 IdLabelInfo -- encodes the suffix of the label
162
163 -- | A label from a .cmm file that is not associated with a .hs level Id.
164 | CmmLabel
165 PackageId -- what package the label belongs to.
166 FastString -- identifier giving the prefix of the label
167 CmmLabelInfo -- encodes the suffix of the label
168
169 -- | A label with a baked-in \/ algorithmically generated name that definitely
170 -- comes from the RTS. The code for it must compile into libHSrts.a \/ libHSrts.so
171 -- If it doesn't have an algorithmically generated name then use a CmmLabel
172 -- instead and give it an appropriate PackageId argument.
173 | RtsLabel
174 RtsLabelInfo
175
176 -- | A 'C' (or otherwise foreign) label.
177 --
178 | ForeignLabel
179 FastString -- name of the imported label.
180
181 (Maybe Int) -- possible '@n' suffix for stdcall functions
182 -- When generating C, the '@n' suffix is omitted, but when
183 -- generating assembler we must add it to the label.
184
185 ForeignLabelSource -- what package the foreign label is in.
186
187 FunctionOrData
188
189 -- | A family of labels related to a particular case expression.
190 | CaseLabel
191 {-# UNPACK #-} !Unique -- Unique says which case expression
192 CaseLabelInfo
193
194 | AsmTempLabel
195 {-# UNPACK #-} !Unique
196
197 | StringLitLabel
198 {-# UNPACK #-} !Unique
199
200 | PlainModuleInitLabel -- without the version & way info
201 Module
202
203 | CC_Label CostCentre
204 | CCS_Label CostCentreStack
205
206
207 -- | These labels are generated and used inside the NCG only.
208 -- They are special variants of a label used for dynamic linking
209 -- see module PositionIndependentCode for details.
210 | DynamicLinkerLabel DynamicLinkerLabelInfo CLabel
211
212 -- | This label is generated and used inside the NCG only.
213 -- It is used as a base for PIC calculations on some platforms.
214 -- It takes the form of a local numeric assembler label '1'; and
215 -- is pretty-printed as 1b, referring to the previous definition
216 -- of 1: in the assembler source file.
217 | PicBaseLabel
218
219 -- | A label before an info table to prevent excessive dead-stripping on darwin
220 | DeadStripPreventer CLabel
221
222
223 -- | Per-module table of tick locations
224 | HpcTicksLabel Module
225
226 -- | Label of an StgLargeSRT
227 | LargeSRTLabel
228 {-# UNPACK #-} !Unique
229
230 -- | A bitmap (function or case return)
231 | LargeBitmapLabel
232 {-# UNPACK #-} !Unique
233
234 deriving (Eq, Ord)
235
236
237 -- | Record where a foreign label is stored.
238 data ForeignLabelSource
239
240 -- | Label is in a named package
241 = ForeignLabelInPackage PackageId
242
243 -- | Label is in some external, system package that doesn't also
244 -- contain compiled Haskell code, and is not associated with any .hi files.
245 -- We don't have to worry about Haskell code being inlined from
246 -- external packages. It is safe to treat the RTS package as "external".
247 | ForeignLabelInExternalPackage
248
249 -- | Label is in the package currenly being compiled.
250 -- This is only used for creating hacky tmp labels during code generation.
251 -- Don't use it in any code that might be inlined across a package boundary
252 -- (ie, core code) else the information will be wrong relative to the
253 -- destination module.
254 | ForeignLabelInThisPackage
255
256 deriving (Eq, Ord)
257
258
259 -- | For debugging problems with the CLabel representation.
260 -- We can't make a Show instance for CLabel because lots of its components don't have instances.
261 -- The regular Outputable instance only shows the label name, and not its other info.
262 --
263 pprDebugCLabel :: CLabel -> SDoc
264 pprDebugCLabel lbl
265 = case lbl of
266 IdLabel{} -> ppr lbl <> (parens $ text "IdLabel")
267 CmmLabel pkg name _info
268 -> ppr lbl <> (parens $ text "CmmLabel" <+> ppr pkg)
269
270 RtsLabel{} -> ppr lbl <> (parens $ text "RtsLabel")
271
272 ForeignLabel name mSuffix src funOrData
273 -> ppr lbl <> (parens
274 $ text "ForeignLabel"
275 <+> ppr mSuffix
276 <+> ppr src
277 <+> ppr funOrData)
278
279 _ -> ppr lbl <> (parens $ text "other CLabel)")
280
281
282 -- True if a local IdLabel that we won't mark as exported
283 type IsLocal = Bool
284
285 data IdLabelInfo
286 = Closure -- ^ Label for closure
287 | SRT -- ^ Static reference table
288 | InfoTable IsLocal -- ^ Info tables for closures; always read-only
289 | Entry IsLocal -- ^ Entry point
290 | Slow -- ^ Slow entry point
291
292 | RednCounts -- ^ Label of place to keep Ticky-ticky info for this Id
293
294 | ConEntry -- ^ Constructor entry point
295 | ConInfoTable -- ^ Corresponding info table
296 | StaticConEntry -- ^ Static constructor entry point
297 | StaticInfoTable -- ^ Corresponding info table
298
299 | ClosureTable -- ^ Table of closures for Enum tycons
300
301 deriving (Eq, Ord)
302
303
304 data CaseLabelInfo
305 = CaseReturnPt
306 | CaseReturnInfo
307 | CaseAlt ConTag
308 | CaseDefault
309 deriving (Eq, Ord)
310
311
312 data RtsLabelInfo
313 = RtsSelectorInfoTable Bool{-updatable-} Int{-offset-} -- ^ Selector thunks
314 | RtsSelectorEntry Bool{-updatable-} Int{-offset-}
315
316 | RtsApInfoTable Bool{-updatable-} Int{-arity-} -- ^ AP thunks
317 | RtsApEntry Bool{-updatable-} Int{-arity-}
318
319 | RtsPrimOp PrimOp
320 | RtsApFast FastString -- ^ _fast versions of generic apply
321 | RtsSlowTickyCtr String
322
323 deriving (Eq, Ord)
324 -- NOTE: Eq on LitString compares the pointer only, so this isn't
325 -- a real equality.
326
327
328 -- | What type of Cmm label we're dealing with.
329 -- Determines the suffix appended to the name when a CLabel.CmmLabel
330 -- is pretty printed.
331 data CmmLabelInfo
332 = CmmInfo -- ^ misc rts info tabless, suffix _info
333 | CmmEntry -- ^ misc rts entry points, suffix _entry
334 | CmmRetInfo -- ^ misc rts ret info tables, suffix _info
335 | CmmRet -- ^ misc rts return points, suffix _ret
336 | CmmData -- ^ misc rts data bits, eg CHARLIKE_closure
337 | CmmCode -- ^ misc rts code
338 | CmmGcPtr -- ^ GcPtrs eg CHARLIKE_closure
339 | CmmPrimCall -- ^ a prim call to some hand written Cmm code
340 deriving (Eq, Ord)
341
342 data DynamicLinkerLabelInfo
343 = CodeStub -- MachO: Lfoo$stub, ELF: foo@plt
344 | SymbolPtr -- MachO: Lfoo$non_lazy_ptr, Windows: __imp_foo
345 | GotSymbolPtr -- ELF: foo@got
346 | GotSymbolOffset -- ELF: foo@gotoff
347
348 deriving (Eq, Ord)
349
350
351 -- -----------------------------------------------------------------------------
352 -- Constructing CLabels
353 -- -----------------------------------------------------------------------------
354
355 -- Constructing IdLabels
356 -- These are always local:
357 mkSRTLabel name c = IdLabel name c SRT
358 mkSlowEntryLabel name c = IdLabel name c Slow
359 mkRednCountsLabel name c = IdLabel name c RednCounts
360
361 -- These have local & (possibly) external variants:
362 mkLocalClosureLabel name c = IdLabel name c Closure
363 mkLocalInfoTableLabel name c = IdLabel name c (InfoTable True)
364 mkLocalEntryLabel name c = IdLabel name c (Entry True)
365 mkLocalClosureTableLabel name c = IdLabel name c ClosureTable
366
367 mkClosureLabel name c = IdLabel name c Closure
368 mkInfoTableLabel name c = IdLabel name c (InfoTable False)
369 mkEntryLabel name c = IdLabel name c (Entry False)
370 mkClosureTableLabel name c = IdLabel name c ClosureTable
371 mkLocalConInfoTableLabel c con = IdLabel con c ConInfoTable
372 mkLocalConEntryLabel c con = IdLabel con c ConEntry
373 mkLocalStaticInfoTableLabel c con = IdLabel con c StaticInfoTable
374 mkLocalStaticConEntryLabel c con = IdLabel con c StaticConEntry
375 mkConInfoTableLabel name c = IdLabel name c ConInfoTable
376 mkStaticInfoTableLabel name c = IdLabel name c StaticInfoTable
377
378 mkConEntryLabel name c = IdLabel name c ConEntry
379 mkStaticConEntryLabel name c = IdLabel name c StaticConEntry
380
381 -- Constructing Cmm Labels
382 mkSplitMarkerLabel = CmmLabel rtsPackageId (fsLit "__stg_split_marker") CmmCode
383 mkDirty_MUT_VAR_Label = CmmLabel rtsPackageId (fsLit "dirty_MUT_VAR") CmmCode
384 mkUpdInfoLabel = CmmLabel rtsPackageId (fsLit "stg_upd_frame") CmmInfo
385 mkBHUpdInfoLabel = CmmLabel rtsPackageId (fsLit "stg_bh_upd_frame" ) CmmInfo
386 mkIndStaticInfoLabel = CmmLabel rtsPackageId (fsLit "stg_IND_STATIC") CmmInfo
387 mkMainCapabilityLabel = CmmLabel rtsPackageId (fsLit "MainCapability") CmmData
388 mkMAP_FROZEN_infoLabel = CmmLabel rtsPackageId (fsLit "stg_MUT_ARR_PTRS_FROZEN0") CmmInfo
389 mkMAP_DIRTY_infoLabel = CmmLabel rtsPackageId (fsLit "stg_MUT_ARR_PTRS_DIRTY") CmmInfo
390 mkEMPTY_MVAR_infoLabel = CmmLabel rtsPackageId (fsLit "stg_EMPTY_MVAR") CmmInfo
391 mkTopTickyCtrLabel = CmmLabel rtsPackageId (fsLit "top_ct") CmmData
392 mkCAFBlackHoleInfoTableLabel = CmmLabel rtsPackageId (fsLit "stg_CAF_BLACKHOLE") CmmInfo
393 mkCAFBlackHoleEntryLabel = CmmLabel rtsPackageId (fsLit "stg_CAF_BLACKHOLE") CmmEntry
394
395 -----
396 mkCmmInfoLabel, mkCmmEntryLabel, mkCmmRetInfoLabel, mkCmmRetLabel,
397 mkCmmCodeLabel, mkCmmDataLabel, mkCmmGcPtrLabel
398 :: PackageId -> FastString -> CLabel
399
400 mkCmmInfoLabel pkg str = CmmLabel pkg str CmmInfo
401 mkCmmEntryLabel pkg str = CmmLabel pkg str CmmEntry
402 mkCmmRetInfoLabel pkg str = CmmLabel pkg str CmmRetInfo
403 mkCmmRetLabel pkg str = CmmLabel pkg str CmmRet
404 mkCmmCodeLabel pkg str = CmmLabel pkg str CmmCode
405 mkCmmDataLabel pkg str = CmmLabel pkg str CmmData
406 mkCmmGcPtrLabel pkg str = CmmLabel pkg str CmmGcPtr
407
408
409 -- Constructing RtsLabels
410 mkRtsPrimOpLabel primop = RtsLabel (RtsPrimOp primop)
411
412 mkSelectorInfoLabel upd off = RtsLabel (RtsSelectorInfoTable upd off)
413 mkSelectorEntryLabel upd off = RtsLabel (RtsSelectorEntry upd off)
414
415 mkApInfoTableLabel upd off = RtsLabel (RtsApInfoTable upd off)
416 mkApEntryLabel upd off = RtsLabel (RtsApEntry upd off)
417
418
419 -- A call to some primitive hand written Cmm code
420 mkPrimCallLabel :: PrimCall -> CLabel
421 mkPrimCallLabel (PrimCall str pkg)
422 = CmmLabel pkg str CmmPrimCall
423
424
425 -- Constructing ForeignLabels
426
427 -- | Make a foreign label
428 mkForeignLabel
429 :: FastString -- name
430 -> Maybe Int -- size prefix
431 -> ForeignLabelSource -- what package it's in
432 -> FunctionOrData
433 -> CLabel
434
435 mkForeignLabel str mb_sz src fod
436 = ForeignLabel str mb_sz src fod
437
438
439 -- | Update the label size field in a ForeignLabel
440 addLabelSize :: CLabel -> Int -> CLabel
441 addLabelSize (ForeignLabel str _ src fod) sz
442 = ForeignLabel str (Just sz) src fod
443 addLabelSize label _
444 = label
445
446 -- | Get the label size field from a ForeignLabel
447 foreignLabelStdcallInfo :: CLabel -> Maybe Int
448 foreignLabelStdcallInfo (ForeignLabel _ info _ _) = info
449 foreignLabelStdcallInfo _lbl = Nothing
450
451
452 -- Constructing Large*Labels
453 mkLargeSRTLabel uniq = LargeSRTLabel uniq
454 mkBitmapLabel uniq = LargeBitmapLabel uniq
455
456
457 -- Constructin CaseLabels
458 mkReturnPtLabel uniq = CaseLabel uniq CaseReturnPt
459 mkReturnInfoLabel uniq = CaseLabel uniq CaseReturnInfo
460 mkAltLabel uniq tag = CaseLabel uniq (CaseAlt tag)
461 mkDefaultLabel uniq = CaseLabel uniq CaseDefault
462
463 -- Constructing Cost Center Labels
464 mkCCLabel cc = CC_Label cc
465 mkCCSLabel ccs = CCS_Label ccs
466
467 mkRtsApFastLabel str = RtsLabel (RtsApFast str)
468
469 mkRtsSlowTickyCtrLabel :: String -> CLabel
470 mkRtsSlowTickyCtrLabel pat = RtsLabel (RtsSlowTickyCtr pat)
471
472
473 -- Constructing Code Coverage Labels
474 mkHpcTicksLabel = HpcTicksLabel
475
476
477 -- Constructing labels used for dynamic linking
478 mkDynamicLinkerLabel :: DynamicLinkerLabelInfo -> CLabel -> CLabel
479 mkDynamicLinkerLabel = DynamicLinkerLabel
480
481 dynamicLinkerLabelInfo :: CLabel -> Maybe (DynamicLinkerLabelInfo, CLabel)
482 dynamicLinkerLabelInfo (DynamicLinkerLabel info lbl) = Just (info, lbl)
483 dynamicLinkerLabelInfo _ = Nothing
484
485 mkPicBaseLabel :: CLabel
486 mkPicBaseLabel = PicBaseLabel
487
488
489 -- Constructing miscellaneous other labels
490 mkDeadStripPreventer :: CLabel -> CLabel
491 mkDeadStripPreventer lbl = DeadStripPreventer lbl
492
493 mkStringLitLabel :: Unique -> CLabel
494 mkStringLitLabel = StringLitLabel
495
496 mkAsmTempLabel :: Uniquable a => a -> CLabel
497 mkAsmTempLabel a = AsmTempLabel (getUnique a)
498
499 mkPlainModuleInitLabel :: Module -> CLabel
500 mkPlainModuleInitLabel mod = PlainModuleInitLabel mod
501
502 -- -----------------------------------------------------------------------------
503 -- Converting between info labels and entry/ret labels.
504
505 entryLblToInfoLbl :: CLabel -> CLabel
506 entryLblToInfoLbl (IdLabel n c (Entry lcl)) = IdLabel n c (InfoTable lcl)
507 entryLblToInfoLbl (IdLabel n c ConEntry) = IdLabel n c ConInfoTable
508 entryLblToInfoLbl (IdLabel n c StaticConEntry) = IdLabel n c StaticInfoTable
509 entryLblToInfoLbl (CaseLabel n CaseReturnPt) = CaseLabel n CaseReturnInfo
510 entryLblToInfoLbl (CmmLabel m str CmmEntry) = CmmLabel m str CmmInfo
511 entryLblToInfoLbl (CmmLabel m str CmmRet) = CmmLabel m str CmmRetInfo
512 entryLblToInfoLbl l
513 = pprPanic "CLabel.entryLblToInfoLbl" (pprCLabel l)
514
515
516 cvtToClosureLbl (IdLabel n c (InfoTable _)) = IdLabel n c Closure
517 cvtToClosureLbl (IdLabel n c (Entry _)) = IdLabel n c Closure
518 cvtToClosureLbl (IdLabel n c ConEntry) = IdLabel n c Closure
519 cvtToClosureLbl (IdLabel n c RednCounts) = IdLabel n c Closure
520 cvtToClosureLbl l@(IdLabel n c Closure) = l
521 cvtToClosureLbl l
522 = pprPanic "cvtToClosureLbl" (pprCLabel l)
523
524
525 -- -----------------------------------------------------------------------------
526 -- Does a CLabel refer to a CAF?
527 hasCAF :: CLabel -> Bool
528 hasCAF (IdLabel _ MayHaveCafRefs _) = True
529 hasCAF _ = False
530
531
532 -- -----------------------------------------------------------------------------
533 -- Does a CLabel need declaring before use or not?
534 --
535 -- See wiki:Commentary/Compiler/Backends/PprC#Prototypes
536
537 needsCDecl :: CLabel -> Bool
538 -- False <=> it's pre-declared; don't bother
539 -- don't bother declaring SRT & Bitmap labels, we always make sure
540 -- they are defined before use.
541 needsCDecl (IdLabel _ _ SRT) = False
542 needsCDecl (LargeSRTLabel _) = False
543 needsCDecl (LargeBitmapLabel _) = False
544 needsCDecl (IdLabel _ _ _) = True
545 needsCDecl (CaseLabel _ _) = True
546 needsCDecl (PlainModuleInitLabel _) = True
547
548 needsCDecl (StringLitLabel _) = False
549 needsCDecl (AsmTempLabel _) = False
550 needsCDecl (RtsLabel _) = False
551
552 needsCDecl (CmmLabel pkgId _ _)
553 -- Prototypes for labels defined in the runtime system are imported
554 -- into HC files via includes/Stg.h.
555 | pkgId == rtsPackageId = False
556
557 -- For other labels we inline one into the HC file directly.
558 | otherwise = True
559
560 needsCDecl l@(ForeignLabel{}) = not (isMathFun l)
561 needsCDecl (CC_Label _) = True
562 needsCDecl (CCS_Label _) = True
563 needsCDecl (HpcTicksLabel _) = True
564
565
566 -- | Check whether a label is a local temporary for native code generation
567 isAsmTemp :: CLabel -> Bool
568 isAsmTemp (AsmTempLabel _) = True
569 isAsmTemp _ = False
570
571
572 -- | If a label is a local temporary used for native code generation
573 -- then return just its unique, otherwise nothing.
574 maybeAsmTemp :: CLabel -> Maybe Unique
575 maybeAsmTemp (AsmTempLabel uq) = Just uq
576 maybeAsmTemp _ = Nothing
577
578
579 -- | Check whether a label corresponds to a C function that has
580 -- a prototype in a system header somehere, or is built-in
581 -- to the C compiler. For these labels we avoid generating our
582 -- own C prototypes.
583 isMathFun :: CLabel -> Bool
584 isMathFun (ForeignLabel fs _ _ _) = fs `elementOfUniqSet` math_funs
585 isMathFun _ = False
586
587 math_funs = mkUniqSet [
588 -- _ISOC99_SOURCE
589 (fsLit "acos"), (fsLit "acosf"), (fsLit "acosh"),
590 (fsLit "acoshf"), (fsLit "acoshl"), (fsLit "acosl"),
591 (fsLit "asin"), (fsLit "asinf"), (fsLit "asinl"),
592 (fsLit "asinh"), (fsLit "asinhf"), (fsLit "asinhl"),
593 (fsLit "atan"), (fsLit "atanf"), (fsLit "atanl"),
594 (fsLit "atan2"), (fsLit "atan2f"), (fsLit "atan2l"),
595 (fsLit "atanh"), (fsLit "atanhf"), (fsLit "atanhl"),
596 (fsLit "cbrt"), (fsLit "cbrtf"), (fsLit "cbrtl"),
597 (fsLit "ceil"), (fsLit "ceilf"), (fsLit "ceill"),
598 (fsLit "copysign"), (fsLit "copysignf"), (fsLit "copysignl"),
599 (fsLit "cos"), (fsLit "cosf"), (fsLit "cosl"),
600 (fsLit "cosh"), (fsLit "coshf"), (fsLit "coshl"),
601 (fsLit "erf"), (fsLit "erff"), (fsLit "erfl"),
602 (fsLit "erfc"), (fsLit "erfcf"), (fsLit "erfcl"),
603 (fsLit "exp"), (fsLit "expf"), (fsLit "expl"),
604 (fsLit "exp2"), (fsLit "exp2f"), (fsLit "exp2l"),
605 (fsLit "expm1"), (fsLit "expm1f"), (fsLit "expm1l"),
606 (fsLit "fabs"), (fsLit "fabsf"), (fsLit "fabsl"),
607 (fsLit "fdim"), (fsLit "fdimf"), (fsLit "fdiml"),
608 (fsLit "floor"), (fsLit "floorf"), (fsLit "floorl"),
609 (fsLit "fma"), (fsLit "fmaf"), (fsLit "fmal"),
610 (fsLit "fmax"), (fsLit "fmaxf"), (fsLit "fmaxl"),
611 (fsLit "fmin"), (fsLit "fminf"), (fsLit "fminl"),
612 (fsLit "fmod"), (fsLit "fmodf"), (fsLit "fmodl"),
613 (fsLit "frexp"), (fsLit "frexpf"), (fsLit "frexpl"),
614 (fsLit "hypot"), (fsLit "hypotf"), (fsLit "hypotl"),
615 (fsLit "ilogb"), (fsLit "ilogbf"), (fsLit "ilogbl"),
616 (fsLit "ldexp"), (fsLit "ldexpf"), (fsLit "ldexpl"),
617 (fsLit "lgamma"), (fsLit "lgammaf"), (fsLit "lgammal"),
618 (fsLit "llrint"), (fsLit "llrintf"), (fsLit "llrintl"),
619 (fsLit "llround"), (fsLit "llroundf"), (fsLit "llroundl"),
620 (fsLit "log"), (fsLit "logf"), (fsLit "logl"),
621 (fsLit "log10l"), (fsLit "log10"), (fsLit "log10f"),
622 (fsLit "log1pl"), (fsLit "log1p"), (fsLit "log1pf"),
623 (fsLit "log2"), (fsLit "log2f"), (fsLit "log2l"),
624 (fsLit "logb"), (fsLit "logbf"), (fsLit "logbl"),
625 (fsLit "lrint"), (fsLit "lrintf"), (fsLit "lrintl"),
626 (fsLit "lround"), (fsLit "lroundf"), (fsLit "lroundl"),
627 (fsLit "modf"), (fsLit "modff"), (fsLit "modfl"),
628 (fsLit "nan"), (fsLit "nanf"), (fsLit "nanl"),
629 (fsLit "nearbyint"), (fsLit "nearbyintf"), (fsLit "nearbyintl"),
630 (fsLit "nextafter"), (fsLit "nextafterf"), (fsLit "nextafterl"),
631 (fsLit "nexttoward"), (fsLit "nexttowardf"), (fsLit "nexttowardl"),
632 (fsLit "pow"), (fsLit "powf"), (fsLit "powl"),
633 (fsLit "remainder"), (fsLit "remainderf"), (fsLit "remainderl"),
634 (fsLit "remquo"), (fsLit "remquof"), (fsLit "remquol"),
635 (fsLit "rint"), (fsLit "rintf"), (fsLit "rintl"),
636 (fsLit "round"), (fsLit "roundf"), (fsLit "roundl"),
637 (fsLit "scalbln"), (fsLit "scalblnf"), (fsLit "scalblnl"),
638 (fsLit "scalbn"), (fsLit "scalbnf"), (fsLit "scalbnl"),
639 (fsLit "sin"), (fsLit "sinf"), (fsLit "sinl"),
640 (fsLit "sinh"), (fsLit "sinhf"), (fsLit "sinhl"),
641 (fsLit "sqrt"), (fsLit "sqrtf"), (fsLit "sqrtl"),
642 (fsLit "tan"), (fsLit "tanf"), (fsLit "tanl"),
643 (fsLit "tanh"), (fsLit "tanhf"), (fsLit "tanhl"),
644 (fsLit "tgamma"), (fsLit "tgammaf"), (fsLit "tgammal"),
645 (fsLit "trunc"), (fsLit "truncf"), (fsLit "truncl"),
646 -- ISO C 99 also defines these function-like macros in math.h:
647 -- fpclassify, isfinite, isinf, isnormal, signbit, isgreater,
648 -- isgreaterequal, isless, islessequal, islessgreater, isunordered
649
650 -- additional symbols from _BSD_SOURCE
651 (fsLit "drem"), (fsLit "dremf"), (fsLit "dreml"),
652 (fsLit "finite"), (fsLit "finitef"), (fsLit "finitel"),
653 (fsLit "gamma"), (fsLit "gammaf"), (fsLit "gammal"),
654 (fsLit "isinf"), (fsLit "isinff"), (fsLit "isinfl"),
655 (fsLit "isnan"), (fsLit "isnanf"), (fsLit "isnanl"),
656 (fsLit "j0"), (fsLit "j0f"), (fsLit "j0l"),
657 (fsLit "j1"), (fsLit "j1f"), (fsLit "j1l"),
658 (fsLit "jn"), (fsLit "jnf"), (fsLit "jnl"),
659 (fsLit "lgamma_r"), (fsLit "lgammaf_r"), (fsLit "lgammal_r"),
660 (fsLit "scalb"), (fsLit "scalbf"), (fsLit "scalbl"),
661 (fsLit "significand"), (fsLit "significandf"), (fsLit "significandl"),
662 (fsLit "y0"), (fsLit "y0f"), (fsLit "y0l"),
663 (fsLit "y1"), (fsLit "y1f"), (fsLit "y1l"),
664 (fsLit "yn"), (fsLit "ynf"), (fsLit "ynl")
665 ]
666
667 -- -----------------------------------------------------------------------------
668 -- | Is a CLabel visible outside this object file or not?
669 -- From the point of view of the code generator, a name is
670 -- externally visible if it has to be declared as exported
671 -- in the .o file's symbol table; that is, made non-static.
672 externallyVisibleCLabel :: CLabel -> Bool -- not C "static"
673 externallyVisibleCLabel (CaseLabel _ _) = False
674 externallyVisibleCLabel (StringLitLabel _) = False
675 externallyVisibleCLabel (AsmTempLabel _) = False
676 externallyVisibleCLabel (PlainModuleInitLabel _)= True
677 externallyVisibleCLabel (RtsLabel _) = True
678 externallyVisibleCLabel (CmmLabel _ _ _) = True
679 externallyVisibleCLabel (ForeignLabel{}) = True
680 externallyVisibleCLabel (IdLabel name _ info) = isExternalName name && externallyVisibleIdLabel info
681 externallyVisibleCLabel (CC_Label _) = True
682 externallyVisibleCLabel (CCS_Label _) = True
683 externallyVisibleCLabel (DynamicLinkerLabel _ _) = False
684 externallyVisibleCLabel (HpcTicksLabel _) = True
685 externallyVisibleCLabel (LargeBitmapLabel _) = False
686 externallyVisibleCLabel (LargeSRTLabel _) = False
687
688 externallyVisibleIdLabel :: IdLabelInfo -> Bool
689 externallyVisibleIdLabel SRT = False
690 externallyVisibleIdLabel (Entry lcl) = not lcl
691 externallyVisibleIdLabel (InfoTable lcl) = not lcl
692 externallyVisibleIdLabel _ = True
693
694 -- -----------------------------------------------------------------------------
695 -- Finding the "type" of a CLabel
696
697 -- For generating correct types in label declarations:
698
699 data CLabelType
700 = CodeLabel -- Address of some executable instructions
701 | DataLabel -- Address of data, not a GC ptr
702 | GcPtrLabel -- Address of a (presumably static) GC object
703
704 isCFunctionLabel :: CLabel -> Bool
705 isCFunctionLabel lbl = case labelType lbl of
706 CodeLabel -> True
707 _other -> False
708
709 isGcPtrLabel :: CLabel -> Bool
710 isGcPtrLabel lbl = case labelType lbl of
711 GcPtrLabel -> True
712 _other -> False
713
714
715 -- | Work out the general type of data at the address of this label
716 -- whether it be code, data, or static GC object.
717 labelType :: CLabel -> CLabelType
718 labelType (CmmLabel _ _ CmmData) = DataLabel
719 labelType (CmmLabel _ _ CmmGcPtr) = GcPtrLabel
720 labelType (CmmLabel _ _ CmmCode) = CodeLabel
721 labelType (CmmLabel _ _ CmmInfo) = DataLabel
722 labelType (CmmLabel _ _ CmmEntry) = CodeLabel
723 labelType (CmmLabel _ _ CmmRetInfo) = DataLabel
724 labelType (CmmLabel _ _ CmmRet) = CodeLabel
725 labelType (RtsLabel (RtsSelectorInfoTable _ _)) = DataLabel
726 labelType (RtsLabel (RtsApInfoTable _ _)) = DataLabel
727 labelType (RtsLabel (RtsApFast _)) = CodeLabel
728 labelType (CaseLabel _ CaseReturnInfo) = DataLabel
729 labelType (CaseLabel _ _) = CodeLabel
730 labelType (PlainModuleInitLabel _) = CodeLabel
731 labelType (LargeSRTLabel _) = DataLabel
732 labelType (LargeBitmapLabel _) = DataLabel
733 labelType (ForeignLabel _ _ _ IsFunction) = CodeLabel
734 labelType (IdLabel _ _ info) = idInfoLabelType info
735 labelType _ = DataLabel
736
737 idInfoLabelType info =
738 case info of
739 InfoTable _ -> DataLabel
740 Closure -> GcPtrLabel
741 ConInfoTable -> DataLabel
742 StaticInfoTable -> DataLabel
743 ClosureTable -> DataLabel
744 RednCounts -> DataLabel
745 _ -> CodeLabel
746
747
748 -- -----------------------------------------------------------------------------
749 -- Does a CLabel need dynamic linkage?
750
751 -- When referring to data in code, we need to know whether
752 -- that data resides in a DLL or not. [Win32 only.]
753 -- @labelDynamic@ returns @True@ if the label is located
754 -- in a DLL, be it a data reference or not.
755
756 labelDynamic :: PackageId -> CLabel -> Bool
757 labelDynamic this_pkg lbl =
758 case lbl of
759 -- is the RTS in a DLL or not?
760 RtsLabel _ -> not opt_Static && (this_pkg /= rtsPackageId)
761
762 IdLabel n _ k -> isDllName this_pkg n
763
764 #if mingw32_TARGET_OS
765 -- When compiling in the "dyn" way, eack package is to be linked into its own shared library.
766 CmmLabel pkg _ _
767 -> not opt_Static && (this_pkg /= pkg)
768
769 -- Foreign label is in some un-named foreign package (or DLL)
770 ForeignLabel _ _ ForeignLabelInExternalPackage _ -> True
771
772 -- Foreign label is linked into the same package as the source file currently being compiled.
773 ForeignLabel _ _ ForeignLabelInThisPackage _ -> False
774
775 -- Foreign label is in some named package.
776 -- When compiling in the "dyn" way, each package is to be linked into its own DLL.
777 ForeignLabel _ _ (ForeignLabelInPackage pkgId) _
778 -> (not opt_Static) && (this_pkg /= pkgId)
779
780 #else
781 -- On Mac OS X and on ELF platforms, false positives are OK,
782 -- so we claim that all foreign imports come from dynamic libraries
783 ForeignLabel _ _ _ _ -> True
784
785 CmmLabel pkg _ _ -> True
786
787 #endif
788 PlainModuleInitLabel m -> not opt_Static && this_pkg /= (modulePackageId m)
789
790 -- Note that DynamicLinkerLabels do NOT require dynamic linking themselves.
791 _ -> False
792
793 {-
794 OLD?: These GRAN functions are needed for spitting out GRAN_FETCH() at the
795 right places. It is used to detect when the abstractC statement of an
796 CCodeBlock actually contains the code for a slow entry point. -- HWL
797
798 We need at least @Eq@ for @CLabels@, because we want to avoid
799 duplicate declarations in generating C (see @labelSeenTE@ in
800 @PprAbsC@).
801 -}
802
803 -----------------------------------------------------------------------------
804 -- Printing out CLabels.
805
806 {-
807 Convention:
808
809 <name>_<type>
810
811 where <name> is <Module>_<name> for external names and <unique> for
812 internal names. <type> is one of the following:
813
814 info Info table
815 srt Static reference table
816 srtd Static reference table descriptor
817 entry Entry code (function, closure)
818 slow Slow entry code (if any)
819 ret Direct return address
820 vtbl Vector table
821 <n>_alt Case alternative (tag n)
822 dflt Default case alternative
823 btm Large bitmap vector
824 closure Static closure
825 con_entry Dynamic Constructor entry code
826 con_info Dynamic Constructor info table
827 static_entry Static Constructor entry code
828 static_info Static Constructor info table
829 sel_info Selector info table
830 sel_entry Selector entry code
831 cc Cost centre
832 ccs Cost centre stack
833
834 Many of these distinctions are only for documentation reasons. For
835 example, _ret is only distinguished from _entry to make it easy to
836 tell whether a code fragment is a return point or a closure/function
837 entry.
838 -}
839
840 instance Outputable CLabel where
841 ppr = pprCLabel
842 instance PlatformOutputable CLabel where
843 pprPlatform _ = pprCLabel
844
845 pprCLabel :: CLabel -> SDoc
846
847 pprCLabel (AsmTempLabel u)
848 | cGhcWithNativeCodeGen == "YES"
849 = getPprStyle $ \ sty ->
850 if asmStyle sty then
851 ptext asmTempLabelPrefix <> pprUnique u
852 else
853 char '_' <> pprUnique u
854
855 pprCLabel (DynamicLinkerLabel info lbl)
856 | cGhcWithNativeCodeGen == "YES"
857 = pprDynamicLinkerAsmLabel info lbl
858
859 pprCLabel PicBaseLabel
860 | cGhcWithNativeCodeGen == "YES"
861 = ptext (sLit "1b")
862
863 pprCLabel (DeadStripPreventer lbl)
864 | cGhcWithNativeCodeGen == "YES"
865 = pprCLabel lbl <> ptext (sLit "_dsp")
866
867 pprCLabel lbl
868 = getPprStyle $ \ sty ->
869 if cGhcWithNativeCodeGen == "YES" && asmStyle sty
870 then maybe_underscore (pprAsmCLbl lbl)
871 else pprCLbl lbl
872
873 maybe_underscore doc
874 | underscorePrefix = pp_cSEP <> doc
875 | otherwise = doc
876
877 #ifdef mingw32_TARGET_OS
878 -- In asm mode, we need to put the suffix on a stdcall ForeignLabel.
879 -- (The C compiler does this itself).
880 pprAsmCLbl (ForeignLabel fs (Just sz) _ _)
881 = ftext fs <> char '@' <> int sz
882 #endif
883 pprAsmCLbl lbl
884 = pprCLbl lbl
885
886 pprCLbl (StringLitLabel u)
887 = pprUnique u <> ptext (sLit "_str")
888
889 pprCLbl (CaseLabel u CaseReturnPt)
890 = hcat [pprUnique u, ptext (sLit "_ret")]
891 pprCLbl (CaseLabel u CaseReturnInfo)
892 = hcat [pprUnique u, ptext (sLit "_info")]
893 pprCLbl (CaseLabel u (CaseAlt tag))
894 = hcat [pprUnique u, pp_cSEP, int tag, ptext (sLit "_alt")]
895 pprCLbl (CaseLabel u CaseDefault)
896 = hcat [pprUnique u, ptext (sLit "_dflt")]
897
898 pprCLbl (LargeSRTLabel u) = pprUnique u <> pp_cSEP <> ptext (sLit "srtd")
899 pprCLbl (LargeBitmapLabel u) = text "b" <> pprUnique u <> pp_cSEP <> ptext (sLit "btm")
900 -- Some bitsmaps for tuple constructors have a numeric tag (e.g. '7')
901 -- until that gets resolved we'll just force them to start
902 -- with a letter so the label will be legal assmbly code.
903
904
905 pprCLbl (CmmLabel _ str CmmCode) = ftext str
906 pprCLbl (CmmLabel _ str CmmData) = ftext str
907 pprCLbl (CmmLabel _ str CmmGcPtr) = ftext str
908 pprCLbl (CmmLabel _ str CmmPrimCall) = ftext str
909
910 pprCLbl (RtsLabel (RtsApFast str)) = ftext str <> ptext (sLit "_fast")
911
912 pprCLbl (RtsLabel (RtsSelectorInfoTable upd_reqd offset))
913 = hcat [ptext (sLit "stg_sel_"), text (show offset),
914 ptext (if upd_reqd
915 then (sLit "_upd_info")
916 else (sLit "_noupd_info"))
917 ]
918
919 pprCLbl (RtsLabel (RtsSelectorEntry upd_reqd offset))
920 = hcat [ptext (sLit "stg_sel_"), text (show offset),
921 ptext (if upd_reqd
922 then (sLit "_upd_entry")
923 else (sLit "_noupd_entry"))
924 ]
925
926 pprCLbl (RtsLabel (RtsApInfoTable upd_reqd arity))
927 = hcat [ptext (sLit "stg_ap_"), text (show arity),
928 ptext (if upd_reqd
929 then (sLit "_upd_info")
930 else (sLit "_noupd_info"))
931 ]
932
933 pprCLbl (RtsLabel (RtsApEntry upd_reqd arity))
934 = hcat [ptext (sLit "stg_ap_"), text (show arity),
935 ptext (if upd_reqd
936 then (sLit "_upd_entry")
937 else (sLit "_noupd_entry"))
938 ]
939
940 pprCLbl (CmmLabel _ fs CmmInfo)
941 = ftext fs <> ptext (sLit "_info")
942
943 pprCLbl (CmmLabel _ fs CmmEntry)
944 = ftext fs <> ptext (sLit "_entry")
945
946 pprCLbl (CmmLabel _ fs CmmRetInfo)
947 = ftext fs <> ptext (sLit "_info")
948
949 pprCLbl (CmmLabel _ fs CmmRet)
950 = ftext fs <> ptext (sLit "_ret")
951
952 pprCLbl (RtsLabel (RtsPrimOp primop))
953 = ptext (sLit "stg_") <> ppr primop
954
955 pprCLbl (RtsLabel (RtsSlowTickyCtr pat))
956 = ptext (sLit "SLOW_CALL_") <> text pat <> ptext (sLit "_ctr")
957
958 pprCLbl (ForeignLabel str _ _ _)
959 = ftext str
960
961 pprCLbl (IdLabel name cafs flavor) = ppr name <> ppIdFlavor flavor
962
963 pprCLbl (CC_Label cc) = ppr cc
964 pprCLbl (CCS_Label ccs) = ppr ccs
965
966 pprCLbl (PlainModuleInitLabel mod)
967 = ptext (sLit "__stginit_") <> ppr mod
968
969 pprCLbl (HpcTicksLabel mod)
970 = ptext (sLit "_hpc_tickboxes_") <> ppr mod <> ptext (sLit "_hpc")
971
972 ppIdFlavor :: IdLabelInfo -> SDoc
973 ppIdFlavor x = pp_cSEP <>
974 (case x of
975 Closure -> ptext (sLit "closure")
976 SRT -> ptext (sLit "srt")
977 InfoTable _ -> ptext (sLit "info")
978 Entry _ -> ptext (sLit "entry")
979 Slow -> ptext (sLit "slow")
980 RednCounts -> ptext (sLit "ct")
981 ConEntry -> ptext (sLit "con_entry")
982 ConInfoTable -> ptext (sLit "con_info")
983 StaticConEntry -> ptext (sLit "static_entry")
984 StaticInfoTable -> ptext (sLit "static_info")
985 ClosureTable -> ptext (sLit "closure_tbl")
986 )
987
988
989 pp_cSEP = char '_'
990
991
992 instance Outputable ForeignLabelSource where
993 ppr fs
994 = case fs of
995 ForeignLabelInPackage pkgId -> parens $ text "package: " <> ppr pkgId
996 ForeignLabelInThisPackage -> parens $ text "this package"
997 ForeignLabelInExternalPackage -> parens $ text "external package"
998
999 -- -----------------------------------------------------------------------------
1000 -- Machine-dependent knowledge about labels.
1001
1002 underscorePrefix :: Bool -- leading underscore on assembler labels?
1003 underscorePrefix = (cLeadingUnderscore == "YES")
1004
1005 asmTempLabelPrefix :: LitString -- for formatting labels
1006 asmTempLabelPrefix =
1007 #if alpha_TARGET_OS
1008 {- The alpha assembler likes temporary labels to look like $L123
1009 instead of L123. (Don't toss the L, because then Lf28
1010 turns into $f28.)
1011 -}
1012 (sLit "$")
1013 #elif darwin_TARGET_OS
1014 (sLit "L")
1015 #else
1016 (sLit ".L")
1017 #endif
1018
1019 pprDynamicLinkerAsmLabel :: DynamicLinkerLabelInfo -> CLabel -> SDoc
1020
1021 #if x86_64_TARGET_ARCH && darwin_TARGET_OS
1022 pprDynamicLinkerAsmLabel CodeStub lbl
1023 = char 'L' <> pprCLabel lbl <> text "$stub"
1024 pprDynamicLinkerAsmLabel SymbolPtr lbl
1025 = char 'L' <> pprCLabel lbl <> text "$non_lazy_ptr"
1026 pprDynamicLinkerAsmLabel GotSymbolPtr lbl
1027 = pprCLabel lbl <> text "@GOTPCREL"
1028 pprDynamicLinkerAsmLabel GotSymbolOffset lbl
1029 = pprCLabel lbl
1030 pprDynamicLinkerAsmLabel _ _
1031 = panic "pprDynamicLinkerAsmLabel"
1032
1033 #elif darwin_TARGET_OS
1034 pprDynamicLinkerAsmLabel CodeStub lbl
1035 = char 'L' <> pprCLabel lbl <> text "$stub"
1036 pprDynamicLinkerAsmLabel SymbolPtr lbl
1037 = char 'L' <> pprCLabel lbl <> text "$non_lazy_ptr"
1038 pprDynamicLinkerAsmLabel _ _
1039 = panic "pprDynamicLinkerAsmLabel"
1040
1041 #elif powerpc_TARGET_ARCH && elf_OBJ_FORMAT
1042 pprDynamicLinkerAsmLabel CodeStub lbl
1043 = pprCLabel lbl <> text "@plt"
1044 pprDynamicLinkerAsmLabel SymbolPtr lbl
1045 = text ".LC_" <> pprCLabel lbl
1046 pprDynamicLinkerAsmLabel _ _
1047 = panic "pprDynamicLinkerAsmLabel"
1048
1049 #elif x86_64_TARGET_ARCH && elf_OBJ_FORMAT
1050 pprDynamicLinkerAsmLabel CodeStub lbl
1051 = pprCLabel lbl <> text "@plt"
1052 pprDynamicLinkerAsmLabel GotSymbolPtr lbl
1053 = pprCLabel lbl <> text "@gotpcrel"
1054 pprDynamicLinkerAsmLabel GotSymbolOffset lbl
1055 = pprCLabel lbl
1056 pprDynamicLinkerAsmLabel SymbolPtr lbl
1057 = text ".LC_" <> pprCLabel lbl
1058
1059 #elif elf_OBJ_FORMAT
1060 pprDynamicLinkerAsmLabel CodeStub lbl
1061 = pprCLabel lbl <> text "@plt"
1062 pprDynamicLinkerAsmLabel SymbolPtr lbl
1063 = text ".LC_" <> pprCLabel lbl
1064 pprDynamicLinkerAsmLabel GotSymbolPtr lbl
1065 = pprCLabel lbl <> text "@got"
1066 pprDynamicLinkerAsmLabel GotSymbolOffset lbl
1067 = pprCLabel lbl <> text "@gotoff"
1068
1069 #elif mingw32_TARGET_OS
1070 pprDynamicLinkerAsmLabel SymbolPtr lbl
1071 = text "__imp_" <> pprCLabel lbl
1072 pprDynamicLinkerAsmLabel _ _
1073 = panic "pprDynamicLinkerAsmLabel"
1074
1075 #else
1076 pprDynamicLinkerAsmLabel _ _
1077 = panic "pprDynamicLinkerAsmLabel"
1078 #endif