| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 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 2530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2541 __ testb(FieldOperand(temp, Map::kBitFieldOffset), | 2541 __ testb(FieldOperand(temp, Map::kBitFieldOffset), |
| 2542 Immediate(1 << Map::kIsUndetectable)); | 2542 Immediate(1 << Map::kIsUndetectable)); |
| 2543 EmitBranch(instr, not_zero); | 2543 EmitBranch(instr, not_zero); |
| 2544 } | 2544 } |
| 2545 | 2545 |
| 2546 | 2546 |
| 2547 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { | 2547 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
| 2548 DCHECK(ToRegister(instr->context()).is(rsi)); | 2548 DCHECK(ToRegister(instr->context()).is(rsi)); |
| 2549 Token::Value op = instr->op(); | 2549 Token::Value op = instr->op(); |
| 2550 | 2550 |
| 2551 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); | 2551 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code(); |
| 2552 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2552 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2553 | 2553 |
| 2554 Condition condition = TokenToCondition(op, false); | 2554 Condition condition = TokenToCondition(op, false); |
| 2555 __ testp(rax, rax); | 2555 __ testp(rax, rax); |
| 2556 | 2556 |
| 2557 EmitBranch(instr, condition); | 2557 EmitBranch(instr, condition); |
| 2558 } | 2558 } |
| 2559 | 2559 |
| 2560 | 2560 |
| 2561 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { | 2561 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2825 __ bind(&load_false); | 2825 __ bind(&load_false); |
| 2826 __ LoadRoot(rax, Heap::kFalseValueRootIndex); | 2826 __ LoadRoot(rax, Heap::kFalseValueRootIndex); |
| 2827 __ bind(&done); | 2827 __ bind(&done); |
| 2828 } | 2828 } |
| 2829 | 2829 |
| 2830 | 2830 |
| 2831 void LCodeGen::DoCmpT(LCmpT* instr) { | 2831 void LCodeGen::DoCmpT(LCmpT* instr) { |
| 2832 DCHECK(ToRegister(instr->context()).is(rsi)); | 2832 DCHECK(ToRegister(instr->context()).is(rsi)); |
| 2833 Token::Value op = instr->op(); | 2833 Token::Value op = instr->op(); |
| 2834 | 2834 |
| 2835 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); | 2835 Handle<Code> ic = |
| 2836 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code(); |
| 2836 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2837 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2837 | 2838 |
| 2838 Condition condition = TokenToCondition(op, false); | 2839 Condition condition = TokenToCondition(op, false); |
| 2839 Label true_value, done; | 2840 Label true_value, done; |
| 2840 __ testp(rax, rax); | 2841 __ testp(rax, rax); |
| 2841 __ j(condition, &true_value, Label::kNear); | 2842 __ j(condition, &true_value, Label::kNear); |
| 2842 __ LoadRoot(ToRegister(instr->result()), Heap::kFalseValueRootIndex); | 2843 __ LoadRoot(ToRegister(instr->result()), Heap::kFalseValueRootIndex); |
| 2843 __ jmp(&done, Label::kNear); | 2844 __ jmp(&done, Label::kNear); |
| 2844 __ bind(&true_value); | 2845 __ bind(&true_value); |
| 2845 __ LoadRoot(ToRegister(instr->result()), Heap::kTrueValueRootIndex); | 2846 __ LoadRoot(ToRegister(instr->result()), Heap::kTrueValueRootIndex); |
| (...skipping 3107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5953 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5954 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5954 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5955 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5955 } | 5956 } |
| 5956 | 5957 |
| 5957 | 5958 |
| 5958 #undef __ | 5959 #undef __ |
| 5959 | 5960 |
| 5960 } } // namespace v8::internal | 5961 } } // namespace v8::internal |
| 5961 | 5962 |
| 5962 #endif // V8_TARGET_ARCH_X64 | 5963 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |