This change adds co-processor condition branching and conditional traps to the Sparc...
authorChris Dewhurst <chris.dewhurst@lero.ie>
Wed, 9 Mar 2016 18:20:21 +0000 (18:20 +0000)
committerChris Dewhurst <chris.dewhurst@lero.ie>
Wed, 9 Mar 2016 18:20:21 +0000 (18:20 +0000)
commit52adb575e61763e27198df0661526c7d7f2c4eaa
tree12ece538df863e1eb7f06e093107ec8fa54de2bf
parentef13c522b42f9bd6b4bc0fe53930bc1e20a21800
This change adds co-processor condition branching and conditional traps to the Sparc back-end.

This will allow inline assembler code to utilize these features, but no automatic lowering is provided, except for the previously provided @llvm.trap, which lowers to "ta 5".

The change also separates out the different assembly language syntaxes for V8 and V9 Sparc. Previously, only V9 Sparc assembly syntax was provided.

The change also corrects the selection order of trap disassembly, allowing, e.g. "ta %g0 + 15" to be rendered, more readably, as "ta 15", ignoring the %g0 register. This is per the sparc v8 and v9 manuals.

Check-in includes many extra unit tests to check this works correctly on both V8 and V9 Sparc processors.

Code Reviewed at http://reviews.llvm.org/D17960.

llvm-svn: 263044
13 files changed:
llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp
llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp
llvm/lib/Target/Sparc/Sparc.h
llvm/lib/Target/Sparc/SparcInstrAliases.td
llvm/lib/Target/Sparc/SparcInstrInfo.cpp
llvm/lib/Target/Sparc/SparcInstrInfo.td
llvm/test/MC/Disassembler/Sparc/sparc-v9.txt
llvm/test/MC/Disassembler/Sparc/sparc.txt
llvm/test/MC/Sparc/sparc-ctrl-instructions.s
llvm/test/MC/Sparc/sparc-traps.s [new file with mode: 0644]
llvm/test/MC/Sparc/sparc-v9-traps.s [new file with mode: 0644]
llvm/test/MC/Sparc/sparc64-ctrl-instructions.s