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

Unified Diff: runtime/vm/assembler_arm.cc

Issue 23622037: Cleanup of some comparisons on ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « no previous file | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm.cc
===================================================================
--- runtime/vm/assembler_arm.cc (revision 27572)
+++ runtime/vm/assembler_arm.cc (working copy)
@@ -91,6 +91,7 @@
}
#endif
+
void CPUFeatures::InitOnce() {
#if defined(USING_SIMULATOR)
integer_division_supported_ = true;
@@ -1592,8 +1593,12 @@
void Assembler::CompareObject(Register rn, const Object& object) {
ASSERT(rn != IP);
- LoadObject(IP, object);
- cmp(rn, ShifterOperand(IP));
+ if (object.IsSmi()) {
+ CompareImmediate(rn, reinterpret_cast<int32_t>(object.raw()));
+ } else {
+ LoadObject(IP, object);
+ cmp(rn, ShifterOperand(IP));
+ }
}
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698