mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Allow creation of single-byte MCAtoms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184344 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ad966ea7a8
commit
7ab184a2a1
@ -21,7 +21,7 @@ static bool AtomComp(const MCAtom *L, uint64_t Addr) {
|
||||
void MCModule::map(MCAtom *NewAtom) {
|
||||
uint64_t Begin = NewAtom->Begin;
|
||||
|
||||
assert(Begin < NewAtom->End && "Creating MCAtom with endpoints reversed?");
|
||||
assert(Begin <= NewAtom->End && "Creating MCAtom with endpoints reversed?");
|
||||
|
||||
// Check for atoms already covering this range.
|
||||
AtomListTy::iterator I = std::lower_bound(atom_begin(), atom_end(),
|
||||
|
@ -126,6 +126,7 @@ void MCObjectDisassembler::buildCFG(MCModule *Module) {
|
||||
MCTextAtom *TA = dyn_cast<MCTextAtom>(*AI);
|
||||
if (!TA) continue;
|
||||
Calls.insert(TA->getBeginAddr());
|
||||
BBInfos[TA->getBeginAddr()].Atom = TA;
|
||||
for (MCTextAtom::const_iterator II = TA->begin(), IE = TA->end();
|
||||
II != IE; ++II) {
|
||||
if (MIA.isTerminator(II->Inst))
|
||||
@ -145,7 +146,6 @@ void MCObjectDisassembler::buildCFG(MCModule *Module) {
|
||||
MCAtom *A = Module->findAtomContaining(*SI);
|
||||
if (!A) continue;
|
||||
MCTextAtom *TA = cast<MCTextAtom>(A);
|
||||
BBInfos[TA->getBeginAddr()].Atom = TA;
|
||||
if (TA->getBeginAddr() == *SI)
|
||||
continue;
|
||||
MCTextAtom *NewAtom = TA->split(*SI);
|
||||
|
Loading…
Reference in New Issue
Block a user