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

Side by Side Diff: src/ia32/macro-assembler-ia32.h

Issue 7089010: Now that the macro-assembler functions are not templatized on (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 6 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/ia32/full-codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.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 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 Register value, 73 Register value,
74 Register address); 74 Register address);
75 75
76 // For page containing |object| mark region covering |addr| dirty. 76 // For page containing |object| mark region covering |addr| dirty.
77 // RememberedSetHelper only works if the object is not in new 77 // RememberedSetHelper only works if the object is not in new
78 // space. 78 // space.
79 void RememberedSetHelper(Register addr, 79 void RememberedSetHelper(Register addr,
80 Register scratch, 80 Register scratch,
81 SaveFPRegsMode save_fp); 81 SaveFPRegsMode save_fp);
82 82
83 inline void CheckPageFlag( 83 void CheckPageFlag(Register object,
84 Register object, 84 Register scratch,
85 Register scratch, 85 MemoryChunk::MemoryChunkFlags flag,
86 MemoryChunk::MemoryChunkFlags flag, 86 Condition cc,
87 Condition cc, 87 Label* condition_met,
88 Label* condition_met, 88 Label::Distance condition_met_distance = Label::kFar);
89 Label::Distance condition_met_distance = Label::kFar);
90 89
91 90
92 void InNewSpace(Register object, 91 void InNewSpace(Register object,
93 Register scratch, 92 Register scratch,
94 Condition cc, 93 Condition cc,
95 Label* condition_met, 94 Label* condition_met,
96 Label::Distance condition_met_distance = Label::kFar); 95 Label::Distance condition_met_distance = Label::kFar);
97 96
98 // Check if an object has a given incremental marking colour. Also uses ecx! 97 // Check if an object has a given incremental marking colour. Also uses ecx!
99 // The colour bits are found by splitting the address at the bit offset 98 // The colour bits are found by splitting the address at the bit offset
100 // indicated by the mask: bits that are zero in the mask are used for the 99 // indicated by the mask: bits that are zero in the mask are used for the
101 // address of the bitmap, and bits that are one in the mask are used for the 100 // address of the bitmap, and bits that are one in the mask are used for the
102 // index of the bit. 101 // index of the bit.
103 inline void HasColour(Register object, 102 void HasColour(Register object,
104 Register scratch0, 103 Register scratch0,
105 Register scratch1, 104 Register scratch1,
106 Label* has_colour, 105 Label* has_colour,
107 Label::Distance has_colour_distance, 106 Label::Distance has_colour_distance,
108 int first_bit, 107 int first_bit,
109 int second_bit); 108 int second_bit);
110 109
111 inline void IsBlack(Register object, 110 void IsBlack(Register object,
112 Register scratch0, 111 Register scratch0,
113 Register scratch1, 112 Register scratch1,
114 Label* is_black, 113 Label* is_black,
115 Label::Distance is_black_distance = Label::kFar); 114 Label::Distance is_black_distance = Label::kFar);
116 115
117 // Checks the colour of an object. If the object is already grey or black 116 // Checks the colour of an object. If the object is already grey or black
118 // then we just fall through, since it is already live. If it is white and 117 // then we just fall through, since it is already live. If it is white and
119 // we can determine that it doesn't need to be scanned, then we just mark it 118 // we can determine that it doesn't need to be scanned, then we just mark it
120 // black and fall through. For the rest we jump to the label so the 119 // black and fall through. For the rest we jump to the label so the
121 // incremental marker can fix its assumptions. 120 // incremental marker can fix its assumptions.
122 inline void EnsureNotWhite(Register object, 121 void EnsureNotWhite(Register object,
123 Register scratch1, 122 Register scratch1,
124 Register scratch2, 123 Register scratch2,
125 Label* object_is_white_and_not_data, 124 Label* object_is_white_and_not_data,
126 Label::Distance distance, 125 Label::Distance distance,
127 bool in_new_space); 126 bool in_new_space);
128 127
129 // Checks whether an object is data-only, ie it does need to be scanned by the 128 // Checks whether an object is data-only, ie it does need to be scanned by the
130 // garbage collector. 129 // garbage collector.
131 inline void IsDataObject(Register value, 130 void IsDataObject(Register value,
132 Register scratch, 131 Register scratch,
133 Label* not_data_object, 132 Label* not_data_object,
134 Label::Distance not_data_object_distance, 133 Label::Distance not_data_object_distance,
135 bool in_new_space); 134 bool in_new_space);
136 135
137 // Notify the garbage collector that we wrote a pointer into an object. 136 // Notify the garbage collector that we wrote a pointer into an object.
138 // |object| is the object being stored into, |value| is the object being 137 // |object| is the object being stored into, |value| is the object being
139 // stored. All registers are clobbered by the operation. RecordWriteField 138 // stored. All registers are clobbered by the operation. RecordWriteField
140 // filters out smis so it does not update the write barrier if the value is a 139 // filters out smis so it does not update the write barrier if the value is a
141 // smi. The offset is the offset from the start of the object, not the offset 140 // smi. The offset is the offset from the start of the object, not the offset
142 // from the tagged HeapObject pointer. For use with FieldOperand(reg, off). 141 // from the tagged HeapObject pointer. For use with FieldOperand(reg, off).
143 void RecordWriteField( 142 void RecordWriteField(
144 Register object, 143 Register object,
145 int offset, 144 int offset,
146 Register value, 145 Register value,
147 Register scratch, 146 Register scratch,
148 SaveFPRegsMode save_fp, 147 SaveFPRegsMode save_fp,
149 EmitRememberedSet emit_remembered_set = EMIT_REMEMBERED_SET, 148 EmitRememberedSet emit_remembered_set = EMIT_REMEMBERED_SET,
150 SmiCheck smi_check = INLINE_SMI_CHECK); 149 SmiCheck smi_check = INLINE_SMI_CHECK);
151 150
152 // As above, but the offset has the tag presubtracted. For use with 151 // As above, but the offset has the tag presubtracted. For use with
153 // Operand(reg, off). 152 // Operand(reg, off).
154 inline void RecordWriteContextSlot( 153 void RecordWriteContextSlot(
155 Register context, 154 Register context,
156 int offset, 155 int offset,
157 Register value, 156 Register value,
158 Register scratch, 157 Register scratch,
159 SaveFPRegsMode save_fp, 158 SaveFPRegsMode save_fp,
160 EmitRememberedSet emit_remembered_set = EMIT_REMEMBERED_SET, 159 EmitRememberedSet emit_remembered_set = EMIT_REMEMBERED_SET,
161 SmiCheck smi_check = INLINE_SMI_CHECK) { 160 SmiCheck smi_check = INLINE_SMI_CHECK) {
162 RecordWriteField(context, 161 RecordWriteField(context,
163 offset + kHeapObjectTag, 162 offset + kHeapObjectTag,
164 value, 163 value,
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 } \ 868 } \
870 masm-> 869 masm->
871 #else 870 #else
872 #define ACCESS_MASM(masm) masm-> 871 #define ACCESS_MASM(masm) masm->
873 #endif 872 #endif
874 873
875 874
876 } } // namespace v8::internal 875 } } // namespace v8::internal
877 876
878 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 877 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698