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

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

Issue 11019011: Cleaning up in VM number hierarchy which was exposing a bunch (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove formatting changes Created 8 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 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/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 // cannot tag the result. 680 // cannot tag the result.
681 __ cmpq(RAX, Immediate(0x4000000000000000)); 681 __ cmpq(RAX, Immediate(0x4000000000000000));
682 __ j(EQUAL, &fall_through); 682 __ j(EQUAL, &fall_through);
683 __ SmiTag(RAX); 683 __ SmiTag(RAX);
684 __ ret(); 684 __ ret();
685 __ Bind(&fall_through); 685 __ Bind(&fall_through);
686 return false; 686 return false;
687 } 687 }
688 688
689 689
690 bool Intrinsifier::Integer_negate(Assembler* assembler) {
691 Label fall_through;
692 __ movq(RAX, Address(RSP, + 1 * kWordSize));
693 __ testq(RAX, Immediate(kSmiTagMask));
694 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); // Non-smi value.
695 __ negq(RAX);
696 __ j(OVERFLOW, &fall_through, Assembler::kNearJump);
697 // Result is in RAX.
698 __ ret();
699 __ Bind(&fall_through);
700 return false;
701 }
702
703
704 bool Intrinsifier::Integer_bitAndFromInteger(Assembler* assembler) { 690 bool Intrinsifier::Integer_bitAndFromInteger(Assembler* assembler) {
705 Label fall_through; 691 Label fall_through;
706 TestBothArgumentsSmis(assembler, &fall_through); 692 TestBothArgumentsSmis(assembler, &fall_through);
707 // RAX is the right argument. 693 // RAX is the right argument.
708 __ andq(RAX, Address(RSP, + 2 * kWordSize)); 694 __ andq(RAX, Address(RSP, + 2 * kWordSize));
709 // Result is in RAX. 695 // Result is in RAX.
710 __ ret(); 696 __ ret();
711 __ Bind(&fall_through); 697 __ Bind(&fall_through);
712 return false; 698 return false;
713 } 699 }
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 __ LoadObject(RAX, bool_true); 1403 __ LoadObject(RAX, bool_true);
1418 __ ret(); 1404 __ ret();
1419 return true; 1405 return true;
1420 } 1406 }
1421 1407
1422 #undef __ 1408 #undef __
1423 1409
1424 } // namespace dart 1410 } // namespace dart
1425 1411
1426 #endif // defined TARGET_ARCH_X64 1412 #endif // defined TARGET_ARCH_X64
OLDNEW
« runtime/vm/intrinsifier_ia32.cc ('K') | « runtime/vm/intrinsifier_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698