| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 int ToInteger32(LConstantOperand* op) const; | 169 int ToInteger32(LConstantOperand* op) const; |
| 170 Operand ToOperand(LOperand* op) const; | 170 Operand ToOperand(LOperand* op) const; |
| 171 Immediate ToImmediate(LOperand* op); | 171 Immediate ToImmediate(LOperand* op); |
| 172 | 172 |
| 173 // Specific math operations - used from DoUnaryMathOperation. | 173 // Specific math operations - used from DoUnaryMathOperation. |
| 174 void DoMathAbs(LUnaryMathOperation* instr); | 174 void DoMathAbs(LUnaryMathOperation* instr); |
| 175 void DoMathFloor(LUnaryMathOperation* instr); | 175 void DoMathFloor(LUnaryMathOperation* instr); |
| 176 void DoMathRound(LUnaryMathOperation* instr); | 176 void DoMathRound(LUnaryMathOperation* instr); |
| 177 void DoMathSqrt(LUnaryMathOperation* instr); | 177 void DoMathSqrt(LUnaryMathOperation* instr); |
| 178 void DoMathPowHalf(LUnaryMathOperation* instr); | 178 void DoMathPowHalf(LUnaryMathOperation* instr); |
| 179 void DoMathLog(LUnaryMathOperation* instr); |
| 180 void DoMathCos(LUnaryMathOperation* instr); |
| 181 void DoMathSin(LUnaryMathOperation* instr); |
| 179 | 182 |
| 180 // Support for recording safepoint and position information. | 183 // Support for recording safepoint and position information. |
| 181 void RecordSafepoint(LPointerMap* pointers, int deoptimization_index); | 184 void RecordSafepoint(LPointerMap* pointers, int deoptimization_index); |
| 182 void RecordSafepointWithRegisters(LPointerMap* pointers, | 185 void RecordSafepointWithRegisters(LPointerMap* pointers, |
| 183 int arguments, | 186 int arguments, |
| 184 int deoptimization_index); | 187 int deoptimization_index); |
| 185 void RecordPosition(int position); | 188 void RecordPosition(int position); |
| 186 | 189 |
| 187 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 190 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
| 188 void EmitGoto(int block, LDeferredCode* deferred_stack_check = NULL); | 191 void EmitGoto(int block, LDeferredCode* deferred_stack_check = NULL); |
| 189 void EmitBranch(int left_block, int right_block, Condition cc); | 192 void EmitBranch(int left_block, int right_block, Condition cc); |
| 190 void EmitCmpI(LOperand* left, LOperand* right); | 193 void EmitCmpI(LOperand* left, LOperand* right); |
| 191 void EmitNumberUntagD(Register input, XMMRegister result, LEnvironment* env); | 194 void EmitNumberUntagD(Register input, XMMRegister result, LEnvironment* env); |
| 192 | 195 |
| 193 // Emits optimized code for typeof x == "y". Modifies input register. | 196 // Emits optimized code for typeof x == "y". Modifies input register. |
| 194 // Returns the condition on which a final split to | 197 // Returns the condition on which a final split to |
| 195 // true and false label should be made, to optimize fallthrough. | 198 // true and false label should be made, to optimize fallthrough. |
| 196 Condition EmitTypeofIs(Label* true_label, Label* false_label, | 199 Condition EmitTypeofIs(Label* true_label, Label* false_label, |
| 197 Register input, Handle<String> type_name); | 200 Register input, Handle<String> type_name); |
| 198 | 201 |
| 202 // Emits optimized code for %_IsObject(x). Preserves input register. |
| 203 // Returns the condition on which a final split to |
| 204 // true and false label should be made, to optimize fallthrough. |
| 205 Condition EmitIsObject(Register input, |
| 206 Register temp1, |
| 207 Register temp2, |
| 208 Label* is_not_object, |
| 209 Label* is_object); |
| 210 |
| 199 LChunk* const chunk_; | 211 LChunk* const chunk_; |
| 200 MacroAssembler* const masm_; | 212 MacroAssembler* const masm_; |
| 201 CompilationInfo* const info_; | 213 CompilationInfo* const info_; |
| 202 | 214 |
| 203 int current_block_; | 215 int current_block_; |
| 204 int current_instruction_; | 216 int current_instruction_; |
| 205 const ZoneList<LInstruction*>* instructions_; | 217 const ZoneList<LInstruction*>* instructions_; |
| 206 ZoneList<LEnvironment*> deoptimizations_; | 218 ZoneList<LEnvironment*> deoptimizations_; |
| 207 ZoneList<Handle<Object> > deoptimization_literals_; | 219 ZoneList<Handle<Object> > deoptimization_literals_; |
| 208 int inlined_function_count_; | 220 int inlined_function_count_; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 private: | 256 private: |
| 245 LCodeGen* codegen_; | 257 LCodeGen* codegen_; |
| 246 Label entry_; | 258 Label entry_; |
| 247 Label exit_; | 259 Label exit_; |
| 248 Label* external_exit_; | 260 Label* external_exit_; |
| 249 }; | 261 }; |
| 250 | 262 |
| 251 } } // namespace v8::internal | 263 } } // namespace v8::internal |
| 252 | 264 |
| 253 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 265 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ |
| OLD | NEW |