diff options
| author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2013-08-21 07:27:47 +0000 |
|---|---|---|
| committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2013-08-21 07:27:47 +0000 |
| commit | c43aa4e88c4439a9ef28425189ad31bc74007bcf (patch) | |
| tree | 53e3520845a729660db4632b3bfc12372768fb1a /llvm/lib/MC | |
| parent | 03efde5887f04c48a7a73f08557fffb39cd42cea (diff) | |
| download | bcm5719-llvm-c43aa4e88c4439a9ef28425189ad31bc74007bcf.tar.gz bcm5719-llvm-c43aa4e88c4439a9ef28425189ad31bc74007bcf.zip | |
MC CFG: Remap enough for the inserted instruction.
llvm-svn: 188873
Diffstat (limited to 'llvm/lib/MC')
| -rw-r--r-- | llvm/lib/MC/MCAtom.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCAtom.cpp b/llvm/lib/MC/MCAtom.cpp index 2626b39db4c..f3ea6c344d8 100644 --- a/llvm/lib/MC/MCAtom.cpp +++ b/llvm/lib/MC/MCAtom.cpp @@ -72,8 +72,8 @@ MCDataAtom *MCDataAtom::split(uint64_t SplitPt) { // MCTextAtom void MCTextAtom::addInst(const MCInst &I, uint64_t Size) { - if (NextInstAddress > End) - remap(Begin, NextInstAddress); + if (NextInstAddress + Size - 1 > End) + remap(Begin, NextInstAddress + Size - 1); Insts.push_back(MCDecodedInst(I, NextInstAddress, Size)); NextInstAddress += Size; } |

