| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 // Convenience for platform-independent signatures. We do not normally | 48 // Convenience for platform-independent signatures. We do not normally |
| 49 // distinguish memory operands from other operands on ia32. | 49 // distinguish memory operands from other operands on ia32. |
| 50 typedef Operand MemOperand; | 50 typedef Operand MemOperand; |
| 51 | 51 |
| 52 // Forward declaration. | 52 // Forward declaration. |
| 53 class JumpTarget; | 53 class JumpTarget; |
| 54 class PostCallGenerator; | 54 class PostCallGenerator; |
| 55 | 55 |
| 56 enum EmitRememberedSet { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; |
| 56 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; | 57 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; |
| 57 enum ObjectMode { PRESERVE_OBJECT, DESTROY_OBJECT }; | 58 enum ObjectMode { PRESERVE_OBJECT, DESTROY_OBJECT }; |
| 58 enum ValueMode { PRESERVE_VALUE, DESTROY_VALUE }; | 59 enum ValueMode { PRESERVE_VALUE, DESTROY_VALUE }; |
| 59 enum ScratchMode { PRESERVE_SCRATCH, DESTROY_SCRATCH }; | 60 enum AddressMode { PRESERVE_ADDRESS, DESTROY_ADDRESS }; |
| 60 | 61 |
| 61 // MacroAssembler implements a collection of frequently used macros. | 62 // MacroAssembler implements a collection of frequently used macros. |
| 62 class MacroAssembler: public Assembler { | 63 class MacroAssembler: public Assembler { |
| 63 public: | 64 public: |
| 64 MacroAssembler(void* buffer, int size); | 65 MacroAssembler(void* buffer, int size); |
| 65 | 66 |
| 66 // --------------------------------------------------------------------------- | 67 // --------------------------------------------------------------------------- |
| 67 // GC Support | 68 // GC Support |
| 68 | 69 |
| 69 void IncrementalMarkingRecordWriteHelper(Register object, | 70 void IncrementalMarkingRecordWriteHelper(Register object, |
| 70 Register value, | 71 Register value, |
| 71 Register scratch, | 72 Register address); |
| 72 ObjectMode object_mode, | |
| 73 ValueMode value_mode, | |
| 74 ScratchMode scratch_mode); | |
| 75 | |
| 76 | |
| 77 void IncrementalMarkingRecordWrite(Register object, | |
| 78 Register value, | |
| 79 Register scratch, | |
| 80 SmiCheck smi_check, | |
| 81 ObjectMode object_mode, | |
| 82 ValueMode value_mode, | |
| 83 ScratchMode scratch_mode); | |
| 84 | |
| 85 | 73 |
| 86 // For page containing |object| mark region covering |addr| dirty. | 74 // For page containing |object| mark region covering |addr| dirty. |
| 87 // RecordWriteHelper only works if the object is not in new | 75 // RememberedSetHelper only works if the object is not in new |
| 88 // space. | 76 // space. |
| 89 void RecordWriteHelper(Register object, | 77 void RememberedSetHelper(Register object, |
| 90 Register addr, | 78 Register addr, |
| 91 Register scratch, | 79 Register scratch, |
| 92 SaveFPRegsMode save_fp); | 80 SaveFPRegsMode save_fp); |
| 93 | 81 |
| 94 // Check if object is in new space. | 82 // Check if object is in new space. |
| 95 // scratch can be object itself, but it will be clobbered. | 83 // scratch can be object itself, but it will be clobbered. |
| 96 template <typename LabelType> | 84 template <typename LabelType> |
| 97 void InNewSpace(Register object, | 85 void InNewSpace(Register object, |
| 98 Register scratch, | 86 Register scratch, |
| 99 Condition cc, // equal for new space, not_equal otherwise. | 87 Condition cc, // equal for new space, not_equal otherwise. |
| 100 LabelType* branch); | 88 LabelType* branch); |
| 101 | 89 |
| 102 // For page containing |object| mark region covering [object+offset] | 90 // For page containing |object| mark region covering [object+offset] |
| (...skipping 10 matching lines...) Expand all Loading... |
| 113 SaveFPRegsMode save_fp); | 101 SaveFPRegsMode save_fp); |
| 114 | 102 |
| 115 // For page containing |object| mark region covering |address| | 103 // For page containing |object| mark region covering |address| |
| 116 // dirty. |object| is the object being stored into, |value| is the | 104 // dirty. |object| is the object being stored into, |value| is the |
| 117 // object being stored. All registers are clobbered by the | 105 // object being stored. All registers are clobbered by the |
| 118 // operation. RecordWrite filters out smis so it does not update the | 106 // operation. RecordWrite filters out smis so it does not update the |
| 119 // write barrier if the value is a smi. | 107 // write barrier if the value is a smi. |
| 120 void RecordWrite(Register object, | 108 void RecordWrite(Register object, |
| 121 Register address, | 109 Register address, |
| 122 Register value, | 110 Register value, |
| 123 SaveFPRegsMode save_fp); | 111 EmitRememberedSet emit_remembered_set, |
| 112 SaveFPRegsMode save_fp, |
| 113 SmiCheck smi_check = INLINE_SMI_CHECK); |
| 124 | 114 |
| 125 #ifdef ENABLE_DEBUGGER_SUPPORT | 115 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 126 // --------------------------------------------------------------------------- | 116 // --------------------------------------------------------------------------- |
| 127 // Debugger Support | 117 // Debugger Support |
| 128 | 118 |
| 129 void DebugBreak(); | 119 void DebugBreak(); |
| 130 #endif | 120 #endif |
| 131 | 121 |
| 132 // --------------------------------------------------------------------------- | 122 // --------------------------------------------------------------------------- |
| 133 // Activation frames | 123 // Activation frames |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 } \ | 804 } \ |
| 815 masm-> | 805 masm-> |
| 816 #else | 806 #else |
| 817 #define ACCESS_MASM(masm) masm-> | 807 #define ACCESS_MASM(masm) masm-> |
| 818 #endif | 808 #endif |
| 819 | 809 |
| 820 | 810 |
| 821 } } // namespace v8::internal | 811 } } // namespace v8::internal |
| 822 | 812 |
| 823 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 813 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |