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

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

Issue 10453110: Implement optimized unary ops for ia32 as well. Fix a crash in disassembler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 const Class& double_class = 1392 const Class& double_class =
1393 Class::ZoneHandle(Isolate::Current()->object_store()->double_class()); 1393 Class::ZoneHandle(Isolate::Current()->object_store()->double_class());
1394 const Code& stub = 1394 const Code& stub =
1395 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); 1395 Code::Handle(StubCode::GetAllocationStubForClass(double_class));
1396 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint()); 1396 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint());
1397 __ pushq(value); 1397 __ pushq(value);
1398 compiler->GenerateCall(instance_call()->token_index(), 1398 compiler->GenerateCall(instance_call()->token_index(),
1399 instance_call()->try_index(), 1399 instance_call()->try_index(),
1400 &label, 1400 &label,
1401 PcDescriptors::kOther); 1401 PcDescriptors::kOther);
1402 // Result is in EAX. 1402 // Result is in RAX.
1403 ASSERT(result != temp);
1403 __ movq(result, RAX); 1404 __ movq(result, RAX);
Florian Schneider 2012/06/01 15:49:10 Maybe avoid the move if result == RAX.
srdjan 2012/06/01 18:27:25 ditto.
1404 __ popq(temp); 1405 __ popq(temp);
1405 __ movsd(XMM0, FieldAddress(temp, Double::value_offset())); 1406 __ movsd(XMM0, FieldAddress(temp, Double::value_offset()));
1406 __ DoubleNegate(XMM0); 1407 __ DoubleNegate(XMM0);
1407 __ movsd(FieldAddress(result, Double::value_offset()), XMM0); 1408 __ movsd(FieldAddress(result, Double::value_offset()), XMM0);
1408 } else { 1409 } else {
1409 UNREACHABLE(); 1410 UNREACHABLE();
1410 } 1411 }
1411 } 1412 }
1412 1413
1413 } // namespace dart 1414 } // namespace dart
1414 1415
1415 #undef __ 1416 #undef __
1416 1417
1417 #endif // defined TARGET_ARCH_X64 1418 #endif // defined TARGET_ARCH_X64
OLDNEW
« runtime/vm/intermediate_language_ia32.cc ('K') | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698