| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1707 __ b(vs, chunk_->GetAssemblyLabel(false_block)); | 1707 __ b(vs, chunk_->GetAssemblyLabel(false_block)); |
| 1708 } else { | 1708 } else { |
| 1709 EmitCmpI(left, right); | 1709 EmitCmpI(left, right); |
| 1710 } | 1710 } |
| 1711 | 1711 |
| 1712 Condition cc = TokenToCondition(instr->op(), instr->is_double()); | 1712 Condition cc = TokenToCondition(instr->op(), instr->is_double()); |
| 1713 EmitBranch(true_block, false_block, cc); | 1713 EmitBranch(true_block, false_block, cc); |
| 1714 } | 1714 } |
| 1715 | 1715 |
| 1716 | 1716 |
| 1717 void LCodeGen::DoCmpJSObjectEq(LCmpJSObjectEq* instr) { | 1717 void LCodeGen::DoCmpObjectEq(LCmpObjectEq* instr) { |
| 1718 Register left = ToRegister(instr->InputAt(0)); | 1718 Register left = ToRegister(instr->InputAt(0)); |
| 1719 Register right = ToRegister(instr->InputAt(1)); | 1719 Register right = ToRegister(instr->InputAt(1)); |
| 1720 Register result = ToRegister(instr->result()); | 1720 Register result = ToRegister(instr->result()); |
| 1721 | 1721 |
| 1722 __ cmp(left, Operand(right)); | 1722 __ cmp(left, Operand(right)); |
| 1723 __ LoadRoot(result, Heap::kTrueValueRootIndex, eq); | 1723 __ LoadRoot(result, Heap::kTrueValueRootIndex, eq); |
| 1724 __ LoadRoot(result, Heap::kFalseValueRootIndex, ne); | 1724 __ LoadRoot(result, Heap::kFalseValueRootIndex, ne); |
| 1725 } | 1725 } |
| 1726 | 1726 |
| 1727 | 1727 |
| 1728 void LCodeGen::DoCmpJSObjectEqAndBranch(LCmpJSObjectEqAndBranch* instr) { | 1728 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { |
| 1729 Register left = ToRegister(instr->InputAt(0)); | 1729 Register left = ToRegister(instr->InputAt(0)); |
| 1730 Register right = ToRegister(instr->InputAt(1)); | 1730 Register right = ToRegister(instr->InputAt(1)); |
| 1731 int false_block = chunk_->LookupDestination(instr->false_block_id()); | 1731 int false_block = chunk_->LookupDestination(instr->false_block_id()); |
| 1732 int true_block = chunk_->LookupDestination(instr->true_block_id()); | 1732 int true_block = chunk_->LookupDestination(instr->true_block_id()); |
| 1733 | 1733 |
| 1734 __ cmp(left, Operand(right)); | 1734 __ cmp(left, Operand(right)); |
| 1735 EmitBranch(true_block, false_block, eq); | 1735 EmitBranch(true_block, false_block, eq); |
| 1736 } | 1736 } |
| 1737 | 1737 |
| 1738 | 1738 |
| 1739 void LCodeGen::DoCmpSymbolEq(LCmpSymbolEq* instr) { | |
| 1740 Register left = ToRegister(instr->InputAt(0)); | |
| 1741 Register right = ToRegister(instr->InputAt(1)); | |
| 1742 Register result = ToRegister(instr->result()); | |
| 1743 | |
| 1744 __ cmp(left, Operand(right)); | |
| 1745 __ LoadRoot(result, Heap::kTrueValueRootIndex, eq); | |
| 1746 __ LoadRoot(result, Heap::kFalseValueRootIndex, ne); | |
| 1747 } | |
| 1748 | |
| 1749 | |
| 1750 void LCodeGen::DoCmpSymbolEqAndBranch(LCmpSymbolEqAndBranch* instr) { | |
| 1751 Register left = ToRegister(instr->InputAt(0)); | |
| 1752 Register right = ToRegister(instr->InputAt(1)); | |
| 1753 int false_block = chunk_->LookupDestination(instr->false_block_id()); | |
| 1754 int true_block = chunk_->LookupDestination(instr->true_block_id()); | |
| 1755 | |
| 1756 __ cmp(left, Operand(right)); | |
| 1757 EmitBranch(true_block, false_block, eq); | |
| 1758 } | |
| 1759 | |
| 1760 | |
| 1761 void LCodeGen::DoCmpConstantEq(LCmpConstantEq* instr) { | 1739 void LCodeGen::DoCmpConstantEq(LCmpConstantEq* instr) { |
| 1762 Register left = ToRegister(instr->InputAt(0)); | 1740 Register left = ToRegister(instr->InputAt(0)); |
| 1763 Register result = ToRegister(instr->result()); | 1741 Register result = ToRegister(instr->result()); |
| 1764 | 1742 |
| 1765 Label done; | 1743 Label done; |
| 1766 __ cmp(left, Operand(instr->hydrogen()->right())); | 1744 __ cmp(left, Operand(instr->hydrogen()->right())); |
| 1767 __ LoadRoot(result, Heap::kTrueValueRootIndex, eq); | 1745 __ LoadRoot(result, Heap::kTrueValueRootIndex, eq); |
| 1768 __ LoadRoot(result, Heap::kFalseValueRootIndex, ne); | 1746 __ LoadRoot(result, Heap::kFalseValueRootIndex, ne); |
| 1769 } | 1747 } |
| 1770 | 1748 |
| (...skipping 2853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4624 ASSERT(osr_pc_offset_ == -1); | 4602 ASSERT(osr_pc_offset_ == -1); |
| 4625 osr_pc_offset_ = masm()->pc_offset(); | 4603 osr_pc_offset_ = masm()->pc_offset(); |
| 4626 } | 4604 } |
| 4627 | 4605 |
| 4628 | 4606 |
| 4629 | 4607 |
| 4630 | 4608 |
| 4631 #undef __ | 4609 #undef __ |
| 4632 | 4610 |
| 4633 } } // namespace v8::internal | 4611 } } // namespace v8::internal |
| OLD | NEW |