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 3428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3439 cmpb(instance_type, Immediate(static_cast<uint8_t>(LAST_NAME_TYPE))); | 3439 cmpb(instance_type, Immediate(static_cast<uint8_t>(LAST_NAME_TYPE))); |
3440 return below_equal; | 3440 return below_equal; |
3441 } | 3441 } |
3442 | 3442 |
3443 | 3443 |
3444 void MacroAssembler::GetMapConstructor(Register result, Register map, | 3444 void MacroAssembler::GetMapConstructor(Register result, Register map, |
3445 Register temp) { | 3445 Register temp) { |
3446 Label done, loop; | 3446 Label done, loop; |
3447 movp(result, FieldOperand(map, Map::kConstructorOrBackPointerOffset)); | 3447 movp(result, FieldOperand(map, Map::kConstructorOrBackPointerOffset)); |
3448 bind(&loop); | 3448 bind(&loop); |
3449 JumpIfSmi(result, &done); | 3449 JumpIfSmi(result, &done, Label::kNear); |
3450 CmpObjectType(result, MAP_TYPE, temp); | 3450 CmpObjectType(result, MAP_TYPE, temp); |
3451 j(not_equal, &done); | 3451 j(not_equal, &done, Label::kNear); |
3452 movp(result, FieldOperand(result, Map::kConstructorOrBackPointerOffset)); | 3452 movp(result, FieldOperand(result, Map::kConstructorOrBackPointerOffset)); |
3453 jmp(&loop); | 3453 jmp(&loop); |
3454 bind(&done); | 3454 bind(&done); |
3455 } | 3455 } |
3456 | 3456 |
3457 | 3457 |
3458 void MacroAssembler::TryGetFunctionPrototype(Register function, Register result, | 3458 void MacroAssembler::TryGetFunctionPrototype(Register function, Register result, |
3459 Label* miss) { | 3459 Label* miss) { |
3460 // Get the prototype or initial map from the function. | 3460 // Get the prototype or initial map from the function. |
3461 movp(result, | 3461 movp(result, |
(...skipping 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5047 movl(rax, dividend); | 5047 movl(rax, dividend); |
5048 shrl(rax, Immediate(31)); | 5048 shrl(rax, Immediate(31)); |
5049 addl(rdx, rax); | 5049 addl(rdx, rax); |
5050 } | 5050 } |
5051 | 5051 |
5052 | 5052 |
5053 } // namespace internal | 5053 } // namespace internal |
5054 } // namespace v8 | 5054 } // namespace v8 |
5055 | 5055 |
5056 #endif // V8_TARGET_ARCH_X64 | 5056 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |