| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 Register scratch, | 184 Register scratch, |
| 185 SaveFPRegsMode save_fp, | 185 SaveFPRegsMode save_fp, |
| 186 RememberedSetFinalAction and_then); | 186 RememberedSetFinalAction and_then); |
| 187 | 187 |
| 188 void CheckPageFlag(Register object, | 188 void CheckPageFlag(Register object, |
| 189 Register scratch, | 189 Register scratch, |
| 190 MemoryChunk::MemoryChunkFlags flag, | 190 MemoryChunk::MemoryChunkFlags flag, |
| 191 Condition cc, | 191 Condition cc, |
| 192 Label* condition_met); | 192 Label* condition_met); |
| 193 | 193 |
| 194 // Check if object is in new space. | 194 // Check if object is in new space. Jumps if the object is not in new space. |
| 195 // scratch can be object itself, but it will be clobbered. | 195 // The register scratch can be object itself, but it will be clobbered. |
| 196 void InNewSpace(Register object, | 196 void JumpIfNotInNewSpace(Register object, |
| 197 Register scratch, | 197 Register scratch, |
| 198 Condition cond, // eq for new space, ne otherwise. | 198 Label* branch) { |
| 199 Label* branch); | 199 InNewSpace(object, scratch, ne, branch); |
| 200 } |
| 200 | 201 |
| 201 // Check if an object has a given incremental marking color. The color bits | 202 // Check if object is in new space. Jumps if the object is in new space. |
| 202 // are found by splitting the address at the bit offset indicated by the | 203 // The register scratch can be object itself, but it will be clobbered. |
| 203 // mask: bits that are zero in the mask are used for the address of the | 204 void JumpIfInNewSpace(Register object, |
| 204 // bitmap, and bits that are one in the mask are used for the index of the | 205 Register scratch, |
| 205 // bit. | 206 Label* branch) { |
| 207 InNewSpace(object, scratch, eq, branch); |
| 208 } |
| 209 |
| 210 // Check if an object has a given incremental marking color. |
| 206 void HasColor(Register object, | 211 void HasColor(Register object, |
| 207 Register scratch0, | 212 Register scratch0, |
| 208 Register scratch1, | 213 Register scratch1, |
| 209 Label* has_color, | 214 Label* has_color, |
| 210 int first_bit, | 215 int first_bit, |
| 211 int second_bit); | 216 int second_bit); |
| 212 | 217 |
| 213 void IsBlack(Register object, | 218 void IsBlack(Register object, |
| 214 Register scratch0, | 219 Register scratch0, |
| 215 Register scratch1, | 220 Register scratch1, |
| 216 Label* is_black); | 221 Label* is_black); |
| 217 | 222 |
| 218 // Checks the color of an object. If the object is already grey or black | 223 // Checks the color of an object. If the object is already grey or black |
| 219 // then we just fall through, since it is already live. If it is white and | 224 // then we just fall through, since it is already live. If it is white and |
| 220 // we can determine that it doesn't need to be scanned, then we just mark it | 225 // we can determine that it doesn't need to be scanned, then we just mark it |
| 221 // black and fall through. For the rest we jump to the label so the | 226 // black and fall through. For the rest we jump to the label so the |
| 222 // incremental marker can fix its assumptions. | 227 // incremental marker can fix its assumptions. |
| 223 void EnsureNotWhite(Register object, | 228 void EnsureNotWhite(Register object, |
| 224 Register scratch1, | 229 Register scratch1, |
| 225 Register scratch2, | 230 Register scratch2, |
| 226 Label* object_is_white_and_not_data, | 231 Label* object_is_white_and_not_data, |
| 227 Label::Distance distance); | 232 Label::Distance distance); |
| 228 | 233 |
| 229 // Checks whether an object is data-only, ie it does need to be scanned by the | 234 // Checks whether an object is data-only, ie it does need to be scanned by the |
| 230 // garbage collector. | 235 // garbage collector. |
| 231 void IsDataObject(Register value, | 236 void IsDataObject(Register value, |
| 232 Register scratch, | 237 Register scratch, |
| 233 Label* not_data_object, | 238 Label* not_data_object); |
| 234 Label::Distance not_data_object_distance); | |
| 235 | 239 |
| 236 // Notify the garbage collector that we wrote a pointer into an object. | 240 // Notify the garbage collector that we wrote a pointer into an object. |
| 237 // |object| is the object being stored into, |value| is the object being | 241 // |object| is the object being stored into, |value| is the object being |
| 238 // stored. value and scratch registers are clobbered by the operation. | 242 // stored. value and scratch registers are clobbered by the operation. |
| 239 // The offset is the offset from the start of the object, not the offset from | 243 // The offset is the offset from the start of the object, not the offset from |
| 240 // the tagged HeapObject pointer. For use with FieldOperand(reg, off). | 244 // the tagged HeapObject pointer. For use with FieldOperand(reg, off). |
| 241 void RecordWriteField( | 245 void RecordWriteField( |
| 242 Register object, | 246 Register object, |
| 243 int offset, | 247 int offset, |
| 244 Register value, | 248 Register value, |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 // Activation support. | 1135 // Activation support. |
| 1132 void EnterFrame(StackFrame::Type type); | 1136 void EnterFrame(StackFrame::Type type); |
| 1133 void LeaveFrame(StackFrame::Type type); | 1137 void LeaveFrame(StackFrame::Type type); |
| 1134 | 1138 |
| 1135 void InitializeNewString(Register string, | 1139 void InitializeNewString(Register string, |
| 1136 Register length, | 1140 Register length, |
| 1137 Heap::RootListIndex map_index, | 1141 Heap::RootListIndex map_index, |
| 1138 Register scratch1, | 1142 Register scratch1, |
| 1139 Register scratch2); | 1143 Register scratch2); |
| 1140 | 1144 |
| 1145 // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. |
| 1146 void InNewSpace(Register object, |
| 1147 Register scratch, |
| 1148 Condition cond, // eq for new space, ne otherwise. |
| 1149 Label* branch); |
| 1150 |
| 1141 // Helper for finding the mark bits for an address. Afterwards, the | 1151 // Helper for finding the mark bits for an address. Afterwards, the |
| 1142 // bitmap register points at the word with the mark bits and the mask | 1152 // bitmap register points at the word with the mark bits and the mask |
| 1143 // the position of the first bit. Leaves addr_reg unchanged. | 1153 // the position of the first bit. Leaves addr_reg unchanged. |
| 1144 inline void GetMarkBits(Register addr_reg, | 1154 inline void GetMarkBits(Register addr_reg, |
| 1145 Register bitmap_reg, | 1155 Register bitmap_reg, |
| 1146 Register mask_reg); | 1156 Register mask_reg); |
| 1147 | 1157 |
| 1148 // Compute memory operands for safepoint stack slots. | 1158 // Compute memory operands for safepoint stack slots. |
| 1149 static int SafepointRegisterStackIndex(int reg_code); | 1159 static int SafepointRegisterStackIndex(int reg_code); |
| 1150 MemOperand SafepointRegisterSlot(Register reg); | 1160 MemOperand SafepointRegisterSlot(Register reg); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1223 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 1214 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1224 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 1215 #else | 1225 #else |
| 1216 #define ACCESS_MASM(masm) masm-> | 1226 #define ACCESS_MASM(masm) masm-> |
| 1217 #endif | 1227 #endif |
| 1218 | 1228 |
| 1219 | 1229 |
| 1220 } } // namespace v8::internal | 1230 } } // namespace v8::internal |
| 1221 | 1231 |
| 1222 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1232 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |