From 85a772b0a7eb6f2562854c7d75b5c7e1f86cd0f0 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 16 May 2008 10:18:36 -0600 Subject: [PATCH] add read of size 4 in CombineEvent for first operand of shift operation --- src/compiler.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/compiler.cpp b/src/compiler.cpp index d69215a5ca..a53aa684ba 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -1552,7 +1552,23 @@ class CombineEvent: public Event { Event(c), type(type), size(size), first(first), second(second), result(result) { - addRead(c, first, size, firstTarget); + // todo: we should really specify the sizes of each operand + // seperately for binary operations. The following is a hack + // until then. + unsigned firstSize; + switch (type) { + case ShiftLeft: + case ShiftRight: + case UnsignedShiftRight: + firstSize = 4; + break; + + default: + firstSize = size; + break; + } + + addRead(c, first, firstSize, firstTarget); addRead(c, second, size, secondTarget); }