OpRegRegReg in case of r_dest == r_src2 does not expect kOpMul as valid operation.
This provokes abort compiling instruction like "mul-int v0, v1, v0" if both
operands are arriving in registers.
The fix is to expect kOpMul as comutative operation.
Change-Id: I259e49edea4b8b08ca4ed1c61033bbc2b2229078
Signed-off-by: Pavel Vyssotski <pavel.n.vyssotski@intel.com>
case kOpAdc:
case kOpAnd:
case kOpXor:
+ case kOpMul:
break;
default:
LOG(FATAL) << "Bad case in OpRegRegReg " << op;
sameFieldNames
b/18380491
invoke-super abstract
+BadCaseInOpRegRegReg
Done!
--- /dev/null
+.class public LBadCaseInOpRegRegReg;
+
+.super Ljava/lang/Object;
+
+.method public static getInt()I
+ .registers 2
+ const/4 v0, 0x0
+ const/4 v1, 0x1
+ add-int/2addr v0, v1
+ add-int/lit8 v1, v0, 0x1
+ mul-int v0, v1, v0
+ return v0
+.end method
new Object[]{42}, null, 42));
testCases.add(new TestCase("invoke-super abstract", "B18380491ConcreteClass", "foo",
new Object[]{0}, new AbstractMethodError(), null));
+ testCases.add(new TestCase("BadCaseInOpRegRegReg", "BadCaseInOpRegRegReg", "getInt", null, null, 2));
}
public void runTests() {