| OLD | NEW |
| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 SaveFPRegsMode save_fp, | 86 SaveFPRegsMode save_fp, |
| 87 RememberedSetFinalAction and_then); | 87 RememberedSetFinalAction and_then); |
| 88 | 88 |
| 89 void CheckPageFlag(Register object, | 89 void CheckPageFlag(Register object, |
| 90 Register scratch, | 90 Register scratch, |
| 91 MemoryChunk::MemoryChunkFlags flag, | 91 MemoryChunk::MemoryChunkFlags flag, |
| 92 Condition cc, | 92 Condition cc, |
| 93 Label* condition_met, | 93 Label* condition_met, |
| 94 Label::Distance condition_met_distance = Label::kFar); | 94 Label::Distance condition_met_distance = Label::kFar); |
| 95 | 95 |
| 96 void InNewSpace(Register object, | 96 // Check if object is in new space. Jumps if the object is not in new space. |
| 97 Register scratch, | 97 // The register scratch can be object itself, but it will be clobbered. |
| 98 Condition cc, | 98 void JumpIfNotInNewSpace(Register object, |
| 99 Label* condition_met, | 99 Register scratch, |
| 100 Label::Distance condition_met_distance = Label::kFar); | 100 Label* branch, |
| 101 Label::Distance distance = Label::kFar) { |
| 102 InNewSpace(object, scratch, zero, branch, distance); |
| 103 } |
| 104 |
| 105 // Check if object is in new space. Jumps if the object is in new space. |
| 106 // The register scratch can be object itself, but it will be clobbered. |
| 107 void JumpIfInNewSpace(Register object, |
| 108 Register scratch, |
| 109 Label* branch, |
| 110 Label::Distance distance = Label::kFar) { |
| 111 InNewSpace(object, scratch, not_zero, branch, distance); |
| 112 } |
| 101 | 113 |
| 102 // Check if an object has a given incremental marking color. Also uses ecx! | 114 // Check if an object has a given incremental marking color. Also uses ecx! |
| 103 // The color bits are found by splitting the address at the bit offset | |
| 104 // indicated by the mask: bits that are zero in the mask are used for the | |
| 105 // address of the bitmap, and bits that are one in the mask are used for the | |
| 106 // index of the bit. | |
| 107 void HasColor(Register object, | 115 void HasColor(Register object, |
| 108 Register scratch0, | 116 Register scratch0, |
| 109 Register scratch1, | 117 Register scratch1, |
| 110 Label* has_color, | 118 Label* has_color, |
| 111 Label::Distance has_color_distance, | 119 Label::Distance has_color_distance, |
| 112 int first_bit, | 120 int first_bit, |
| 113 int second_bit); | 121 int second_bit); |
| 114 | 122 |
| 115 void IsBlack(Register object, | 123 void IsBlack(Register object, |
| 116 Register scratch0, | 124 Register scratch0, |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 AllocationFlags flags); | 786 AllocationFlags flags); |
| 779 void UpdateAllocationTopHelper(Register result_end, Register scratch); | 787 void UpdateAllocationTopHelper(Register result_end, Register scratch); |
| 780 | 788 |
| 781 // Helper for PopHandleScope. Allowed to perform a GC and returns | 789 // Helper for PopHandleScope. Allowed to perform a GC and returns |
| 782 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and | 790 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and |
| 783 // possibly returns a failure object indicating an allocation failure. | 791 // possibly returns a failure object indicating an allocation failure. |
| 784 MUST_USE_RESULT MaybeObject* PopHandleScopeHelper(Register saved, | 792 MUST_USE_RESULT MaybeObject* PopHandleScopeHelper(Register saved, |
| 785 Register scratch, | 793 Register scratch, |
| 786 bool gc_allowed); | 794 bool gc_allowed); |
| 787 | 795 |
| 796 // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. |
| 797 void InNewSpace(Register object, |
| 798 Register scratch, |
| 799 Condition cc, |
| 800 Label* condition_met, |
| 801 Label::Distance condition_met_distance = Label::kFar); |
| 802 |
| 788 // Helper for finding the mark bits for an address. Afterwards, the | 803 // Helper for finding the mark bits for an address. Afterwards, the |
| 789 // bitmap register points at the word with the mark bits and the mask | 804 // bitmap register points at the word with the mark bits and the mask |
| 790 // the position of the first bit. Uses ecx as scratch and leaves addr_reg | 805 // the position of the first bit. Uses ecx as scratch and leaves addr_reg |
| 791 // unchanged. | 806 // unchanged. |
| 792 inline void GetMarkBits(Register addr_reg, | 807 inline void GetMarkBits(Register addr_reg, |
| 793 Register bitmap_reg, | 808 Register bitmap_reg, |
| 794 Register mask_reg); | 809 Register mask_reg); |
| 795 | 810 |
| 796 // Compute memory operands for safepoint stack slots. | 811 // Compute memory operands for safepoint stack slots. |
| 797 Operand SafepointRegisterSlot(Register reg); | 812 Operand SafepointRegisterSlot(Register reg); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 } \ | 888 } \ |
| 874 masm-> | 889 masm-> |
| 875 #else | 890 #else |
| 876 #define ACCESS_MASM(masm) masm-> | 891 #define ACCESS_MASM(masm) masm-> |
| 877 #endif | 892 #endif |
| 878 | 893 |
| 879 | 894 |
| 880 } } // namespace v8::internal | 895 } } // namespace v8::internal |
| 881 | 896 |
| 882 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 897 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |