[llvm-commits] [llvm] r122663 - in /llvm/trunk/lib/Target/ARM: ARMAsmPrinter.cpp ARMAsmPrinter.h ARMISelDAGToDAG.cpp ARMInstrInfo.td

Jim Grosbach grosbach at apple.com
Wed Jan 19 15:41:24 PST 2011


On Jan 19, 2011, at 3:28 PM, Anton Korobeynikov wrote:

> Hi Jim,
> 
>> Can you elaborate why these need to be pseudos? It would seem that they should just be real instructions with different subtarget feature requirements to tell the compiler whether to use the v5 or the v6 version.
> The only difference is operand restrictions, thus modelling as real
> instruction will yield disassembler decoding conflict.

The disassembler should be able to handle encoding conflicts when the instructions have mutually exclusive subtarget feature requirements. If it can't, that's a problem that should probably be fixed.

Alternatively, it should be possible to express (I doubt it is currently) that a constraint only applies when a Requires[] evaluates true. That seems like the truely correct answer.

In the meantime, it's somewhat prettier to just add code to the disassembler to explicitly ignore the decoding conflict and recognize the v6 version as canonical for disassembly purposes. That's what's done for lots of "pseudo" instructions in the ARM backend right now. To be fair, we really want to get rid of most/all of those and use alternatives instead, but it will get you where you need to go in the meantime.

-Jim



More information about the llvm-commits mailing list