1 //=====-- X86Subtarget.h - Define TargetMachine 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"
22 class X86Subtarget : public TargetSubtarget {
24 /// Used by the target machine to set up the target frame info
25 unsigned stackAlignment;
27 /// Used by instruction selector
28 bool indirectExternAndWeakGlobals;
30 /// Used by the asm printer
31 bool asmDarwinLinkerStubs;
32 bool asmLeadingUnderscore;
33 bool asmAlignmentIsInBytes;
34 bool asmPrintDotLocalConstants;
35 bool asmPrintDotLCommConstants;
36 bool asmPrintConstantAlignment;
38 /// This constructor initializes the data members to match that
39 /// of the specified module.
41 X86Subtarget(const Module &M);
43 /// Returns the preferred stack alignment for the current target triple, or
44 /// the default if no target triple is set.
45 unsigned getStackAlignment() const { return stackAlignment; }
47 /// Returns true if the instruction selector should treat global values
48 /// referencing external or weak symbols as indirect rather than direct
50 bool getIndirectExternAndWeakGlobals() const {
51 return indirectExternAndWeakGlobals; }
53 } // End llvm namespace