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

Unified Diff: runtime/vm/assembler_arm_test.cc

Issue 183803024: Adds support for ARMv6. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Added tests. Created 6 years, 10 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
===================================================================
--- runtime/vm/assembler_arm_test.cc (revision 33351)
+++ runtime/vm/assembler_arm_test.cc (working copy)
@@ -59,9 +59,25 @@
ASSEMBLER_TEST_GENERATE(MovImm16, assembler) {
- __ movw(R0, 0x5678);
- __ movt(R0, 0x1234);
+#if defined(USING_SIMULATOR)
+ // ARMv7 is the default.
+ HostCPUFeatures::set_arm_version(ARMv6);
+ __ LoadLargeImmediate(R0, 0x12345678 << 1);
regis 2014/03/06 17:32:11 LoadDecodableImmediate
zra 2014/03/07 19:00:17 Done.
+ HostCPUFeatures::set_arm_version(ARMv7);
+ __ movw(R1, 0x5678);
+ __ movt(R1, 0x1234);
+ __ sub(R0, R0, ShifterOperand(R1));
__ bx(LR);
+#else
+ if (TargetCPUFeatures::arm_version() == ARMv6) {
+ __ LoadLargeImmediate(R0, 0x12345678);
+ } else {
+ ASSERT(TargetCPUFeatures::arm_version() == ARMv7);
+ __ movw(R0, 0x5678);
+ __ movt(R0, 0x1234);
+ __ bx(LR);
regis 2014/03/06 17:32:11 __ bx(LR) should be outside of the branch. Remove
zra 2014/03/07 19:00:17 Done.
+ }
+#endif
}

Powered by Google App Engine
This is Rietveld 408576698