mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
fixed multiplyC bug (all multiplies now delegated to multiplyR)
This commit is contained in:
parent
ef12477670
commit
21fa23d84b
@ -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) {
|
||||
assert(con, size == 4);
|
||||
issue(con, divw(R(t), R(b), R(a)));
|
||||
@ -1596,7 +1590,6 @@ populateTables(ArchitectureContext* c)
|
||||
to[index(Subtract, C)] = CAST3(subC);
|
||||
|
||||
to[index(Multiply, R)] = CAST3(multiplyR);
|
||||
to[index(Multiply, C)] = CAST3(multiplyC);
|
||||
|
||||
to[index(Divide, R)] = CAST3(divideR);
|
||||
|
||||
@ -1799,29 +1792,24 @@ class MyArchitecture: public Assembler::Architecture {
|
||||
switch (op) {
|
||||
case Add:
|
||||
case Subtract:
|
||||
case Multiply:
|
||||
if (aSize == 8) {
|
||||
*aTypeMask = *bTypeMask = (1 << RegisterOperand);
|
||||
}
|
||||
break;
|
||||
|
||||
case Multiply:
|
||||
*aTypeMask = *bTypeMask = (1 << RegisterOperand);
|
||||
break;
|
||||
|
||||
case LongCompare:
|
||||
*bTypeMask = (1 << RegisterOperand);
|
||||
break;
|
||||
|
||||
case Divide:
|
||||
if (BytesPerWord == 4 and aSize == 8) {
|
||||
*bTypeMask = ~0;
|
||||
*thunk = true;
|
||||
} else {
|
||||
*aTypeMask = (1 << RegisterOperand);
|
||||
}
|
||||
break;
|
||||
|
||||
case Remainder:
|
||||
if (BytesPerWord == 4 and aSize == 8) {
|
||||
*bTypeMask = ~0;
|
||||
*thunk = true;
|
||||
*thunk = true;
|
||||
} else {
|
||||
*aTypeMask = (1 << RegisterOperand);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user