OLD | NEW |
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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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 3934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3945 testb(object, Immediate(kSmiTagMask)); | 3945 testb(object, Immediate(kSmiTagMask)); |
3946 Check(not_equal, kOperandIsASmiAndNotABoundFunction); | 3946 Check(not_equal, kOperandIsASmiAndNotABoundFunction); |
3947 Push(object); | 3947 Push(object); |
3948 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); | 3948 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); |
3949 Pop(object); | 3949 Pop(object); |
3950 Check(equal, kOperandIsNotABoundFunction); | 3950 Check(equal, kOperandIsNotABoundFunction); |
3951 } | 3951 } |
3952 } | 3952 } |
3953 | 3953 |
3954 | 3954 |
| 3955 void MacroAssembler::AssertReceiver(Register object) { |
| 3956 if (emit_debug_code()) { |
| 3957 testb(object, Immediate(kSmiTagMask)); |
| 3958 Check(not_equal, kOperandIsASmiAndNotAReceiver); |
| 3959 Push(object); |
| 3960 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); |
| 3961 CmpObjectType(object, FIRST_JS_RECEIVER_TYPE, object); |
| 3962 Pop(object); |
| 3963 Check(above_equal, kOperandIsNotAReceiver); |
| 3964 } |
| 3965 } |
| 3966 |
| 3967 |
3955 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { | 3968 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { |
3956 if (emit_debug_code()) { | 3969 if (emit_debug_code()) { |
3957 Label done_checking; | 3970 Label done_checking; |
3958 AssertNotSmi(object); | 3971 AssertNotSmi(object); |
3959 Cmp(object, isolate()->factory()->undefined_value()); | 3972 Cmp(object, isolate()->factory()->undefined_value()); |
3960 j(equal, &done_checking); | 3973 j(equal, &done_checking); |
3961 Cmp(FieldOperand(object, 0), isolate()->factory()->allocation_site_map()); | 3974 Cmp(FieldOperand(object, 0), isolate()->factory()->allocation_site_map()); |
3962 Assert(equal, kExpectedUndefinedOrCell); | 3975 Assert(equal, kExpectedUndefinedOrCell); |
3963 bind(&done_checking); | 3976 bind(&done_checking); |
3964 } | 3977 } |
(...skipping 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5566 movl(rax, dividend); | 5579 movl(rax, dividend); |
5567 shrl(rax, Immediate(31)); | 5580 shrl(rax, Immediate(31)); |
5568 addl(rdx, rax); | 5581 addl(rdx, rax); |
5569 } | 5582 } |
5570 | 5583 |
5571 | 5584 |
5572 } // namespace internal | 5585 } // namespace internal |
5573 } // namespace v8 | 5586 } // namespace v8 |
5574 | 5587 |
5575 #endif // V8_TARGET_ARCH_X64 | 5588 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |