OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
169 case ge: | 169 case ge: |
170 return le; | 170 return le; |
171 case le: | 171 case le: |
172 return ge; | 172 return ge; |
173 default: | 173 default: |
174 return cond; | 174 return cond; |
175 }; | 175 }; |
176 } | 176 } |
177 | 177 |
178 | 178 |
179 inline bool EvalComparison(Condition cond, double op1, double op2) { | |
Mads Ager (chromium)
2011/07/27 13:05:05
Why not have this in the code generator and switch
Alexandre
2011/07/28 13:42:16
Done.
| |
180 switch (cond) { | |
181 case eq: return (op1 == op2); | |
182 case ne: return (op1 != op2); | |
183 case lt: return (op1 < op2); | |
184 case gt: return (op1 > op2); | |
185 case le: return (op1 <= op2); | |
186 case ge: return (op1 >= op2); | |
187 default: | |
188 UNREACHABLE(); | |
189 return false; | |
190 } | |
191 } | |
192 | |
193 | |
179 // ----------------------------------------------------------------------------- | 194 // ----------------------------------------------------------------------------- |
180 // Instructions encoding. | 195 // Instructions encoding. |
181 | 196 |
182 // Instr is merely used by the Assembler to distinguish 32bit integers | 197 // Instr is merely used by the Assembler to distinguish 32bit integers |
183 // representing instructions from usual 32 bit values. | 198 // representing instructions from usual 32 bit values. |
184 // Instruction objects are pointers to 32bit values, and provide methods to | 199 // Instruction objects are pointers to 32bit values, and provide methods to |
185 // access the various ISA fields. | 200 // access the various ISA fields. |
186 typedef int32_t Instr; | 201 typedef int32_t Instr; |
187 | 202 |
188 | 203 |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
766 static int Number(const char* name, bool* is_double); | 781 static int Number(const char* name, bool* is_double); |
767 | 782 |
768 private: | 783 private: |
769 static const char* names_[kNumVFPRegisters]; | 784 static const char* names_[kNumVFPRegisters]; |
770 }; | 785 }; |
771 | 786 |
772 | 787 |
773 } } // namespace v8::internal | 788 } } // namespace v8::internal |
774 | 789 |
775 #endif // V8_ARM_CONSTANTS_ARM_H_ | 790 #endif // V8_ARM_CONSTANTS_ARM_H_ |
OLD | NEW |