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

Unified Diff: runtime/vm/assembler_arm.cc

Issue 2737303003: Allow dispatch to use a range of Class-ids in tests (Closed)
Patch Set: Feedback from Slava Created 3 years, 9 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/constants_dbc.h » ('j') | runtime/vm/flow_graph_compiler_x64.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm.cc
diff --git a/runtime/vm/assembler_arm.cc b/runtime/vm/assembler_arm.cc
index 3618bcedf7154a7a7fe586c4765efda5f168bf47..d0e9d3c756f4dc01143353bee6b66743fab50028 100644
--- a/runtime/vm/assembler_arm.cc
+++ b/runtime/vm/assembler_arm.cc
@@ -3047,9 +3047,12 @@ void Assembler::AddImmediate(Register rd,
} else if (Operand::CanHold(~(-value), &o)) {
mvn(IP, o, cond);
sub(rd, rn, Operand(IP), cond);
- } else {
+ } else if (value > 0) {
LoadDecodableImmediate(IP, value, cond);
add(rd, rn, Operand(IP), cond);
+ } else {
+ LoadDecodableImmediate(IP, -value, cond);
+ sub(rd, rn, Operand(IP), cond);
}
}
}
« no previous file with comments | « no previous file | runtime/vm/constants_dbc.h » ('j') | runtime/vm/flow_graph_compiler_x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698