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

Side by Side Diff: src/arm/lithium-codegen-arm.h

Issue 6625084: ARM: Improved double to integer truncation.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 void EmitIntegerMathAbs(LUnaryMathOperation* instr); 208 void EmitIntegerMathAbs(LUnaryMathOperation* instr);
209 void DoMathAbs(LUnaryMathOperation* instr); 209 void DoMathAbs(LUnaryMathOperation* instr);
210 void DoMathFloor(LUnaryMathOperation* instr); 210 void DoMathFloor(LUnaryMathOperation* instr);
211 void DoMathRound(LUnaryMathOperation* instr); 211 void DoMathRound(LUnaryMathOperation* instr);
212 void DoMathSqrt(LUnaryMathOperation* instr); 212 void DoMathSqrt(LUnaryMathOperation* instr);
213 void DoMathPowHalf(LUnaryMathOperation* instr); 213 void DoMathPowHalf(LUnaryMathOperation* instr);
214 void DoMathLog(LUnaryMathOperation* instr); 214 void DoMathLog(LUnaryMathOperation* instr);
215 void DoMathCos(LUnaryMathOperation* instr); 215 void DoMathCos(LUnaryMathOperation* instr);
216 void DoMathSin(LUnaryMathOperation* instr); 216 void DoMathSin(LUnaryMathOperation* instr);
217 217
218 // Helpers for math operations.
219
220 // Helper for EmitECMATruncate.
221 // Tries to truncate using a vcvt instruction.
222 enum TruncationType {
223 kUnsignedTruncation,
224 kSignedTruncation
225 };
226
227 void TryVcvtTruncation(Register result,
228 DwVfpRegister double_input,
229 Register saved_fpscr,
230 Register current_fpscr,
231 SwVfpRegister single_scratch,
232 TruncationType type,
233 Label* success);
234
235 // Performs a truncating conversion of a floating point number as used by
236 // the JS bitwise operations. See ECMA-262 9.5: ToInt32.
237 // Jumps to the 'done' label if the truncation is successful, and falls
238 // through if it was not.
239 void EmitECMATruncate(Register result,
240 Register scratch1,
241 Register scratch2,
242 DwVfpRegister double_input,
243 DwVfpRegister double_scratch1,
244 DwVfpRegister double_scratch2,
245 Label* done);
Karl Klose 2011/03/09 10:37:51 These functions should perhaps be in the macro ass
Alexandre 2011/03/15 08:45:39 Done.
246
218 // Support for recording safepoint and position information. 247 // Support for recording safepoint and position information.
219 void RecordSafepoint(LPointerMap* pointers, 248 void RecordSafepoint(LPointerMap* pointers,
220 Safepoint::Kind kind, 249 Safepoint::Kind kind,
221 int arguments, 250 int arguments,
222 int deoptimization_index); 251 int deoptimization_index);
223 void RecordSafepoint(LPointerMap* pointers, int deoptimization_index); 252 void RecordSafepoint(LPointerMap* pointers, int deoptimization_index);
224 void RecordSafepoint(int deoptimization_index); 253 void RecordSafepoint(int deoptimization_index);
225 void RecordSafepointWithRegisters(LPointerMap* pointers, 254 void RecordSafepointWithRegisters(LPointerMap* pointers,
226 int arguments, 255 int arguments,
227 int deoptimization_index); 256 int deoptimization_index);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 private: 337 private:
309 LCodeGen* codegen_; 338 LCodeGen* codegen_;
310 Label entry_; 339 Label entry_;
311 Label exit_; 340 Label exit_;
312 Label* external_exit_; 341 Label* external_exit_;
313 }; 342 };
314 343
315 } } // namespace v8::internal 344 } } // namespace v8::internal
316 345
317 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ 346 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698