[PATCH v2 02/14] [x86] Add basic support for .code16

Craig Topper craig.topper at gmail.com
Sun Jan 5 13:01:10 PST 2014


Joerg, do you have a specific objections to anything in David's original
patch that used two feature bits?

My comments for the 2 feature bit patch would be to use
Subtarget->is32BitMode() defined in terms of the two bits here. And rename
is16Bit/is64Bit to is16BitMode/is64BitMode for consistency.

+def In32BitMode  : Predicate<"!Subtarget->is64Bit() && !Subtarget->is16Bit()">,
+                             AssemblerPredicate<"!Mode64Bit,!Mode16Bit",
+                            "32-bit mode">;

I think I'd also like to see a single switchMode function like your 3
feature flag patch. But pass 0 for the 32-bit case.



On Sun, Jan 5, 2014 at 2:04 PM, Joerg Sonnenberger
<joerg at britannica.bec.de>wrote:

> On Sun, Jan 05, 2014 at 07:32:36AM -0600, Craig Topper wrote:
> > Is it possible to do this with only one new feature bit. Can we just have
> > Mode16Bit and Mode64Bit with Mode32 implied if the others aren't set?
>
> What I believe to be the correct approach is to have three explicit
> predicates: is16BitMode, is32BitMode and is64BitMode. Whether they share
> feature bits in the backend is of smaller concern to me, but I would
> strongly prefer to not have as much implicit assumptions as currently
> ("!64 == 32"). How does that sound?
>
> Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140105/1bc72f1c/attachment.html>


More information about the llvm-commits mailing list