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

Side by Side Diff: src/x87/macro-assembler-x87.cc

Issue 1321653004: X87: Remove obsolete functionality from the MacroAssemblers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « src/x87/macro-assembler-x87.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 Condition MacroAssembler::IsObjectNameType(Register heap_object, 658 Condition MacroAssembler::IsObjectNameType(Register heap_object,
659 Register map, 659 Register map,
660 Register instance_type) { 660 Register instance_type) {
661 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); 661 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset));
662 movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); 662 movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset));
663 cmpb(instance_type, static_cast<uint8_t>(LAST_NAME_TYPE)); 663 cmpb(instance_type, static_cast<uint8_t>(LAST_NAME_TYPE));
664 return below_equal; 664 return below_equal;
665 } 665 }
666 666
667 667
668 void MacroAssembler::IsObjectJSObjectType(Register heap_object,
669 Register map,
670 Register scratch,
671 Label* fail) {
672 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset));
673 IsInstanceJSObjectType(map, scratch, fail);
674 }
675
676
677 void MacroAssembler::IsInstanceJSObjectType(Register map,
678 Register scratch,
679 Label* fail) {
680 movzx_b(scratch, FieldOperand(map, Map::kInstanceTypeOffset));
681 sub(scratch, Immediate(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE));
682 cmp(scratch,
683 LAST_NONCALLABLE_SPEC_OBJECT_TYPE - FIRST_NONCALLABLE_SPEC_OBJECT_TYPE);
684 j(above, fail);
685 }
686
687
688 void MacroAssembler::FCmp() { 668 void MacroAssembler::FCmp() {
689 fucompp(); 669 fucompp();
690 push(eax); 670 push(eax);
691 fnstsw_ax(); 671 fnstsw_ax();
692 sahf(); 672 sahf();
693 pop(eax); 673 pop(eax);
694 } 674 }
695 675
696 676
697 void MacroAssembler::FXamMinusZero() { 677 void MacroAssembler::FXamMinusZero() {
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 j(sign, then_label); 1723 j(sign, then_label);
1744 bind(&ok); 1724 bind(&ok);
1745 } 1725 }
1746 1726
1747 1727
1748 void MacroAssembler::GetMapConstructor(Register result, Register map, 1728 void MacroAssembler::GetMapConstructor(Register result, Register map,
1749 Register temp) { 1729 Register temp) {
1750 Label done, loop; 1730 Label done, loop;
1751 mov(result, FieldOperand(map, Map::kConstructorOrBackPointerOffset)); 1731 mov(result, FieldOperand(map, Map::kConstructorOrBackPointerOffset));
1752 bind(&loop); 1732 bind(&loop);
1753 JumpIfSmi(result, &done); 1733 JumpIfSmi(result, &done, Label::kNear);
1754 CmpObjectType(result, MAP_TYPE, temp); 1734 CmpObjectType(result, MAP_TYPE, temp);
1755 j(not_equal, &done); 1735 j(not_equal, &done, Label::kNear);
1756 mov(result, FieldOperand(result, Map::kConstructorOrBackPointerOffset)); 1736 mov(result, FieldOperand(result, Map::kConstructorOrBackPointerOffset));
1757 jmp(&loop); 1737 jmp(&loop);
1758 bind(&done); 1738 bind(&done);
1759 } 1739 }
1760 1740
1761 1741
1762 void MacroAssembler::TryGetFunctionPrototype(Register function, Register result, 1742 void MacroAssembler::TryGetFunctionPrototype(Register function, Register result,
1763 Register scratch, Label* miss) { 1743 Register scratch, Label* miss) {
1764 // Get the prototype or initial map from the function. 1744 // Get the prototype or initial map from the function.
1765 mov(result, 1745 mov(result,
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
3060 mov(eax, dividend); 3040 mov(eax, dividend);
3061 shr(eax, 31); 3041 shr(eax, 31);
3062 add(edx, eax); 3042 add(edx, eax);
3063 } 3043 }
3064 3044
3065 3045
3066 } // namespace internal 3046 } // namespace internal
3067 } // namespace v8 3047 } // namespace v8
3068 3048
3069 #endif // V8_TARGET_ARCH_X87 3049 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/macro-assembler-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698