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

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

Issue 1356283003: [arm64] Optimize fcmp when lhs operand is #0.0 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 kEqual, 107 kEqual,
108 kNotEqual, 108 kNotEqual,
109 kSignedLessThan, 109 kSignedLessThan,
110 kSignedGreaterThanOrEqual, 110 kSignedGreaterThanOrEqual,
111 kSignedLessThanOrEqual, 111 kSignedLessThanOrEqual,
112 kSignedGreaterThan, 112 kSignedGreaterThan,
113 kUnsignedLessThan, 113 kUnsignedLessThan,
114 kUnsignedGreaterThanOrEqual, 114 kUnsignedGreaterThanOrEqual,
115 kUnsignedLessThanOrEqual, 115 kUnsignedLessThanOrEqual,
116 kUnsignedGreaterThan, 116 kUnsignedGreaterThan,
117 kFloatLessThanOrUnordered,
118 kFloatGreaterThanOrEqual,
119 kFloatLessThanOrEqual,
120 kFloatGreaterThanOrUnordered,
121 kFloatLessThan,
122 kFloatGreaterThanOrEqualOrUnordered,
123 kFloatLessThanOrEqualOrUnordered,
124 kFloatGreaterThan,
117 kUnorderedEqual, 125 kUnorderedEqual,
118 kUnorderedNotEqual, 126 kUnorderedNotEqual,
119 kOverflow, 127 kOverflow,
120 kNotOverflow 128 kNotOverflow
121 }; 129 };
122 130
123 inline FlagsCondition NegateFlagsCondition(FlagsCondition condition) { 131 inline FlagsCondition NegateFlagsCondition(FlagsCondition condition) {
124 return static_cast<FlagsCondition>(condition ^ 1); 132 return static_cast<FlagsCondition>(condition ^ 1);
125 } 133 }
126 134
135 FlagsCondition CommuteFlagsCondition(FlagsCondition condition);
136
127 std::ostream& operator<<(std::ostream& os, const FlagsCondition& fc); 137 std::ostream& operator<<(std::ostream& os, const FlagsCondition& fc);
128 138
129 // The InstructionCode is an opaque, target-specific integer that encodes 139 // The InstructionCode is an opaque, target-specific integer that encodes
130 // what code to emit for an instruction in the code generator. It is not 140 // what code to emit for an instruction in the code generator. It is not
131 // interesting to the register allocator, as the inputs and flags on the 141 // interesting to the register allocator, as the inputs and flags on the
132 // instructions specify everything of interest. 142 // instructions specify everything of interest.
133 typedef int32_t InstructionCode; 143 typedef int32_t InstructionCode;
134 144
135 // Helpers for encoding / decoding InstructionCode into the fields needed 145 // Helpers for encoding / decoding InstructionCode into the fields needed
136 // for code generation. We encode the instruction, addressing mode, and flags 146 // for code generation. We encode the instruction, addressing mode, and flags
137 // continuation into a single InstructionCode which is stored as part of 147 // continuation into a single InstructionCode which is stored as part of
138 // the instruction. 148 // the instruction.
139 typedef BitField<ArchOpcode, 0, 8> ArchOpcodeField; 149 typedef BitField<ArchOpcode, 0, 8> ArchOpcodeField;
140 typedef BitField<AddressingMode, 8, 5> AddressingModeField; 150 typedef BitField<AddressingMode, 8, 5> AddressingModeField;
141 typedef BitField<FlagsMode, 13, 2> FlagsModeField; 151 typedef BitField<FlagsMode, 13, 2> FlagsModeField;
142 typedef BitField<FlagsCondition, 15, 4> FlagsConditionField; 152 typedef BitField<FlagsCondition, 15, 5> FlagsConditionField;
143 typedef BitField<int, 19, 13> MiscField; 153 typedef BitField<int, 20, 12> MiscField;
144 154
145 } // namespace compiler 155 } // namespace compiler
146 } // namespace internal 156 } // namespace internal
147 } // namespace v8 157 } // namespace v8
148 158
149 #endif // V8_COMPILER_INSTRUCTION_CODES_H_ 159 #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