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

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

Issue 1322843005: Remove obsolete functionality from the MacroAssemblers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm64. 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/ia32/macro-assembler-ia32.h ('k') | src/mips/macro-assembler-mips.h » ('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 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_IA32 5 #if V8_TARGET_ARCH_IA32
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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 Condition MacroAssembler::IsObjectNameType(Register heap_object, 745 Condition MacroAssembler::IsObjectNameType(Register heap_object,
746 Register map, 746 Register map,
747 Register instance_type) { 747 Register instance_type) {
748 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); 748 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset));
749 movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); 749 movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset));
750 cmpb(instance_type, static_cast<uint8_t>(LAST_NAME_TYPE)); 750 cmpb(instance_type, static_cast<uint8_t>(LAST_NAME_TYPE));
751 return below_equal; 751 return below_equal;
752 } 752 }
753 753
754 754
755 void MacroAssembler::IsObjectJSObjectType(Register heap_object,
756 Register map,
757 Register scratch,
758 Label* fail) {
759 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset));
760 IsInstanceJSObjectType(map, scratch, fail);
761 }
762
763
764 void MacroAssembler::IsInstanceJSObjectType(Register map,
765 Register scratch,
766 Label* fail) {
767 movzx_b(scratch, FieldOperand(map, Map::kInstanceTypeOffset));
768 sub(scratch, Immediate(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE));
769 cmp(scratch,
770 LAST_NONCALLABLE_SPEC_OBJECT_TYPE - FIRST_NONCALLABLE_SPEC_OBJECT_TYPE);
771 j(above, fail);
772 }
773
774
775 void MacroAssembler::FCmp() { 755 void MacroAssembler::FCmp() {
776 fucomip(); 756 fucomip();
777 fstp(0); 757 fstp(0);
778 } 758 }
779 759
780 760
781 void MacroAssembler::AssertNumber(Register object) { 761 void MacroAssembler::AssertNumber(Register object) {
782 if (emit_debug_code()) { 762 if (emit_debug_code()) {
783 Label ok; 763 Label ok;
784 JumpIfSmi(object, &ok); 764 JumpIfSmi(object, &ok);
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1777 j(sign, then_label); 1757 j(sign, then_label);
1778 bind(&ok); 1758 bind(&ok);
1779 } 1759 }
1780 1760
1781 1761
1782 void MacroAssembler::GetMapConstructor(Register result, Register map, 1762 void MacroAssembler::GetMapConstructor(Register result, Register map,
1783 Register temp) { 1763 Register temp) {
1784 Label done, loop; 1764 Label done, loop;
1785 mov(result, FieldOperand(map, Map::kConstructorOrBackPointerOffset)); 1765 mov(result, FieldOperand(map, Map::kConstructorOrBackPointerOffset));
1786 bind(&loop); 1766 bind(&loop);
1787 JumpIfSmi(result, &done); 1767 JumpIfSmi(result, &done, Label::kNear);
1788 CmpObjectType(result, MAP_TYPE, temp); 1768 CmpObjectType(result, MAP_TYPE, temp);
1789 j(not_equal, &done); 1769 j(not_equal, &done, Label::kNear);
1790 mov(result, FieldOperand(result, Map::kConstructorOrBackPointerOffset)); 1770 mov(result, FieldOperand(result, Map::kConstructorOrBackPointerOffset));
1791 jmp(&loop); 1771 jmp(&loop);
1792 bind(&done); 1772 bind(&done);
1793 } 1773 }
1794 1774
1795 1775
1796 void MacroAssembler::TryGetFunctionPrototype(Register function, Register result, 1776 void MacroAssembler::TryGetFunctionPrototype(Register function, Register result,
1797 Register scratch, Label* miss) { 1777 Register scratch, Label* miss) {
1798 // Get the prototype or initial map from the function. 1778 // Get the prototype or initial map from the function.
1799 mov(result, 1779 mov(result,
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
3183 mov(eax, dividend); 3163 mov(eax, dividend);
3184 shr(eax, 31); 3164 shr(eax, 31);
3185 add(edx, eax); 3165 add(edx, eax);
3186 } 3166 }
3187 3167
3188 3168
3189 } // namespace internal 3169 } // namespace internal
3190 } // namespace v8 3170 } // namespace v8
3191 3171
3192 #endif // V8_TARGET_ARCH_IA32 3172 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698