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

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

Issue 745633002: [turbofan] Clean up and factor out branch generation logic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix IA32 fall through. Created 6 years, 1 month 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/ia32/instruction-selector-ia32.cc ('k') | src/compiler/instruction-selector.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 #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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 kUnorderedEqual, 91 kUnorderedEqual,
92 kUnorderedNotEqual, 92 kUnorderedNotEqual,
93 kUnorderedLessThan, 93 kUnorderedLessThan,
94 kUnorderedGreaterThanOrEqual, 94 kUnorderedGreaterThanOrEqual,
95 kUnorderedLessThanOrEqual, 95 kUnorderedLessThanOrEqual,
96 kUnorderedGreaterThan, 96 kUnorderedGreaterThan,
97 kOverflow, 97 kOverflow,
98 kNotOverflow 98 kNotOverflow
99 }; 99 };
100 100
101 inline FlagsCondition NegateFlagsCondition(FlagsCondition condition) {
102 return static_cast<FlagsCondition>(condition ^ 1);
103 }
104
101 std::ostream& operator<<(std::ostream& os, const FlagsCondition& fc); 105 std::ostream& operator<<(std::ostream& os, const FlagsCondition& fc);
102 106
103 // The InstructionCode is an opaque, target-specific integer that encodes 107 // The InstructionCode is an opaque, target-specific integer that encodes
104 // what code to emit for an instruction in the code generator. It is not 108 // what code to emit for an instruction in the code generator. It is not
105 // interesting to the register allocator, as the inputs and flags on the 109 // interesting to the register allocator, as the inputs and flags on the
106 // instructions specify everything of interest. 110 // instructions specify everything of interest.
107 typedef int32_t InstructionCode; 111 typedef int32_t InstructionCode;
108 112
109 // Helpers for encoding / decoding InstructionCode into the fields needed 113 // Helpers for encoding / decoding InstructionCode into the fields needed
110 // for code generation. We encode the instruction, addressing mode, and flags 114 // for code generation. We encode the instruction, addressing mode, and flags
111 // continuation into a single InstructionCode which is stored as part of 115 // continuation into a single InstructionCode which is stored as part of
112 // the instruction. 116 // the instruction.
113 typedef BitField<ArchOpcode, 0, 7> ArchOpcodeField; 117 typedef BitField<ArchOpcode, 0, 7> ArchOpcodeField;
114 typedef BitField<AddressingMode, 7, 5> AddressingModeField; 118 typedef BitField<AddressingMode, 7, 5> AddressingModeField;
115 typedef BitField<FlagsMode, 12, 2> FlagsModeField; 119 typedef BitField<FlagsMode, 12, 2> FlagsModeField;
116 typedef BitField<FlagsCondition, 14, 5> FlagsConditionField; 120 typedef BitField<FlagsCondition, 14, 5> FlagsConditionField;
117 typedef BitField<int, 14, 18> MiscField; 121 typedef BitField<int, 14, 18> MiscField;
118 122
119 } // namespace compiler 123 } // namespace compiler
120 } // namespace internal 124 } // namespace internal
121 } // namespace v8 125 } // namespace v8
122 126
123 #endif // V8_COMPILER_INSTRUCTION_CODES_H_ 127 #endif // V8_COMPILER_INSTRUCTION_CODES_H_
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698