From b9b7ae4003588fa6fdcf88411dcdc40b37c321fc Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sat, 20 Dec 2008 16:05:01 -0700 Subject: [PATCH] avoid clobbering first operand in CombineEvent.compile --- src/compiler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler.cpp b/src/compiler.cpp index 057e238314..ac02d1ebf2 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -2911,6 +2911,8 @@ class CombineEvent: public Event { } virtual void compile(Context* c) { + first->source->freeze(c); + Site* target; if (c->arch->condensedAddressing()) { maybePreserve(c, stackBefore, localsBefore, secondSize, second, @@ -2924,6 +2926,8 @@ class CombineEvent: public Event { addSite(c, stackBefore, localsBefore, resultSize, result, target); } + first->source->thaw(c); + // fprintf(stderr, "combine %p and %p into %p\n", first, second, result); apply(c, type, firstSize, first->source, secondSize, second->source, resultSize, target);