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

Side by Side Diff: src/arm/macro-assembler-arm.h

Issue 23129003: Arm support for DoubleToIStub (truncating). (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Sync and rebased. Created 7 years, 4 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Don't tag 55 // Don't tag
56 DONT_TAG_RESULT 56 DONT_TAG_RESULT
57 }; 57 };
58 58
59 59
60 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; 60 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET };
61 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; 61 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK };
62 enum LinkRegisterStatus { kLRHasNotBeenSaved, kLRHasBeenSaved }; 62 enum LinkRegisterStatus { kLRHasNotBeenSaved, kLRHasBeenSaved };
63 63
64 64
65 Register GetRegisterThatIsNotOneOf(Register reg1,
66 Register reg2 = no_reg,
67 Register reg3 = no_reg,
68 Register reg4 = no_reg,
69 Register reg5 = no_reg,
70 Register reg6 = no_reg);
71
72
65 #ifdef DEBUG 73 #ifdef DEBUG
66 bool AreAliased(Register reg1, 74 bool AreAliased(Register reg1,
67 Register reg2, 75 Register reg2,
68 Register reg3 = no_reg, 76 Register reg3 = no_reg,
69 Register reg4 = no_reg, 77 Register reg4 = no_reg,
70 Register reg5 = no_reg, 78 Register reg5 = no_reg,
71 Register reg6 = no_reg); 79 Register reg6 = no_reg);
72 #endif 80 #endif
73 81
74 82
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 492
485 void Vmov(const DwVfpRegister dst, 493 void Vmov(const DwVfpRegister dst,
486 const double imm, 494 const double imm,
487 const Register scratch = no_reg); 495 const Register scratch = no_reg);
488 496
489 void VmovHigh(Register dst, DwVfpRegister src); 497 void VmovHigh(Register dst, DwVfpRegister src);
490 void VmovHigh(DwVfpRegister dst, Register src); 498 void VmovHigh(DwVfpRegister dst, Register src);
491 void VmovLow(Register dst, DwVfpRegister src); 499 void VmovLow(Register dst, DwVfpRegister src);
492 void VmovLow(DwVfpRegister dst, Register src); 500 void VmovLow(DwVfpRegister dst, Register src);
493 501
494 // Converts the smi or heap number in object to an int32 using the rules
495 // for ToInt32 as described in ECMAScript 9.5.: the value is truncated
496 // and brought into the range -2^31 .. +2^31 - 1.
497 void ConvertNumberToInt32(Register object,
498 Register dst,
499 Register heap_number_map,
500 Register scratch1,
501 Register scratch2,
502 Register scratch3,
503 DwVfpRegister double_scratch1,
504 LowDwVfpRegister double_scratch2,
505 Label* not_int32);
506
507 // Loads the number from object into dst register. 502 // Loads the number from object into dst register.
508 // If |object| is neither smi nor heap number, |not_number| is jumped to 503 // If |object| is neither smi nor heap number, |not_number| is jumped to
509 // with |object| still intact. 504 // with |object| still intact.
510 void LoadNumber(Register object, 505 void LoadNumber(Register object,
511 LowDwVfpRegister dst, 506 LowDwVfpRegister dst,
512 Register heap_number_map, 507 Register heap_number_map,
513 Register scratch, 508 Register scratch,
514 Label* not_number); 509 Label* not_number);
515 510
516 // Loads the number from object into double_dst in the double format. 511 // Loads the number from object into double_dst in the double format.
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 // fall through calling code if an overflow occurred, else go to done. 977 // fall through calling code if an overflow occurred, else go to done.
983 // In return, input_high is loaded with high bits of input. 978 // In return, input_high is loaded with high bits of input.
984 void TryInt32Floor(Register result, 979 void TryInt32Floor(Register result,
985 DwVfpRegister double_input, 980 DwVfpRegister double_input,
986 Register input_high, 981 Register input_high,
987 LowDwVfpRegister double_scratch, 982 LowDwVfpRegister double_scratch,
988 Label* done, 983 Label* done,
989 Label* exact); 984 Label* exact);
990 985
991 // Performs a truncating conversion of a floating point number as used by 986 // Performs a truncating conversion of a floating point number as used by
987 // the JS bitwise operations. Goes to 'done' if it succeeds, otherwise falls
988 // through if result is saturated. On return 'result' either holds answer, or
989 // is clobbered on fall through.
990 void TryInlineTruncateDoubleToI(Register result,
danno 2013/08/16 12:18:19 Perhaps make this a private member?
rmcilroy_google 2013/08/16 14:43:54 I did this originally, but then needed to call the
Benedikt Meurer 2013/08/19 07:48:01 If there's no easy way to make this private, you s
rmcilroy 2013/08/19 12:35:24 Done.
991 DwVfpRegister input,
992 Label* done);
993
994 // Performs a truncating conversion of a floating point number as used by
992 // the JS bitwise operations. See ECMA-262 9.5: ToInt32. 995 // the JS bitwise operations. See ECMA-262 9.5: ToInt32.
993 // Double_scratch must be between d0 and d15. 996 // Exits with 'result' holding the answer.
994 // Exits with 'result' holding the answer and all other registers clobbered. 997 void TruncateDoubleToI(Register result, DwVfpRegister double_input);
995 void ECMAToInt32(Register result, 998
996 DwVfpRegister double_input, 999 // Performs a truncating conversion of a floating point number located at the
997 Register scratch, 1000 // 'offset' from the address in 'input'. See ECMA-262 9.5: ToInt32.
998 Register scratch_high, 1001 // 'result' and 'input' must be different registers. Exits with 'result'
999 Register scratch_low, 1002 // holding the answer.
1000 LowDwVfpRegister double_scratch); 1003 void TruncateDoubleToI(Register result, Register input, int offset);
danno 2013/08/16 12:18:19 Consider calling this TruncateHeapNumberToI like t
rmcilroy 2013/08/19 12:35:24 Done.
1004
1005 // Converts the smi or heap number in object to an int32 using the rules
1006 // for ToInt32 as described in ECMAScript 9.5.: the value is truncated
1007 // and brought into the range -2^31 .. +2^31 - 1. 'result' and 'input' must be
1008 // different registers.
1009 void TruncateNumberToI(Register object,
1010 Register result,
1011 Register heap_number_map,
1012 Register scratch1,
1013 Label* not_int32);
1001 1014
1002 // Check whether d16-d31 are available on the CPU. The result is given by the 1015 // Check whether d16-d31 are available on the CPU. The result is given by the
1003 // Z condition flag: Z==0 if d16-d31 available, Z==1 otherwise. 1016 // Z condition flag: Z==0 if d16-d31 available, Z==1 otherwise.
1004 void CheckFor32DRegs(Register scratch); 1017 void CheckFor32DRegs(Register scratch);
1005 1018
1006 // Does a runtime check for 16/32 FP registers. Either way, pushes 32 double 1019 // Does a runtime check for 16/32 FP registers. Either way, pushes 32 double
1007 // values to location, saving [d0..(d15|d31)]. 1020 // values to location, saving [d0..(d15|d31)].
1008 void SaveFPRegs(Register location, Register scratch); 1021 void SaveFPRegs(Register location, Register scratch);
1009 1022
1010 // Does a runtime check for 16/32 FP registers. Either way, pops 32 double 1023 // Does a runtime check for 16/32 FP registers. Either way, pops 32 double
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1471 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1459 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1472 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1460 #else 1473 #else
1461 #define ACCESS_MASM(masm) masm-> 1474 #define ACCESS_MASM(masm) masm->
1462 #endif 1475 #endif
1463 1476
1464 1477
1465 } } // namespace v8::internal 1478 } } // namespace v8::internal
1466 1479
1467 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 1480 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698