blob: 96a1bb2cc0bf502f2e581eb7df87aa09b0cad478 [file] [log] [blame]
Nate Begemanfb5792f2005-07-12 01:41:54 +00001//=====-- X86Subtarget.h - Define TargetMachine for the X86 ---*- C++ -*--====//
2//
3// The LLVM Compiler Infrastructure
4//
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.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file declares the X86 specific subclass of TargetSubtarget.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef X86SUBTARGET_H
15#define X86SUBTARGET_H
16
17#include "llvm/Target/TargetSubtarget.h"
18
19namespace llvm {
20class Module;
21
22class X86Subtarget : public TargetSubtarget {
23protected:
24 /// Used by the target machine to set up the target frame info
25 unsigned stackAlignment;
26
27 /// Used by instruction selector
28 bool indirectExternAndWeakGlobals;
29
30 /// Used by the asm printer
31 bool asmDarwinLinkerStubs;
32 bool asmLeadingUnderscore;
33 bool asmAlignmentIsInBytes;
34 bool asmPrintDotLocalConstants;
35 bool asmPrintDotLCommConstants;
36 bool asmPrintConstantAlignment;
37public:
38 /// This constructor initializes the data members to match that
39 /// of the specified module.
40 ///
41 X86Subtarget(const Module &M);
42
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; }
46
47 /// Returns true if the instruction selector should treat global values
48 /// referencing external or weak symbols as indirect rather than direct
49 /// references.
50 bool getIndirectExternAndWeakGlobals() const {
51 return indirectExternAndWeakGlobals; }
52};
53} // End llvm namespace
54
55#endif