[PATCH v2] X86: disambiguate unqualified btr, bts

Tim Northover t.p.northover at gmail.com
Wed Jul 17 08:09:21 PDT 2013


>> I think I like that one even less. It means that we can't reassemble
>> our own disassembly,
>
> I've not been following this closely, but can you explain this? It sounds
> like we're producing instructions with out-of-range immediates in
> disassembly.

The immediate takes up a full byte in the instruction stream and
values outside the [0,31] (or whatever) range have well-defined
semantics. In my book that makes them valid instructions that the
disassembler ought to have a representation for.

I suppose that condition could be dropped, though: disassemble the
alternative encodings as if those extra bits weren't there. That would
be better than just changing the AsmParser, but still not my preferred
solution. It's rather misleading for a user of the disassembler.

Tim.



More information about the llvm-commits mailing list