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

Side by Side Diff: runtime/vm/intermediate_language_x64.cc

Issue 16664003: Improvements to 53-bit overflow checking. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | runtime/vm/object.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 3679 matching lines...) Expand 10 before | Expand all | Expand 10 after
3690 3690
3691 void UnarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3691 void UnarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3692 Register value = locs()->in(0).reg(); 3692 Register value = locs()->in(0).reg();
3693 ASSERT(value == locs()->out().reg()); 3693 ASSERT(value == locs()->out().reg());
3694 switch (op_kind()) { 3694 switch (op_kind()) {
3695 case Token::kNEGATE: { 3695 case Token::kNEGATE: {
3696 Label* deopt = compiler->AddDeoptStub(deopt_id(), 3696 Label* deopt = compiler->AddDeoptStub(deopt_id(),
3697 kDeoptUnaryOp); 3697 kDeoptUnaryOp);
3698 __ negq(value); 3698 __ negq(value);
3699 __ j(OVERFLOW, deopt); 3699 __ j(OVERFLOW, deopt);
3700 Emit53BitOverflowCheck(compiler, deopt, value);
3700 break; 3701 break;
3701 } 3702 }
3702 case Token::kBIT_NOT: 3703 case Token::kBIT_NOT:
3703 __ notq(value); 3704 __ notq(value);
3704 __ andq(value, Immediate(~kSmiTagMask)); // Remove inverted smi-tag. 3705 __ andq(value, Immediate(~kSmiTagMask)); // Remove inverted smi-tag.
3705 break; 3706 break;
3706 default: 3707 default:
3707 UNREACHABLE(); 3708 UNREACHABLE();
3708 } 3709 }
3709 } 3710 }
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
4414 PcDescriptors::kOther, 4415 PcDescriptors::kOther,
4415 locs()); 4416 locs());
4416 __ Drop(2); // Discard type arguments and receiver. 4417 __ Drop(2); // Discard type arguments and receiver.
4417 } 4418 }
4418 4419
4419 } // namespace dart 4420 } // namespace dart
4420 4421
4421 #undef __ 4422 #undef __
4422 4423
4423 #endif // defined TARGET_ARCH_X64 4424 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698