Chromium Code Reviews| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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); | 72 and_(addr, Page::kPageAlignmentMask); |
| 73 shr(addr, Page::kRegionSizeLog2); | 73 shr(addr, Page::kRegionSizeLog2); |
| 74 | 74 |
| 75 // Set dirty mark for region. | 75 // Set dirty mark for region. |
|
Søren Thygesen Gjesse
2011/05/23 08:26:17
Please add a comment here why loading to a registe
| |
| 76 bts(Operand(object, Page::kDirtyFlagOffset), addr); | 76 mov(scratch, Operand(object, Page::kDirtyFlagOffset)); |
| 77 bts(Operand(scratch), addr); | |
| 78 mov(Operand(object, Page::kDirtyFlagOffset), scratch); | |
| 77 } | 79 } |
| 78 | 80 |
| 79 | 81 |
| 80 void MacroAssembler::ClampDoubleToUint8(XMMRegister input_reg, | 82 void MacroAssembler::ClampDoubleToUint8(XMMRegister input_reg, |
| 81 XMMRegister scratch_reg, | 83 XMMRegister scratch_reg, |
| 82 Register result_reg) { | 84 Register result_reg) { |
| 83 Label done; | 85 Label done; |
| 84 ExternalReference zero_ref = ExternalReference::address_of_zero(); | 86 ExternalReference zero_ref = ExternalReference::address_of_zero(); |
| 85 movdbl(scratch_reg, Operand::StaticVariable(zero_ref)); | 87 movdbl(scratch_reg, Operand::StaticVariable(zero_ref)); |
| 86 Set(result_reg, Immediate(0)); | 88 Set(result_reg, Immediate(0)); |
| (...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2083 | 2085 |
| 2084 // Check that the code was patched as expected. | 2086 // Check that the code was patched as expected. |
| 2085 ASSERT(masm_.pc_ == address_ + size_); | 2087 ASSERT(masm_.pc_ == address_ + size_); |
| 2086 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2088 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 2087 } | 2089 } |
| 2088 | 2090 |
| 2089 | 2091 |
| 2090 } } // namespace v8::internal | 2092 } } // namespace v8::internal |
| 2091 | 2093 |
| 2092 #endif // V8_TARGET_ARCH_IA32 | 2094 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |