MC CFG: Remap enough for the inserted instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188873 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ahmed Bougacha 2013-08-21 07:27:47 +00:00
parent e0511ded94
commit 3ec498faad

View File

@ -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;
}