| 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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 // Load the value of a smi object into a VFP double register. The register | 582 // Load the value of a smi object into a VFP double register. The register |
| 583 // scratch1 can be the same register as smi in which case smi will hold the | 583 // scratch1 can be the same register as smi in which case smi will hold the |
| 584 // untagged value afterwards. | 584 // untagged value afterwards. |
| 585 void SmiToDoubleVFPRegister(Register smi, | 585 void SmiToDoubleVFPRegister(Register smi, |
| 586 DwVfpRegister value, | 586 DwVfpRegister value, |
| 587 Register scratch1, | 587 Register scratch1, |
| 588 SwVfpRegister scratch2); | 588 SwVfpRegister scratch2); |
| 589 | 589 |
| 590 // Convert the HeapNumber pointed to by source to a 32bits signed integer | 590 // Convert the HeapNumber pointed to by source to a 32bits signed integer |
| 591 // dest. If the HeapNumber does not fit into a 32bits signed integer branch | 591 // dest. If the HeapNumber does not fit into a 32bits signed integer branch |
| 592 // to not_int32 label. | 592 // to not_int32 label. If VFP3 is available double_scratch is used but not |
| 593 // scratch2. |
| 593 void ConvertToInt32(Register source, | 594 void ConvertToInt32(Register source, |
| 594 Register dest, | 595 Register dest, |
| 595 Register scratch, | 596 Register scratch, |
| 596 Register scratch2, | 597 Register scratch2, |
| 598 DwVfpRegister double_scratch, |
| 597 Label *not_int32); | 599 Label *not_int32); |
| 598 | 600 |
| 599 // Count leading zeros in a 32 bit word. On ARM5 and later it uses the clz | 601 // Count leading zeros in a 32 bit word. On ARM5 and later it uses the clz |
| 600 // instruction. On pre-ARM5 hardware this routine gives the wrong answer | 602 // instruction. On pre-ARM5 hardware this routine gives the wrong answer |
| 601 // for 0 (31 instead of 32). Source and scratch can be the same in which case | 603 // for 0 (31 instead of 32). Source and scratch can be the same in which case |
| 602 // the source is clobbered. Source and zeros can also be the same in which | 604 // the source is clobbered. Source and zeros can also be the same in which |
| 603 // case scratch should be a different register. | 605 // case scratch should be a different register. |
| 604 void CountLeadingZeros(Register zeros, | 606 void CountLeadingZeros(Register zeros, |
| 605 Register source, | 607 Register source, |
| 606 Register scratch); | 608 Register scratch); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 } | 758 } |
| 757 // Jump if either of the registers contain a non-smi. | 759 // Jump if either of the registers contain a non-smi. |
| 758 void JumpIfNotBothSmi(Register reg1, Register reg2, Label* on_not_both_smi); | 760 void JumpIfNotBothSmi(Register reg1, Register reg2, Label* on_not_both_smi); |
| 759 // Jump if either of the registers contain a smi. | 761 // Jump if either of the registers contain a smi. |
| 760 void JumpIfEitherSmi(Register reg1, Register reg2, Label* on_either_smi); | 762 void JumpIfEitherSmi(Register reg1, Register reg2, Label* on_either_smi); |
| 761 | 763 |
| 762 // Abort execution if argument is a smi. Used in debug code. | 764 // Abort execution if argument is a smi. Used in debug code. |
| 763 void AbortIfSmi(Register object); | 765 void AbortIfSmi(Register object); |
| 764 void AbortIfNotSmi(Register object); | 766 void AbortIfNotSmi(Register object); |
| 765 | 767 |
| 768 // Abort execution if argument is not the root value with the given index. |
| 769 void AbortIfNotRootValue(Register src, |
| 770 Heap::RootListIndex root_value_index, |
| 771 const char* message); |
| 772 |
| 766 // --------------------------------------------------------------------------- | 773 // --------------------------------------------------------------------------- |
| 767 // HeapNumber utilities | 774 // HeapNumber utilities |
| 768 | 775 |
| 769 void JumpIfNotHeapNumber(Register object, | 776 void JumpIfNotHeapNumber(Register object, |
| 770 Register heap_number_map, | 777 Register heap_number_map, |
| 771 Register scratch, | 778 Register scratch, |
| 772 Label* on_not_heap_number); | 779 Label* on_not_heap_number); |
| 773 | 780 |
| 774 // --------------------------------------------------------------------------- | 781 // --------------------------------------------------------------------------- |
| 775 // String utilities | 782 // String utilities |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 911 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 905 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 912 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 906 #else | 913 #else |
| 907 #define ACCESS_MASM(masm) masm-> | 914 #define ACCESS_MASM(masm) masm-> |
| 908 #endif | 915 #endif |
| 909 | 916 |
| 910 | 917 |
| 911 } } // namespace v8::internal | 918 } } // namespace v8::internal |
| 912 | 919 |
| 913 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 920 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |