summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86Subtarget.h
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-09-05 21:51:43 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-09-05 21:51:43 +0000
commit73df7e383033a767ded013c2e013df18e6010aa0 (patch)
tree029264adbda8c27210483ce4fe778adbb801480b /llvm/lib/Target/X86/X86Subtarget.h
parentdf06b6e0690dddb85158c136bf31ac228713edd0 (diff)
downloadbcm5719-llvm-73df7e383033a767ded013c2e013df18e6010aa0.tar.gz
bcm5719-llvm-73df7e383033a767ded013c2e013df18e6010aa0.zip
Add a new MC bit for NaCl (Native Client) mode. NaCl requires that certain
instructions are more aligned than the CPU requires, and adds some additional directives, to follow in future patches. Patch by David Meyer! llvm-svn: 139125
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.h')
-rw-r--r--llvm/lib/Target/X86/X86Subtarget.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h
index c3a6d0f711d..843a3b7660b 100644
--- a/llvm/lib/Target/X86/X86Subtarget.h
+++ b/llvm/lib/Target/X86/X86Subtarget.h
@@ -119,6 +119,9 @@ private:
/// In64BitMode - True if compiling for 64-bit, false for 32-bit.
bool In64BitMode;
+ /// InNaClMode - True if compiling for Native Client target.
+ bool InNaClMode;
+
public:
/// This constructor initializes the data members to match that
@@ -190,6 +193,11 @@ public:
return !isTargetDarwin() && !isTargetWindows() && !isTargetCygMing();
}
bool isTargetLinux() const { return TargetTriple.getOS() == Triple::Linux; }
+ bool isTargetNaCl() const {
+ return TargetTriple.getOS() == Triple::NativeClient;
+ }
+ bool isTargetNaCl32() const { return isTargetNaCl() && !is64Bit(); }
+ bool isTargetNaCl64() const { return isTargetNaCl() && is64Bit(); }
bool isTargetWindows() const { return TargetTriple.getOS() == Triple::Win32; }
bool isTargetMingw() const { return TargetTriple.getOS() == Triple::MinGW32; }
OpenPOWER on IntegriCloud