OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1687 // Assembles boolean materializations after an instruction. | 1687 // Assembles boolean materializations after an instruction. |
1688 void CodeGenerator::AssembleArchBoolean(Instruction* instr, | 1688 void CodeGenerator::AssembleArchBoolean(Instruction* instr, |
1689 FlagsCondition condition) { | 1689 FlagsCondition condition) { |
1690 S390OperandConverter i(this, instr); | 1690 S390OperandConverter i(this, instr); |
1691 Label done; | 1691 Label done; |
1692 ArchOpcode op = instr->arch_opcode(); | 1692 ArchOpcode op = instr->arch_opcode(); |
1693 bool check_unordered = (op == kS390_CmpDouble || kS390_CmpFloat); | 1693 bool check_unordered = (op == kS390_CmpDouble || kS390_CmpFloat); |
1694 | 1694 |
1695 // Overflow checked for add/sub only. | 1695 // Overflow checked for add/sub only. |
1696 DCHECK((condition != kOverflow && condition != kNotOverflow) || | 1696 DCHECK((condition != kOverflow && condition != kNotOverflow) || |
1697 (op == kS390_AddWithOverflow32 || op == kS390_SubWithOverflow32)); | 1697 (op == kS390_AddWithOverflow32 || op == kS390_SubWithOverflow32) || |
| 1698 (op == kS390_Add || op == kS390_Sub)); |
1698 | 1699 |
1699 // Materialize a full 32-bit 1 or 0 value. The result register is always the | 1700 // Materialize a full 32-bit 1 or 0 value. The result register is always the |
1700 // last output of the instruction. | 1701 // last output of the instruction. |
1701 DCHECK_NE(0u, instr->OutputCount()); | 1702 DCHECK_NE(0u, instr->OutputCount()); |
1702 Register reg = i.OutputRegister(instr->OutputCount() - 1); | 1703 Register reg = i.OutputRegister(instr->OutputCount() - 1); |
1703 Condition cond = FlagsConditionToCondition(condition, op); | 1704 Condition cond = FlagsConditionToCondition(condition, op); |
1704 switch (cond) { | 1705 switch (cond) { |
1705 case ne: | 1706 case ne: |
1706 case ge: | 1707 case ge: |
1707 case gt: | 1708 case gt: |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2077 padding_size -= 2; | 2078 padding_size -= 2; |
2078 } | 2079 } |
2079 } | 2080 } |
2080 } | 2081 } |
2081 | 2082 |
2082 #undef __ | 2083 #undef __ |
2083 | 2084 |
2084 } // namespace compiler | 2085 } // namespace compiler |
2085 } // namespace internal | 2086 } // namespace internal |
2086 } // namespace v8 | 2087 } // namespace v8 |
OLD | NEW |