OLD | NEW |
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // Always use 2 instructions (lui/ori pair), even if the constant could | 83 // Always use 2 instructions (lui/ori pair), even if the constant could |
84 // be loaded with just one, so that this value is patchable later. | 84 // be loaded with just one, so that this value is patchable later. |
85 CONSTANT_SIZE = 1 | 85 CONSTANT_SIZE = 1 |
86 }; | 86 }; |
87 | 87 |
88 | 88 |
89 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; | 89 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; |
90 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; | 90 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; |
91 enum RAStatus { kRAHasNotBeenSaved, kRAHasBeenSaved }; | 91 enum RAStatus { kRAHasNotBeenSaved, kRAHasBeenSaved }; |
92 | 92 |
| 93 Register GetRegisterThatIsNotOneOf(Register reg1, |
| 94 Register reg2 = no_reg, |
| 95 Register reg3 = no_reg, |
| 96 Register reg4 = no_reg, |
| 97 Register reg5 = no_reg, |
| 98 Register reg6 = no_reg); |
| 99 |
93 bool AreAliased(Register r1, Register r2, Register r3, Register r4); | 100 bool AreAliased(Register r1, Register r2, Register r3, Register r4); |
94 | 101 |
95 | 102 |
96 // ----------------------------------------------------------------------------- | 103 // ----------------------------------------------------------------------------- |
97 // Static helper functions. | 104 // Static helper functions. |
98 | 105 |
99 inline MemOperand ContextOperand(Register context, int index) { | 106 inline MemOperand ContextOperand(Register context, int index) { |
100 return MemOperand(context, Context::SlotOffset(index)); | 107 return MemOperand(context, Context::SlotOffset(index)); |
101 } | 108 } |
102 | 109 |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 // integer range to a 32bit signed integer. | 788 // integer range to a 32bit signed integer. |
782 // Expects the double value loaded in input_high and input_low. | 789 // Expects the double value loaded in input_high and input_low. |
783 // Exits with the answer in 'result'. | 790 // Exits with the answer in 'result'. |
784 // Note that this code does not work for values in the 32bit range! | 791 // Note that this code does not work for values in the 32bit range! |
785 void EmitOutOfInt32RangeTruncate(Register result, | 792 void EmitOutOfInt32RangeTruncate(Register result, |
786 Register input_high, | 793 Register input_high, |
787 Register input_low, | 794 Register input_low, |
788 Register scratch); | 795 Register scratch); |
789 | 796 |
790 // Performs a truncating conversion of a floating point number as used by | 797 // Performs a truncating conversion of a floating point number as used by |
| 798 // the JS bitwise operations. See ECMA-262 9.5: ToInt32. Goes to 'done' if it |
| 799 // succeeds, otherwise falls through if result is saturated. On return |
| 800 // 'result' either holds answer, or is clobbered on fall through. |
| 801 // |
| 802 // Only public for the test code in test-code-stubs-arm.cc. |
| 803 void TryInlineTruncateDoubleToI(Register result, |
| 804 DoubleRegister input, |
| 805 Label* done); |
| 806 |
| 807 // Performs a truncating conversion of a floating point number as used by |
791 // the JS bitwise operations. See ECMA-262 9.5: ToInt32. | 808 // the JS bitwise operations. See ECMA-262 9.5: ToInt32. |
792 // Exits with 'result' holding the answer and all other registers clobbered. | 809 // Exits with 'result' holding the answer. |
793 void EmitECMATruncate(Register result, | 810 void TruncateDoubleToI(Register result, DoubleRegister double_input); |
794 FPURegister double_input, | 811 |
795 FPURegister single_scratch, | 812 // Performs a truncating conversion of a heap number as used by |
796 Register scratch, | 813 // the JS bitwise operations. See ECMA-262 9.5: ToInt32. 'result' and 'input' |
797 Register scratch2, | 814 // must be different registers. Exits with 'result' holding the answer. |
798 Register scratch3); | 815 void TruncateHeapNumberToI(Register result, Register object); |
799 | 816 |
800 // Converts the smi or heap number in object to an int32 using the rules | 817 // Converts the smi or heap number in object to an int32 using the rules |
801 // for ToInt32 as described in ECMAScript 9.5.: the value is truncated | 818 // for ToInt32 as described in ECMAScript 9.5.: the value is truncated |
802 // and brought into the range -2^31 .. +2^31 - 1. | 819 // and brought into the range -2^31 .. +2^31 - 1. 'result' and 'input' must be |
803 void ConvertNumberToInt32(Register object, | 820 // different registers. |
804 Register dst, | 821 void TruncateNumberToI(Register object, |
805 Register heap_number_map, | 822 Register result, |
806 Register scratch1, | 823 Register heap_number_map, |
807 Register scratch2, | 824 Register scratch1, |
808 Register scratch3, | 825 Register scratch2, |
809 FPURegister double_scratch, | 826 Register scratch3, |
810 Label* not_int32); | 827 Label* not_int32); |
811 | 828 |
812 // Loads the number from object into dst register. | 829 // Loads the number from object into dst register. |
813 // If |object| is neither smi nor heap number, |not_number| is jumped to | 830 // If |object| is neither smi nor heap number, |not_number| is jumped to |
814 // with |object| still intact. | 831 // with |object| still intact. |
815 void LoadNumber(Register object, | 832 void LoadNumber(Register object, |
816 FPURegister dst, | 833 FPURegister dst, |
817 Register heap_number_map, | 834 Register heap_number_map, |
818 Register scratch, | 835 Register scratch, |
819 Label* not_number); | 836 Label* not_number); |
820 | 837 |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1622 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1639 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
1623 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1640 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1624 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1641 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1625 #else | 1642 #else |
1626 #define ACCESS_MASM(masm) masm-> | 1643 #define ACCESS_MASM(masm) masm-> |
1627 #endif | 1644 #endif |
1628 | 1645 |
1629 } } // namespace v8::internal | 1646 } } // namespace v8::internal |
1630 | 1647 |
1631 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1648 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |