[PATCH v3 02/11] [x86] Add basic support for .code16

David Woodhouse dwmw2 at infradead.org
Mon Dec 23 12:02:48 PST 2013


On Fri, 2013-12-20 at 14:57 +0000, David Woodhouse wrote:
>  def Mode64Bit : SubtargetFeature<"64bit-mode", "In64BitMode", "true",
>                                    "64-bit mode (x86_64)">;
> +def Mode16Bit : SubtargetFeature<"16bit-mode", "In16BitMode", "true",
> +                                  "16-bit mode (i8086)">;

You can consider the above to be a kind of enum using the two bits.
Setting them to {1,0} means 64-bit mode, {0,0} means 32-bit mode and
{0,1} means 16-bit mode. {1,1} is invalid.

Since we can't easily do a "proper" enum in the feature bits, Jörg
requested that we simply have separate bits for each of 16-bit, 32-bit
and 64-bit mode. Which looks something like this...

-- 
dwmw2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-basic-support-for-.code16.patch
Type: text/x-patch
Size: 16614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131223/09fb5294/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131223/09fb5294/attachment-0001.bin>


More information about the llvm-commits mailing list