avoid clobbering first operand in CombineEvent.compile

This commit is contained in:
Joel Dice 2008-12-20 16:05:01 -07:00
parent cf4e8e7ec2
commit b9b7ae4003

View File

@ -2911,6 +2911,8 @@ class CombineEvent: public Event {
} }
virtual void compile(Context* c) { virtual void compile(Context* c) {
first->source->freeze(c);
Site* target; Site* target;
if (c->arch->condensedAddressing()) { if (c->arch->condensedAddressing()) {
maybePreserve(c, stackBefore, localsBefore, secondSize, second, maybePreserve(c, stackBefore, localsBefore, secondSize, second,
@ -2924,6 +2926,8 @@ class CombineEvent: public Event {
addSite(c, stackBefore, localsBefore, resultSize, result, target); addSite(c, stackBefore, localsBefore, resultSize, result, target);
} }
first->source->thaw(c);
// fprintf(stderr, "combine %p and %p into %p\n", first, second, result); // fprintf(stderr, "combine %p and %p into %p\n", first, second, result);
apply(c, type, firstSize, first->source, secondSize, second->source, apply(c, type, firstSize, first->source, secondSize, second->source,
resultSize, target); resultSize, target);