diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-01-06 04:55:54 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-01-06 04:55:54 +0000 |
commit | 3c80d62a6ceacac6341619d5ffe7afbab84be5bf (patch) | |
tree | 775c53b542d64dd6073a46d41c95f321c394e958 /llvm/lib/Target/X86/X86Subtarget.h | |
parent | 32a14e0a7b7fcc85dbeffef3f7a0c9a1336c887a (diff) | |
download | bcm5719-llvm-3c80d62a6ceacac6341619d5ffe7afbab84be5bf.tar.gz bcm5719-llvm-3c80d62a6ceacac6341619d5ffe7afbab84be5bf.zip |
[x86] Add basic support for .code16
This is not really expected to work right yet. Mostly because we will
still emit the OpSize (0x66) prefix in all the wrong places, along with
a number of other corner cases. Those will all be fixed in the subsequent
commits.
Patch from David Woodhouse.
llvm-svn: 198584
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.h')
-rw-r--r-- | llvm/lib/Target/X86/X86Subtarget.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h index 93d251a6794..f39389e08c6 100644 --- a/llvm/lib/Target/X86/X86Subtarget.h +++ b/llvm/lib/Target/X86/X86Subtarget.h @@ -205,9 +205,15 @@ private: /// StackAlignOverride - Override the stack alignment. unsigned StackAlignOverride; - /// In64BitMode - True if compiling for 64-bit, false for 32-bit. + /// In64BitMode - True if compiling for 64-bit, false for 16-bit or 32-bit. bool In64BitMode; + /// In32BitMode - True if compiling for 32-bit, false for 16-bit or 64-bit. + bool In32BitMode; + + /// In16BitMode - True if compiling for 16-bit, false for 32-bit or 64-bit. + bool In16BitMode; + public: /// This constructor initializes the data members to match that /// of the specified triple. @@ -244,6 +250,14 @@ public: return In64BitMode; } + bool is32Bit() const { + return In32BitMode; + } + + bool is16Bit() const { + return In16BitMode; + } + /// Is this x86_64 with the ILP32 programming model (x32 ABI)? bool isTarget64BitILP32() const { return In64BitMode && (TargetTriple.getEnvironment() == Triple::GNUX32 || |