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

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

Issue 22999011: Add double unary operation (negate). This is a replica of the destrpyed CL https://chromiumcoderevi… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 3761 matching lines...) Expand 10 before | Expand all | Expand 10 after
3772 __ mvn(result, ShifterOperand(value)); 3772 __ mvn(result, ShifterOperand(value));
3773 // Remove inverted smi-tag. 3773 // Remove inverted smi-tag.
3774 __ bic(result, result, ShifterOperand(kSmiTagMask)); 3774 __ bic(result, result, ShifterOperand(kSmiTagMask));
3775 break; 3775 break;
3776 default: 3776 default:
3777 UNREACHABLE(); 3777 UNREACHABLE();
3778 } 3778 }
3779 } 3779 }
3780 3780
3781 3781
3782 LocationSummary* UnaryDoubleOpInstr::MakeLocationSummary() const {
3783 const intptr_t kNumInputs = 1;
3784 const intptr_t kNumTemps = 0;
3785 LocationSummary* summary =
3786 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3787 summary->set_in(0, Location::RequiresFpuRegister());
3788 summary->set_out(Location::RequiresFpuRegister());
3789 return summary;
3790 }
3791
3792
3793 void UnaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3794 DRegister result = EvenDRegisterOf(locs()->out().fpu_reg());
3795 DRegister value = EvenDRegisterOf(locs()->in(0).fpu_reg());
3796 __ vnegd(result, value);
3797 }
3798
3799
3782 LocationSummary* SmiToDoubleInstr::MakeLocationSummary() const { 3800 LocationSummary* SmiToDoubleInstr::MakeLocationSummary() const {
3783 const intptr_t kNumInputs = 1; 3801 const intptr_t kNumInputs = 1;
3784 const intptr_t kNumTemps = 0; 3802 const intptr_t kNumTemps = 0;
3785 LocationSummary* result = 3803 LocationSummary* result =
3786 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 3804 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3787 result->set_in(0, Location::WritableRegister()); 3805 result->set_in(0, Location::WritableRegister());
3788 result->set_out(Location::RequiresFpuRegister()); 3806 result->set_out(Location::RequiresFpuRegister());
3789 return result; 3807 return result;
3790 } 3808 }
3791 3809
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
4434 compiler->GenerateCall(token_pos(), 4452 compiler->GenerateCall(token_pos(),
4435 &label, 4453 &label,
4436 PcDescriptors::kOther, 4454 PcDescriptors::kOther,
4437 locs()); 4455 locs());
4438 __ Drop(2); // Discard type arguments and receiver. 4456 __ Drop(2); // Discard type arguments and receiver.
4439 } 4457 }
4440 4458
4441 } // namespace dart 4459 } // namespace dart
4442 4460
4443 #endif // defined TARGET_ARCH_ARM 4461 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698