summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJatin Bhateja <jatin.bhateja@gmail.com>2017-11-10 16:26:04 +0000
committerJatin Bhateja <jatin.bhateja@gmail.com>2017-11-10 16:26:04 +0000
commitaaa5944ad4cef316634423d0683c36149c4c76b6 (patch)
tree9f072e74898de116a0244ab7c91b979178d2d840 /llvm/lib/CodeGen
parent0f4075e0b12adc8e2bef4c389d1d44861ae4ff05 (diff)
downloadbcm5719-llvm-aaa5944ad4cef316634423d0683c36149c4c76b6.tar.gz
bcm5719-llvm-aaa5944ad4cef316634423d0683c36149c4c76b6.zip
[WebAssembly] Fix stack offsets of return values from call lowering.
Summary: Fixes PR35220 Reviewers: vadimcn, alexcrichton Reviewed By: alexcrichton Subscribers: pepyakin, alexcrichton, jfb, dschuff, sbc100, jgravelle-google, llvm-commits, aheejin Differential Revision: https://reviews.llvm.org/D39866 llvm-svn: 317895
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 4a1e71583eb..e22fe19f9f8 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -8044,10 +8044,10 @@ TargetLowering::LowerCallTo(TargetLowering::CallLoweringInfo &CLI) const {
uint64_t Offset = OldOffsets[i];
MVT RegisterVT = getRegisterType(CLI.RetTy->getContext(), RetVT);
unsigned NumRegs = getNumRegisters(CLI.RetTy->getContext(), RetVT);
- unsigned RegisterVTSize = RegisterVT.getSizeInBits();
+ unsigned RegisterVTByteSZ = RegisterVT.getSizeInBits() / 8;
RetTys.append(NumRegs, RegisterVT);
for (unsigned j = 0; j != NumRegs; ++j)
- Offsets.push_back(Offset + j * RegisterVTSize);
+ Offsets.push_back(Offset + j * RegisterVTByteSZ);
}
}
OpenPOWER on IntegriCloud