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

Unified Diff: runtime/vm/assembler_arm.cc

Issue 885443012: Undo unnecessary changes to ARM assembler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/assembler_arm.h ('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.cc
===================================================================
--- runtime/vm/assembler_arm.cc (revision 43595)
+++ runtime/vm/assembler_arm.cc (working copy)
@@ -2710,6 +2710,22 @@
}
+void Assembler::LoadDecodableImmediate(
+ Register rd, int32_t value, Condition cond) {
+ const ARMVersion version = TargetCPUFeatures::arm_version();
+ if ((version == ARMv5TE) || (version == ARMv6)) {
+ LoadPatchableImmediate(rd, value, cond);
+ } else {
+ ASSERT(version == ARMv7);
+ movw(rd, Utils::Low16Bits(value), cond);
+ const uint16_t value_high = Utils::High16Bits(value);
+ if (value_high != 0) {
+ movt(rd, value_high, cond);
+ }
+ }
+}
+
+
void Assembler::LoadImmediate(Register rd, int32_t value, Condition cond) {
Operand o;
if (Operand::CanHold(value, &o)) {
@@ -2717,7 +2733,7 @@
} else if (Operand::CanHold(~value, &o)) {
mvn(rd, o, cond);
} else {
- LoadPatchableImmediate(rd, value, cond);
+ LoadDecodableImmediate(rd, value, cond);
}
}
@@ -3003,7 +3019,7 @@
mvn(IP, o, cond);
sub(rd, rn, Operand(IP), cond);
} else {
- LoadPatchableImmediate(IP, value, cond);
+ LoadDecodableImmediate(IP, value, cond);
add(rd, rn, Operand(IP), cond);
}
}
@@ -3029,7 +3045,7 @@
mvn(IP, o, cond);
subs(rd, rn, Operand(IP), cond);
} else {
- LoadPatchableImmediate(IP, value, cond);
+ LoadDecodableImmediate(IP, value, cond);
adds(rd, rn, Operand(IP), cond);
}
}
@@ -3055,7 +3071,7 @@
mvn(IP, o, cond);
adds(rd, rn, Operand(IP), cond);
} else {
- LoadPatchableImmediate(IP, value, cond);
+ LoadDecodableImmediate(IP, value, cond);
subs(rd, rn, Operand(IP), cond);
}
}
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698