add site to result in MemoryEvent::compile regardless of whether the result is live, since the memory location may be used as the target of a move and we need to keep the reference count of the base and index registers nonzero

This commit is contained in:
Joel Dice 2009-02-08 19:08:56 -07:00
parent 29616c4abc
commit a1fc8a4dac

View File

@ -3274,17 +3274,13 @@ class MemoryEvent: public Event {
(c, baseRegister, displacement, indexRegister, scale);
result->target = site;
if (live(result)) {
addSite(c, result, site);
}
addSite(c, result, site);
if (result->high) {
Site* high = site->copyHigh(c);
result->high->target = high;
if (live(result->high)) {
addSite(c, result->high, high);
}
addSite(c, result->high, high);
}
}