fixed multiplyC bug (all multiplies now delegated to multiplyR)

This commit is contained in:
J. Treadwell
2009-03-13 18:37:40 -06:00
parent ef12477670
commit 21fa23d84b

View File

@ -748,12 +748,6 @@ void multiplyR(Context* con, unsigned size, Reg* a, Reg* b, Reg* t) {
} }
} }
void multiplyC(Context* con, unsigned size UNUSED, Const* a, Reg* b, Reg* t) {
assert(con, size == 4);
int64_t i = getVal(a);
issue(con, mulli(R(t), R(b), i));
}
void divideR(Context* con, unsigned size UNUSED, Reg* a, Reg* b, Reg* t) { void divideR(Context* con, unsigned size UNUSED, Reg* a, Reg* b, Reg* t) {
assert(con, size == 4); assert(con, size == 4);
issue(con, divw(R(t), R(b), R(a))); issue(con, divw(R(t), R(b), R(a)));
@ -1596,7 +1590,6 @@ populateTables(ArchitectureContext* c)
to[index(Subtract, C)] = CAST3(subC); to[index(Subtract, C)] = CAST3(subC);
to[index(Multiply, R)] = CAST3(multiplyR); to[index(Multiply, R)] = CAST3(multiplyR);
to[index(Multiply, C)] = CAST3(multiplyC);
to[index(Divide, R)] = CAST3(divideR); to[index(Divide, R)] = CAST3(divideR);
@ -1799,25 +1792,20 @@ class MyArchitecture: public Assembler::Architecture {
switch (op) { switch (op) {
case Add: case Add:
case Subtract: case Subtract:
case Multiply:
if (aSize == 8) { if (aSize == 8) {
*aTypeMask = *bTypeMask = (1 << RegisterOperand); *aTypeMask = *bTypeMask = (1 << RegisterOperand);
} }
break; break;
case Multiply:
*aTypeMask = *bTypeMask = (1 << RegisterOperand);
break;
case LongCompare: case LongCompare:
*bTypeMask = (1 << RegisterOperand); *bTypeMask = (1 << RegisterOperand);
break; break;
case Divide: case Divide:
if (BytesPerWord == 4 and aSize == 8) {
*bTypeMask = ~0;
*thunk = true;
} else {
*aTypeMask = (1 << RegisterOperand);
}
break;
case Remainder: case Remainder:
if (BytesPerWord == 4 and aSize == 8) { if (BytesPerWord == 4 and aSize == 8) {
*bTypeMask = ~0; *bTypeMask = ~0;