Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: runtime/vm/assembler_arm_test.cc

Issue 252333002: Use GPRs for mints (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/assembler_arm_test.cc
diff --git a/runtime/vm/assembler_arm_test.cc b/runtime/vm/assembler_arm_test.cc
index 6973e27c1e22d22d76b50df3f6d76f7bb11fc153..8029184d074e072e585970b9ec510ca897cffffd 100644
--- a/runtime/vm/assembler_arm_test.cc
+++ b/runtime/vm/assembler_arm_test.cc
@@ -683,6 +683,40 @@ ASSEMBLER_TEST_RUN(AddSub, test) {
}
+ASSEMBLER_TEST_GENERATE(AddCarry, assembler) {
+ __ LoadImmediate(R2, 0xFFFFFFFF);
+ __ mov(R1, ShifterOperand(1));
+ __ mov(R0, ShifterOperand(0));
+ __ adds(R2, R2, ShifterOperand(R1));
+ __ adcs(R0, R0, ShifterOperand(R0));
+ __ bx(LR);
+}
+
+
+ASSEMBLER_TEST_RUN(AddCarry, test) {
+ EXPECT(test != NULL);
+ typedef int (*AddCarry)();
+ EXPECT_EQ(1, EXECUTE_TEST_CODE_INT32(AddCarry, test->entry()));
+}
+
+
+ASSEMBLER_TEST_GENERATE(SubCarry, assembler) {
+ __ LoadImmediate(R2, 0x0);
+ __ mov(R1, ShifterOperand(1));
+ __ mov(R0, ShifterOperand(0));
+ __ subs(R2, R2, ShifterOperand(R1));
+ __ sbcs(R0, R0, ShifterOperand(R0));
+ __ bx(LR);
+}
+
+
+ASSEMBLER_TEST_RUN(SubCarry, test) {
+ EXPECT(test != NULL);
+ typedef int (*SubCarry)();
+ EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT32(SubCarry, test->entry()));
+}
+
+
ASSEMBLER_TEST_GENERATE(AndOrr, assembler) {
__ mov(R1, ShifterOperand(40));
__ mov(R2, ShifterOperand(0));

Powered by Google App Engine
This is Rietveld 408576698