OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/crankshaft/x64/lithium-codegen-x64.h" | 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 5242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5253 AllocationFlags allocation_flags = NO_ALLOCATION_FLAGS; | 5253 AllocationFlags allocation_flags = NO_ALLOCATION_FLAGS; |
5254 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 5254 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
5255 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 5255 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
5256 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); | 5256 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); |
5257 } | 5257 } |
5258 // If the allocation folding dominator allocate triggered a GC, allocation | 5258 // If the allocation folding dominator allocate triggered a GC, allocation |
5259 // happend in the runtime. We have to reset the top pointer to virtually | 5259 // happend in the runtime. We have to reset the top pointer to virtually |
5260 // undo the allocation. | 5260 // undo the allocation. |
5261 ExternalReference allocation_top = | 5261 ExternalReference allocation_top = |
5262 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); | 5262 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); |
| 5263 __ subp(rax, Immediate(kHeapObjectTag)); |
5263 __ Store(allocation_top, rax); | 5264 __ Store(allocation_top, rax); |
| 5265 __ addp(rax, Immediate(kHeapObjectTag)); |
5264 } | 5266 } |
5265 } | 5267 } |
5266 | 5268 |
5267 | 5269 |
5268 void LCodeGen::DoTypeof(LTypeof* instr) { | 5270 void LCodeGen::DoTypeof(LTypeof* instr) { |
5269 DCHECK(ToRegister(instr->context()).is(rsi)); | 5271 DCHECK(ToRegister(instr->context()).is(rsi)); |
5270 DCHECK(ToRegister(instr->value()).is(rbx)); | 5272 DCHECK(ToRegister(instr->value()).is(rbx)); |
5271 Label end, do_call; | 5273 Label end, do_call; |
5272 Register value_register = ToRegister(instr->value()); | 5274 Register value_register = ToRegister(instr->value()); |
5273 __ JumpIfNotSmi(value_register, &do_call); | 5275 __ JumpIfNotSmi(value_register, &do_call); |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5623 __ bind(deferred->exit()); | 5625 __ bind(deferred->exit()); |
5624 __ bind(&done); | 5626 __ bind(&done); |
5625 } | 5627 } |
5626 | 5628 |
5627 #undef __ | 5629 #undef __ |
5628 | 5630 |
5629 } // namespace internal | 5631 } // namespace internal |
5630 } // namespace v8 | 5632 } // namespace v8 |
5631 | 5633 |
5632 #endif // V8_TARGET_ARCH_X64 | 5634 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |