diff options
author | Dan Gohman <dan433584@gmail.com> | 2015-09-09 00:52:47 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2015-09-09 00:52:47 +0000 |
commit | 4f52e00ecbd6623360bd1ff132552a623052b88d (patch) | |
tree | 1d82943f473d505a0d62a1a4dcf225604156fb08 /llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp | |
parent | 309915626110fffc66a6ee598f9d24dbbb256ded (diff) | |
download | llvm-4f52e00ecbd6623360bd1ff132552a623052b88d.zip llvm-4f52e00ecbd6623360bd1ff132552a623052b88d.tar.gz llvm-4f52e00ecbd6623360bd1ff132552a623052b88d.tar.bz2 |
[WebAssembly] Implement WebAssemblyInstrInfo::copyPhysReg
llvm-svn: 247110
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp index d4c65a4..1898ad8 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp @@ -29,3 +29,11 @@ using namespace llvm; WebAssemblyInstrInfo::WebAssemblyInstrInfo(const WebAssemblySubtarget &STI) : RI(STI.getTargetTriple()) {} + +void WebAssemblyInstrInfo::copyPhysReg(MachineBasicBlock &MBB, + MachineBasicBlock::iterator I, + DebugLoc DL, unsigned DestReg, + unsigned SrcReg, bool KillSrc) const { + BuildMI(MBB, I, DL, get(WebAssembly::COPY), DestReg) + .addReg(SrcReg, KillSrc ? RegState::Kill : 0); +} |