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 5201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5212 | 5212 |
5213 void LCodeGen::DoTypeof(LTypeof* instr) { | 5213 void LCodeGen::DoTypeof(LTypeof* instr) { |
5214 DCHECK(ToRegister(instr->context()).is(rsi)); | 5214 DCHECK(ToRegister(instr->context()).is(rsi)); |
5215 DCHECK(ToRegister(instr->value()).is(rbx)); | 5215 DCHECK(ToRegister(instr->value()).is(rbx)); |
5216 Label end, do_call; | 5216 Label end, do_call; |
5217 Register value_register = ToRegister(instr->value()); | 5217 Register value_register = ToRegister(instr->value()); |
5218 __ JumpIfNotSmi(value_register, &do_call); | 5218 __ JumpIfNotSmi(value_register, &do_call); |
5219 __ Move(rax, isolate()->factory()->number_string()); | 5219 __ Move(rax, isolate()->factory()->number_string()); |
5220 __ jmp(&end); | 5220 __ jmp(&end); |
5221 __ bind(&do_call); | 5221 __ bind(&do_call); |
5222 TypeofStub stub(isolate()); | 5222 Callable callable = CodeFactory::Typeof(isolate()); |
5223 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5223 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); |
5224 __ bind(&end); | 5224 __ bind(&end); |
5225 } | 5225 } |
5226 | 5226 |
5227 | 5227 |
5228 void LCodeGen::EmitPushTaggedOperand(LOperand* operand) { | 5228 void LCodeGen::EmitPushTaggedOperand(LOperand* operand) { |
5229 DCHECK(!operand->IsDoubleRegister()); | 5229 DCHECK(!operand->IsDoubleRegister()); |
5230 if (operand->IsConstantOperand()) { | 5230 if (operand->IsConstantOperand()) { |
5231 __ Push(ToHandle(LConstantOperand::cast(operand))); | 5231 __ Push(ToHandle(LConstantOperand::cast(operand))); |
5232 } else if (operand->IsRegister()) { | 5232 } else if (operand->IsRegister()) { |
5233 __ Push(ToRegister(operand)); | 5233 __ Push(ToRegister(operand)); |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5568 __ bind(deferred->exit()); | 5568 __ bind(deferred->exit()); |
5569 __ bind(&done); | 5569 __ bind(&done); |
5570 } | 5570 } |
5571 | 5571 |
5572 #undef __ | 5572 #undef __ |
5573 | 5573 |
5574 } // namespace internal | 5574 } // namespace internal |
5575 } // namespace v8 | 5575 } // namespace v8 |
5576 | 5576 |
5577 #endif // V8_TARGET_ARCH_X64 | 5577 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |