[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)
commitfefcfffe68ac76b5c425b640a59ae0f4e24b5a20
treee214b7012b89ad76fd131fbcb37aea03155110e6
parent20ae2a311f5fd71924ff286a0dae754fae4b0fcd
[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).

llvm-svn: 235657
llvm/include/llvm/IR/IntrinsicsPowerPC.td
llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
llvm/lib/Target/PowerPC/PPCInstrFormats.td
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/MC/Disassembler/PowerPC/dcbt.txt [new file with mode: 0644]
llvm/test/MC/Disassembler/PowerPC/ppc64-encoding-bookII.txt
llvm/test/MC/PowerPC/dcbt.s [new file with mode: 0644]
llvm/test/MC/PowerPC/ppc64-encoding-bookII.s