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

Unified Diff: runtime/vm/assembler_arm.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.h ('k') | runtime/vm/assembler_arm_test.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 22281)
+++ runtime/vm/assembler_arm.cc (working copy)
@@ -100,10 +100,14 @@
uint32_t Address::encoding3() const {
- ASSERT(kind_ == Immediate);
- uint32_t offset = encoding_ & kOffset12Mask;
- ASSERT(offset < 256);
- return (encoding_ & ~kOffset12Mask) | ((offset & 0xf0) << 4) | (offset & 0xf);
+ if (kind_ == Immediate) {
+ uint32_t offset = encoding_ & kOffset12Mask;
+ ASSERT(offset < 256);
+ return (encoding_ & ~kOffset12Mask) | B22 |
+ ((offset & 0xf0) << 4) | (offset & 0xf);
+ }
+ ASSERT(kind_ == IndexRegister);
+ return encoding_;
}
@@ -192,7 +196,6 @@
ASSERT(rd != kNoRegister);
ASSERT(cond != kNoCondition);
int32_t encoding = (static_cast<int32_t>(cond) << kConditionShift) |
- B22 |
mode |
(static_cast<int32_t>(rd) << kRdShift) |
ad.encoding3();
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_arm_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698