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

Side by Side Diff: src/compiler/instruction-codes.h

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/compiler/instruction.cc ('k') | src/compiler/instruction-selector.h » ('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 #ifndef V8_COMPILER_INSTRUCTION_CODES_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_CODES_H_
6 #define V8_COMPILER_INSTRUCTION_CODES_H_ 6 #define V8_COMPILER_INSTRUCTION_CODES_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #if V8_TARGET_ARCH_ARM 10 #if V8_TARGET_ARCH_ARM
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 }; 145 };
146 146
147 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, 147 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
148 const AddressingMode& am); 148 const AddressingMode& am);
149 149
150 // The mode of the flags continuation (see below). 150 // The mode of the flags continuation (see below).
151 enum FlagsMode { 151 enum FlagsMode {
152 kFlags_none = 0, 152 kFlags_none = 0,
153 kFlags_branch = 1, 153 kFlags_branch = 1,
154 kFlags_deoptimize = 2, 154 kFlags_deoptimize = 2,
155 kFlags_set = 3 155 kFlags_set = 3,
156 kFlags_trap = 4
156 }; 157 };
157 158
158 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, 159 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
159 const FlagsMode& fm); 160 const FlagsMode& fm);
160 161
161 // The condition of flags continuation (see below). 162 // The condition of flags continuation (see below).
162 enum FlagsCondition { 163 enum FlagsCondition {
163 kEqual, 164 kEqual,
164 kNotEqual, 165 kNotEqual,
165 kSignedLessThan, 166 kSignedLessThan,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // interesting to the register allocator, as the inputs and flags on the 201 // interesting to the register allocator, as the inputs and flags on the
201 // instructions specify everything of interest. 202 // instructions specify everything of interest.
202 typedef int32_t InstructionCode; 203 typedef int32_t InstructionCode;
203 204
204 // Helpers for encoding / decoding InstructionCode into the fields needed 205 // Helpers for encoding / decoding InstructionCode into the fields needed
205 // for code generation. We encode the instruction, addressing mode, and flags 206 // for code generation. We encode the instruction, addressing mode, and flags
206 // continuation into a single InstructionCode which is stored as part of 207 // continuation into a single InstructionCode which is stored as part of
207 // the instruction. 208 // the instruction.
208 typedef BitField<ArchOpcode, 0, 8> ArchOpcodeField; 209 typedef BitField<ArchOpcode, 0, 8> ArchOpcodeField;
209 typedef BitField<AddressingMode, 8, 5> AddressingModeField; 210 typedef BitField<AddressingMode, 8, 5> AddressingModeField;
210 typedef BitField<FlagsMode, 13, 2> FlagsModeField; 211 typedef BitField<FlagsMode, 13, 3> FlagsModeField;
211 typedef BitField<FlagsCondition, 15, 5> FlagsConditionField; 212 typedef BitField<FlagsCondition, 16, 5> FlagsConditionField;
212 typedef BitField<int, 20, 12> MiscField; 213 typedef BitField<int, 21, 11> MiscField;
213 214
214 } // namespace compiler 215 } // namespace compiler
215 } // namespace internal 216 } // namespace internal
216 } // namespace v8 217 } // namespace v8
217 218
218 #endif // V8_COMPILER_INSTRUCTION_CODES_H_ 219 #endif // V8_COMPILER_INSTRUCTION_CODES_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/instruction-selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698