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/instruction-codes.h

Issue 850653002: [turbofan] Improve code generation for unordered comparisons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months 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-impl.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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 kSignedLessThan, 95 kSignedLessThan,
96 kSignedGreaterThanOrEqual, 96 kSignedGreaterThanOrEqual,
97 kSignedLessThanOrEqual, 97 kSignedLessThanOrEqual,
98 kSignedGreaterThan, 98 kSignedGreaterThan,
99 kUnsignedLessThan, 99 kUnsignedLessThan,
100 kUnsignedGreaterThanOrEqual, 100 kUnsignedGreaterThanOrEqual,
101 kUnsignedLessThanOrEqual, 101 kUnsignedLessThanOrEqual,
102 kUnsignedGreaterThan, 102 kUnsignedGreaterThan,
103 kUnorderedEqual, 103 kUnorderedEqual,
104 kUnorderedNotEqual, 104 kUnorderedNotEqual,
105 kUnorderedLessThan,
106 kUnorderedGreaterThanOrEqual,
107 kUnorderedLessThanOrEqual,
108 kUnorderedGreaterThan,
109 kOverflow, 105 kOverflow,
110 kNotOverflow 106 kNotOverflow
111 }; 107 };
112 108
113 inline FlagsCondition NegateFlagsCondition(FlagsCondition condition) { 109 inline FlagsCondition NegateFlagsCondition(FlagsCondition condition) {
114 return static_cast<FlagsCondition>(condition ^ 1); 110 return static_cast<FlagsCondition>(condition ^ 1);
115 } 111 }
116 112
117 std::ostream& operator<<(std::ostream& os, const FlagsCondition& fc); 113 std::ostream& operator<<(std::ostream& os, const FlagsCondition& fc);
118 114
119 // The InstructionCode is an opaque, target-specific integer that encodes 115 // The InstructionCode is an opaque, target-specific integer that encodes
120 // what code to emit for an instruction in the code generator. It is not 116 // what code to emit for an instruction in the code generator. It is not
121 // interesting to the register allocator, as the inputs and flags on the 117 // interesting to the register allocator, as the inputs and flags on the
122 // instructions specify everything of interest. 118 // instructions specify everything of interest.
123 typedef int32_t InstructionCode; 119 typedef int32_t InstructionCode;
124 120
125 // Helpers for encoding / decoding InstructionCode into the fields needed 121 // Helpers for encoding / decoding InstructionCode into the fields needed
126 // for code generation. We encode the instruction, addressing mode, and flags 122 // for code generation. We encode the instruction, addressing mode, and flags
127 // continuation into a single InstructionCode which is stored as part of 123 // continuation into a single InstructionCode which is stored as part of
128 // the instruction. 124 // the instruction.
129 typedef BitField<ArchOpcode, 0, 7> ArchOpcodeField; 125 typedef BitField<ArchOpcode, 0, 7> ArchOpcodeField;
130 typedef BitField<AddressingMode, 7, 5> AddressingModeField; 126 typedef BitField<AddressingMode, 7, 5> AddressingModeField;
131 typedef BitField<FlagsMode, 12, 2> FlagsModeField; 127 typedef BitField<FlagsMode, 12, 2> FlagsModeField;
132 typedef BitField<FlagsCondition, 14, 5> FlagsConditionField; 128 typedef BitField<FlagsCondition, 14, 4> FlagsConditionField;
133 typedef BitField<int, 14, 18> MiscField; 129 typedef BitField<int, 14, 18> MiscField;
134 130
135 } // namespace compiler 131 } // namespace compiler
136 } // namespace internal 132 } // namespace internal
137 } // namespace v8 133 } // namespace v8
138 134
139 #endif // V8_COMPILER_INSTRUCTION_CODES_H_ 135 #endif // V8_COMPILER_INSTRUCTION_CODES_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/instruction-selector-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698