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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 626223002: Add unboxed Mint for X64 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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_arm.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index 6d83aff95493ad569d9e1d56d51487b6c8bad547..0e3106388d9a7236dea6ef410f74c446bdddc40d 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -5916,13 +5916,6 @@ 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;
- if ((shift < 0) || (shift > kMintShiftCountLimit)) {
- __ jmp(deopt);
- return;
- } else if (shift == 0) {
- // Nothing to do for zero shift amount.
- return;
- }
switch (op_kind()) {
case Token::kSHR: {
if (shift > 31) {
@@ -6150,27 +6143,17 @@ void ShiftUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
ASSERT(constant.IsSmi());
const intptr_t shift_value = Smi::Cast(constant).Value();
- // Check constant shift value.
- if (shift_value == 0) {
- // Nothing to do.
- } else if (shift_value < 0) {
- // Invalid shift value.
- __ jmp(deopt);
- } else if (shift_value > kShifterLimit) {
- // Result is 0.
- __ xorl(left, left);
- } else {
- // Do the shift: (shift_value > 0) && (shift_value <= kShifterLimit).
- switch (op_kind()) {
- case Token::kSHR:
- __ shrl(left, Immediate(shift_value));
- break;
- case Token::kSHL:
- __ shll(left, Immediate(shift_value));
- break;
- default:
- UNREACHABLE();
- }
+
+ // Do the shift: (shift_value > 0) && (shift_value <= kShifterLimit).
+ switch (op_kind()) {
+ case Token::kSHR:
+ __ shrl(left, Immediate(shift_value));
+ break;
+ case Token::kSHL:
+ __ shll(left, Immediate(shift_value));
+ break;
+ default:
+ UNREACHABLE();
}
return;
}
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698