add read of size 4 in CombineEvent for first operand of shift operation

This commit is contained in:
Joel Dice 2008-05-16 10:18:36 -06:00
parent 790e2fee42
commit 85a772b0a7

View File

@ -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);
}