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

Joerg Sonnenberger joerg at britannica.bec.de
Sun Jan 5 13:51:57 PST 2014


On Sun, Jan 05, 2014 at 09:45:05PM +0000, David Woodhouse wrote:
> On Sun, 2014-01-05 at 22:31 +0100, Joerg Sonnenberger wrote:
> > The reason for the initial objection was that the choosen mapping makes
> > it hard to ensure that all places copy the bits correctly. As such, both
> > bits 0 is a bad choice for a valid mode. 
> 
> Actually, on further reflection this statement bothers me. I have made
> no attempt to ensure that *individual* bits are copied correctly in "all
> places". Or indeed any places. Should I have done? Did I miss something?
> 
> Especially with the PR18303 fix, we do store the *entire* set of feature
> bits for later use during relaxation. But I don't see why your
> above-stated concern would be relevant to that.
> 
> We *already* had a valid mode indicated by the In64BitMode feature bit
> being set to zero, and that seemed to be OK. What's different about
> having two of them?

At the moment, In64BitMode is a toogle between two valid modes. Without
copying things around in random places (like to the fragments), that's
somewhat sane. But the more places are dealing with feature bits, the
more important it becomes to ensure the correctness. Does that make
sense?

Joerg



More information about the llvm-commits mailing list