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

Unified Diff: runtime/vm/assembler_arm_test.cc

Issue 14637013: Fix ARM memory addressing mode 3 in assembler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm_test.cc
===================================================================
--- runtime/vm/assembler_arm_test.cc (revision 22281)
+++ runtime/vm/assembler_arm_test.cc (working copy)
@@ -789,9 +789,7 @@
ASSEMBLER_TEST_GENERATE(Ldrh, assembler) {
- Label Test1;
- Label Test2;
- Label Done;
+ Label Test1, Test2, Test3, Done;
__ mov(R1, ShifterOperand(0x11));
__ mov(R2, ShifterOperand(SP));
@@ -803,16 +801,26 @@
__ b(&Done);
__ Bind(&Test1);
- __ mov(R0, ShifterOperand(0));
+ __ mov(R0, ShifterOperand(0x22));
__ strh(R0, Address(R2, (-kWordSize * 30)));
__ ldrh(R1, Address(R2, (-kWordSize * 30)));
- __ cmp(R1, ShifterOperand(0));
+ __ cmp(R1, ShifterOperand(0x22));
__ b(&Test2, EQ);
__ mov(R0, ShifterOperand(1));
__ b(&Done);
__ Bind(&Test2);
__ mov(R0, ShifterOperand(0));
+ __ AddImmediate(R2, (-kWordSize * 30));
+ __ strh(R0, Address(R2));
+ __ ldrh(R1, Address(R2));
+ __ cmp(R1, ShifterOperand(0));
+ __ b(&Test3, EQ);
+ __ mov(R0, ShifterOperand(1));
+ __ b(&Done);
+ __ Bind(&Test3);
+
+ __ mov(R0, ShifterOperand(0));
__ Bind(&Done);
__ ldr(R1, Address(SP, (kWordSize * 30), Address::PostIndex));
__ mov(PC, ShifterOperand(LR));
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698