OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2597 | 2597 |
2598 | 2598 |
2599 void LCodeGen::DoInstanceSize(LInstanceSize* instr) { | 2599 void LCodeGen::DoInstanceSize(LInstanceSize* instr) { |
2600 Register object = ToRegister(instr->object()); | 2600 Register object = ToRegister(instr->object()); |
2601 Register result = ToRegister(instr->result()); | 2601 Register result = ToRegister(instr->result()); |
2602 __ movq(result, FieldOperand(object, HeapObject::kMapOffset)); | 2602 __ movq(result, FieldOperand(object, HeapObject::kMapOffset)); |
2603 __ movzxbq(result, FieldOperand(result, Map::kInstanceSizeOffset)); | 2603 __ movzxbq(result, FieldOperand(result, Map::kInstanceSizeOffset)); |
2604 } | 2604 } |
2605 | 2605 |
2606 | 2606 |
2607 void LCodeGen::DoCmpT(LCmpT* instr) { | 2607 void LCodeGen::DoCompareGenericAndBranch(LCompareGenericAndBranch* instr) { |
2608 Token::Value op = instr->op(); | 2608 Token::Value op = instr->op(); |
2609 | 2609 |
2610 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op); | 2610 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op); |
2611 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2611 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2612 | 2612 |
2613 Condition condition = TokenToCondition(op, false); | 2613 Condition condition = TokenToCondition(op, false); |
2614 Label true_value, done; | 2614 Label true_value, done; |
2615 __ testq(rax, rax); | 2615 __ testq(rax, rax); |
2616 __ j(condition, &true_value, Label::kNear); | 2616 EmitBranch(instr, condition); |
2617 __ LoadRoot(ToRegister(instr->result()), Heap::kFalseValueRootIndex); | |
2618 __ jmp(&done, Label::kNear); | |
2619 __ bind(&true_value); | |
2620 __ LoadRoot(ToRegister(instr->result()), Heap::kTrueValueRootIndex); | |
2621 __ bind(&done); | |
2622 } | 2617 } |
2623 | 2618 |
2624 | 2619 |
2625 void LCodeGen::DoReturn(LReturn* instr) { | 2620 void LCodeGen::DoReturn(LReturn* instr) { |
2626 if (FLAG_trace && info()->IsOptimizing()) { | 2621 if (FLAG_trace && info()->IsOptimizing()) { |
2627 // Preserve the return value on the stack and rely on the runtime | 2622 // Preserve the return value on the stack and rely on the runtime |
2628 // call to return the value in the same register. | 2623 // call to return the value in the same register. |
2629 __ push(rax); | 2624 __ push(rax); |
2630 __ CallRuntime(Runtime::kTraceExit, 1); | 2625 __ CallRuntime(Runtime::kTraceExit, 1); |
2631 } | 2626 } |
(...skipping 2884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5516 FixedArray::kHeaderSize - kPointerSize)); | 5511 FixedArray::kHeaderSize - kPointerSize)); |
5517 __ bind(&done); | 5512 __ bind(&done); |
5518 } | 5513 } |
5519 | 5514 |
5520 | 5515 |
5521 #undef __ | 5516 #undef __ |
5522 | 5517 |
5523 } } // namespace v8::internal | 5518 } } // namespace v8::internal |
5524 | 5519 |
5525 #endif // V8_TARGET_ARCH_X64 | 5520 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |