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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 2974953002: Revise assertions and fix bug in the implementation of shifts (Closed)
Patch Set: Outdated comment corrected Created 3 years, 5 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/intermediate_language.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_arm.cc
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index af4b0fe6cee5e539c187f551053ed3ab595626a2..995c1cd866cb947eb2d25850a61dac94d9bcb201 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -6546,9 +6546,7 @@ void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
ASSERT(locs()->in(1).constant().IsSmi());
const int32_t shift =
reinterpret_cast<int32_t>(locs()->in(1).constant().raw()) >> 1;
Vyacheslav Egorov (Google) 2017/07/12 09:44:48 this should better be Smi::Cast().Value() instea
alexmarkov 2017/07/12 16:47:36 Done, in the follow-up CL https://codereview.chrom
- // TODO(alexmarkov): revise and uncomment the following assertions
- // ASSERT(!has_shift_count_check());
- // ASSERT(shift >= 0);
+ ASSERT(shift >= 0);
switch (op_kind()) {
case Token::kSHR: {
if (shift < 32) {
@@ -6610,7 +6608,7 @@ void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ SmiUntag(shift);
// Deopt if shift is larger than 63 or less than 0.
- if (has_shift_count_check()) {
+ if (!IsShiftCountInRange()) {
__ CompareImmediate(shift, kMintShiftCountLimit);
__ b(deopt, HI);
}
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698