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 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1613 Register left = ToRegister(instr->InputAt(0)); | 1613 Register left = ToRegister(instr->InputAt(0)); |
1614 Register right = ToRegister(instr->InputAt(1)); | 1614 Register right = ToRegister(instr->InputAt(1)); |
1615 int false_block = chunk_->LookupDestination(instr->false_block_id()); | 1615 int false_block = chunk_->LookupDestination(instr->false_block_id()); |
1616 int true_block = chunk_->LookupDestination(instr->true_block_id()); | 1616 int true_block = chunk_->LookupDestination(instr->true_block_id()); |
1617 | 1617 |
1618 __ cmp(left, Operand(right)); | 1618 __ cmp(left, Operand(right)); |
1619 EmitBranch(true_block, false_block, eq); | 1619 EmitBranch(true_block, false_block, eq); |
1620 } | 1620 } |
1621 | 1621 |
1622 | 1622 |
| 1623 void LCodeGen::DoCmpSymbolEq(LCmpSymbolEq* instr) { |
| 1624 Register left = ToRegister(instr->InputAt(0)); |
| 1625 Register right = ToRegister(instr->InputAt(1)); |
| 1626 Register result = ToRegister(instr->result()); |
| 1627 |
| 1628 __ cmp(left, Operand(right)); |
| 1629 __ LoadRoot(result, Heap::kTrueValueRootIndex, eq); |
| 1630 __ LoadRoot(result, Heap::kFalseValueRootIndex, ne); |
| 1631 } |
| 1632 |
| 1633 |
| 1634 void LCodeGen::DoCmpSymbolEqAndBranch(LCmpSymbolEqAndBranch* instr) { |
| 1635 Register left = ToRegister(instr->InputAt(0)); |
| 1636 Register right = ToRegister(instr->InputAt(1)); |
| 1637 int false_block = chunk_->LookupDestination(instr->false_block_id()); |
| 1638 int true_block = chunk_->LookupDestination(instr->true_block_id()); |
| 1639 |
| 1640 __ cmp(left, Operand(right)); |
| 1641 EmitBranch(true_block, false_block, eq); |
| 1642 } |
| 1643 |
| 1644 |
1623 void LCodeGen::DoIsNull(LIsNull* instr) { | 1645 void LCodeGen::DoIsNull(LIsNull* instr) { |
1624 Register reg = ToRegister(instr->InputAt(0)); | 1646 Register reg = ToRegister(instr->InputAt(0)); |
1625 Register result = ToRegister(instr->result()); | 1647 Register result = ToRegister(instr->result()); |
1626 | 1648 |
1627 __ LoadRoot(ip, Heap::kNullValueRootIndex); | 1649 __ LoadRoot(ip, Heap::kNullValueRootIndex); |
1628 __ cmp(reg, ip); | 1650 __ cmp(reg, ip); |
1629 if (instr->is_strict()) { | 1651 if (instr->is_strict()) { |
1630 __ LoadRoot(result, Heap::kTrueValueRootIndex, eq); | 1652 __ LoadRoot(result, Heap::kTrueValueRootIndex, eq); |
1631 __ LoadRoot(result, Heap::kFalseValueRootIndex, ne); | 1653 __ LoadRoot(result, Heap::kFalseValueRootIndex, ne); |
1632 } else { | 1654 } else { |
(...skipping 2727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4360 ASSERT(osr_pc_offset_ == -1); | 4382 ASSERT(osr_pc_offset_ == -1); |
4361 osr_pc_offset_ = masm()->pc_offset(); | 4383 osr_pc_offset_ = masm()->pc_offset(); |
4362 } | 4384 } |
4363 | 4385 |
4364 | 4386 |
4365 | 4387 |
4366 | 4388 |
4367 #undef __ | 4389 #undef __ |
4368 | 4390 |
4369 } } // namespace v8::internal | 4391 } } // namespace v8::internal |
OLD | NEW |