| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 Abort("new-space object passed to RecordWriteHelper"); | 62 Abort("new-space object passed to RecordWriteHelper"); |
| 63 bind(¬_in_new_space); | 63 bind(¬_in_new_space); |
| 64 } | 64 } |
| 65 | 65 |
| 66 // Compute the page start address from the heap object pointer, and reuse | 66 // Compute the page start address from the heap object pointer, and reuse |
| 67 // the 'object' register for it. | 67 // the 'object' register for it. |
| 68 and_(object, ~Page::kPageAlignmentMask); | 68 and_(object, ~Page::kPageAlignmentMask); |
| 69 | 69 |
| 70 // Compute number of region covering addr. See Page::GetRegionNumberForAddress | 70 // Compute number of region covering addr. See Page::GetRegionNumberForAddress |
| 71 // method for more details. | 71 // method for more details. |
| 72 and_(addr, Page::kPageAlignmentMask); | |
| 73 shr(addr, Page::kRegionSizeLog2); | 72 shr(addr, Page::kRegionSizeLog2); |
| 73 and_(addr, Page::kPageAlignmentMask >> Page::kRegionSizeLog2); |
| 74 | 74 |
| 75 // Set dirty mark for region. | 75 // Set dirty mark for region. |
| 76 // Bit tests with a memory operand should be avoided on Intel processors, | 76 // Bit tests with a memory operand should be avoided on Intel processors, |
| 77 // as they usually have long latency and multiple uops. We load the bit base | 77 // as they usually have long latency and multiple uops. We load the bit base |
| 78 // operand to a register at first and store it back after bit set. | 78 // operand to a register at first and store it back after bit set. |
| 79 mov(scratch, Operand(object, Page::kDirtyFlagOffset)); | 79 mov(scratch, Operand(object, Page::kDirtyFlagOffset)); |
| 80 bts(Operand(scratch), addr); | 80 bts(Operand(scratch), addr); |
| 81 mov(Operand(object, Page::kDirtyFlagOffset), scratch); | 81 mov(Operand(object, Page::kDirtyFlagOffset), scratch); |
| 82 } | 82 } |
| 83 | 83 |
| (...skipping 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2248 | 2248 |
| 2249 // Check that the code was patched as expected. | 2249 // Check that the code was patched as expected. |
| 2250 ASSERT(masm_.pc_ == address_ + size_); | 2250 ASSERT(masm_.pc_ == address_ + size_); |
| 2251 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2251 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 2252 } | 2252 } |
| 2253 | 2253 |
| 2254 | 2254 |
| 2255 } } // namespace v8::internal | 2255 } } // namespace v8::internal |
| 2256 | 2256 |
| 2257 #endif // V8_TARGET_ARCH_IA32 | 2257 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |