Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: src/compiler/arm/code-generator-arm.cc

Issue 2562393002: [wasm] Introduce the TrapIf and TrapUnless operators to generate trap code. (Closed)
Patch Set: Rename UseSourcePosition to IsSourcePositionUsed Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/assembler.cc ('k') | src/compiler/arm/instruction-selector-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/arm/macro-assembler-arm.h" 7 #include "src/arm/macro-assembler-arm.h"
8 #include "src/compilation-info.h" 8 #include "src/compilation-info.h"
9 #include "src/compiler/code-generator-impl.h" 9 #include "src/compiler/code-generator-impl.h"
10 #include "src/compiler/gap-resolver.h" 10 #include "src/compiler/gap-resolver.h"
(...skipping 14 matching lines...) Expand all
25 class ArmOperandConverter final : public InstructionOperandConverter { 25 class ArmOperandConverter final : public InstructionOperandConverter {
26 public: 26 public:
27 ArmOperandConverter(CodeGenerator* gen, Instruction* instr) 27 ArmOperandConverter(CodeGenerator* gen, Instruction* instr)
28 : InstructionOperandConverter(gen, instr) {} 28 : InstructionOperandConverter(gen, instr) {}
29 29
30 SBit OutputSBit() const { 30 SBit OutputSBit() const {
31 switch (instr_->flags_mode()) { 31 switch (instr_->flags_mode()) {
32 case kFlags_branch: 32 case kFlags_branch:
33 case kFlags_deoptimize: 33 case kFlags_deoptimize:
34 case kFlags_set: 34 case kFlags_set:
35 case kFlags_trap:
35 return SetCC; 36 return SetCC;
36 case kFlags_none: 37 case kFlags_none:
37 return LeaveCC; 38 return LeaveCC;
38 } 39 }
39 UNREACHABLE(); 40 UNREACHABLE();
40 return LeaveCC; 41 return LeaveCC;
41 } 42 }
42 43
43 Operand InputImmediate(size_t index) { 44 Operand InputImmediate(size_t index) {
44 Constant constant = ToConstant(instr_->InputAt(index)); 45 Constant constant = ToConstant(instr_->InputAt(index));
(...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 Condition cc = FlagsConditionToCondition(branch->condition); 1584 Condition cc = FlagsConditionToCondition(branch->condition);
1584 __ b(cc, tlabel); 1585 __ b(cc, tlabel);
1585 if (!branch->fallthru) __ b(flabel); // no fallthru to flabel. 1586 if (!branch->fallthru) __ b(flabel); // no fallthru to flabel.
1586 } 1587 }
1587 1588
1588 1589
1589 void CodeGenerator::AssembleArchJump(RpoNumber target) { 1590 void CodeGenerator::AssembleArchJump(RpoNumber target) {
1590 if (!IsNextInAssemblyOrder(target)) __ b(GetLabel(target)); 1591 if (!IsNextInAssemblyOrder(target)) __ b(GetLabel(target));
1591 } 1592 }
1592 1593
1594 void CodeGenerator::AssembleArchTrap(Instruction* instr,
1595 FlagsCondition condition) {
1596 UNREACHABLE();
1597 }
1593 1598
1594 // Assembles boolean materializations after an instruction. 1599 // Assembles boolean materializations after an instruction.
1595 void CodeGenerator::AssembleArchBoolean(Instruction* instr, 1600 void CodeGenerator::AssembleArchBoolean(Instruction* instr,
1596 FlagsCondition condition) { 1601 FlagsCondition condition) {
1597 ArmOperandConverter i(this, instr); 1602 ArmOperandConverter i(this, instr);
1598 1603
1599 // Materialize a full 32-bit 1 or 0 value. The result register is always the 1604 // Materialize a full 32-bit 1 or 0 value. The result register is always the
1600 // last output of the instruction. 1605 // last output of the instruction.
1601 DCHECK_NE(0u, instr->OutputCount()); 1606 DCHECK_NE(0u, instr->OutputCount());
1602 Register reg = i.OutputRegister(instr->OutputCount() - 1); 1607 Register reg = i.OutputRegister(instr->OutputCount() - 1);
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
2103 padding_size -= v8::internal::Assembler::kInstrSize; 2108 padding_size -= v8::internal::Assembler::kInstrSize;
2104 } 2109 }
2105 } 2110 }
2106 } 2111 }
2107 2112
2108 #undef __ 2113 #undef __
2109 2114
2110 } // namespace compiler 2115 } // namespace compiler
2111 } // namespace internal 2116 } // namespace internal
2112 } // namespace v8 2117 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/compiler/arm/instruction-selector-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698