1 //=====---- X86Subtarget.h - Define Subtarget for the X86 -----*- C++ -*--====//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by Nate Begeman and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the X86 specific subclass of TargetSubtarget.
12 //===----------------------------------------------------------------------===//
14 #ifndef X86SUBTARGET_H
15 #define X86SUBTARGET_H
17 #include "llvm/Target/TargetSubtarget.h"
24 class X86Subtarget : public TargetSubtarget {
26 /// stackAlignment - The minimum alignment known to hold of the stack frame on
27 /// entry to the function and which must be maintained by every function.
28 unsigned stackAlignment;
30 /// Used by instruction selector
31 bool indirectExternAndWeakGlobals;
33 /// Used by the asm printer
34 bool asmDarwinLinkerStubs;
35 bool asmLeadingUnderscore;
36 bool asmAlignmentIsInBytes;
37 bool asmPrintDotLocalConstants;
38 bool asmPrintDotLCommConstants;
39 bool asmPrintConstantAlignment;
42 isELF, isCygwin, isDarwin, isWindows
45 /// This constructor initializes the data members to match that
46 /// of the specified module.
48 X86Subtarget(const Module &M, const std::string &FS);
50 /// getStackAlignment - Returns the minimum alignment known to hold of the
51 /// stack frame on entry to the function and which must be maintained by every
52 /// function for this subtarget.
53 unsigned getStackAlignment() const { return stackAlignment; }
55 /// Returns true if the instruction selector should treat global values
56 /// referencing external or weak symbols as indirect rather than direct
58 bool getIndirectExternAndWeakGlobals() const {
59 return indirectExternAndWeakGlobals;
62 } // End llvm namespace