[PowerPC] Add asm/disasm support for dcbt with hint
authorHal Finkel <hfinkel@anl.gov>
Thu, 23 Apr 2015 22:47:57 +0000 (22:47 +0000)
committerHal Finkel <hfinkel@anl.gov>
Thu, 23 Apr 2015 22:47:57 +0000 (22:47 +0000)
commit79f43b27368e6b8ac0eb3a143a03d61f4e2b1209
treee13614216968bed82099e077ac1ee67583f3f610
parent3ad4bc1445427520e4c7a2d43f78594adb85a3bb
[PowerPC] Add asm/disasm support for dcbt with hint

Add assembler/disassembler support for dcbt/dcbtst (and aliases) with the hint
field specified (non-zero). Unforunately, the syntax for this instruction is
special in that it differs for server vs. embedded cores:
   dcbt ra, rb, th [server]
   dcbt th, ra, rb [embedded]
where th can be omitted when it is 0. dcbtst is the same. Thus we need to play
games in the parser and the printer to flip the operands around on the embedded
cores. We'll use the server syntax as the default (binutils currently uses the
embedded form by default, but IBM is changing that).

We also stop marking dcbtst as having unmodeled side effects (this is not
necessary, it is just a hint like dcbt -- noticed by inspection, so no separate
test case).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235657 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/IntrinsicsPowerPC.td
lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
lib/Target/PowerPC/PPCInstrFormats.td
lib/Target/PowerPC/PPCInstrInfo.td
test/MC/Disassembler/PowerPC/dcbt.txt [new file with mode: 0644]
test/MC/Disassembler/PowerPC/ppc64-encoding-bookII.txt
test/MC/PowerPC/dcbt.s [new file with mode: 0644]
test/MC/PowerPC/ppc64-encoding-bookII.s