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

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: Fix CALL_GENERATED_CODE call when on native. 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
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('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 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. See ECMA-262 9.5: ToInt32. Goes to 'done' if it
988 // succeeds, otherwise falls through if result is saturated. On return
989 // 'result' either holds answer, or is clobbered on fall through.
990 //
991 // Only public for the test code in test-code-stubs-arm.cc.
992 void TryInlineTruncateDoubleToI(Register result,
993 DwVfpRegister input,
994 Label* done);
995
996 // Performs a truncating conversion of a floating point number as used by
992 // the JS bitwise operations. See ECMA-262 9.5: ToInt32. 997 // the JS bitwise operations. See ECMA-262 9.5: ToInt32.
993 // Double_scratch must be between d0 and d15. 998 // Exits with 'result' holding the answer.
994 // Exits with 'result' holding the answer and all other registers clobbered. 999 void TruncateDoubleToI(Register result, DwVfpRegister double_input);
995 void ECMAToInt32(Register result, 1000
996 DwVfpRegister double_input, 1001 // Performs a truncating conversion of a heap number as used by
997 Register scratch, 1002 // the JS bitwise operations. See ECMA-262 9.5: ToInt32. 'result' and 'input'
998 Register scratch_high, 1003 // must be different registers. Exits with 'result' holding the answer.
999 Register scratch_low, 1004 void TruncateHeapNumberToI(Register result, Register object);
1000 LowDwVfpRegister double_scratch); 1005
1006 // Converts the smi or heap number in object to an int32 using the rules
1007 // for ToInt32 as described in ECMAScript 9.5.: the value is truncated
1008 // and brought into the range -2^31 .. +2^31 - 1. 'result' and 'input' must be
1009 // different registers.
1010 void TruncateNumberToI(Register object,
1011 Register result,
1012 Register heap_number_map,
1013 Register scratch1,
1014 Label* not_int32);
1001 1015
1002 // Check whether d16-d31 are available on the CPU. The result is given by the 1016 // 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. 1017 // Z condition flag: Z==0 if d16-d31 available, Z==1 otherwise.
1004 void CheckFor32DRegs(Register scratch); 1018 void CheckFor32DRegs(Register scratch);
1005 1019
1006 // Does a runtime check for 16/32 FP registers. Either way, pushes 32 double 1020 // Does a runtime check for 16/32 FP registers. Either way, pushes 32 double
1007 // values to location, saving [d0..(d15|d31)]. 1021 // values to location, saving [d0..(d15|d31)].
1008 void SaveFPRegs(Register location, Register scratch); 1022 void SaveFPRegs(Register location, Register scratch);
1009 1023
1010 // Does a runtime check for 16/32 FP registers. Either way, pops 32 double 1024 // 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__) 1472 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1459 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1473 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1460 #else 1474 #else
1461 #define ACCESS_MASM(masm) masm-> 1475 #define ACCESS_MASM(masm) masm->
1462 #endif 1476 #endif
1463 1477
1464 1478
1465 } } // namespace v8::internal 1479 } } // namespace v8::internal
1466 1480
1467 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 1481 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698