| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |