| 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 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2349 } | 2349 } |
| 2350 | 2350 |
| 2351 | 2351 |
| 2352 void MacroAssembler::GetMarkBits(Register addr_reg, | 2352 void MacroAssembler::GetMarkBits(Register addr_reg, |
| 2353 Register bitmap_reg, | 2353 Register bitmap_reg, |
| 2354 Register mask_reg) { | 2354 Register mask_reg) { |
| 2355 ASSERT(!AreAliased(addr_reg, bitmap_reg, mask_reg, ecx)); | 2355 ASSERT(!AreAliased(addr_reg, bitmap_reg, mask_reg, ecx)); |
| 2356 mov(bitmap_reg, Operand(addr_reg)); | 2356 mov(bitmap_reg, Operand(addr_reg)); |
| 2357 and_(bitmap_reg, ~Page::kPageAlignmentMask); | 2357 and_(bitmap_reg, ~Page::kPageAlignmentMask); |
| 2358 mov(ecx, Operand(addr_reg)); | 2358 mov(ecx, Operand(addr_reg)); |
| 2359 shr(ecx, Bitmap::kBitsPerCellLog2); | 2359 int shift = |
| 2360 Bitmap::kBitsPerCellLog2 + kPointerSizeLog2 - Bitmap::kBytesPerCellLog2; |
| 2361 shr(ecx, shift); |
| 2360 and_(ecx, | 2362 and_(ecx, |
| 2361 (Page::kPageAlignmentMask >> Bitmap::kBitsPerCellLog2) & | 2363 (Page::kPageAlignmentMask >> shift) & ~(Bitmap::kBytesPerCell - 1)); |
| 2362 ~(kPointerSize - 1)); | |
| 2363 | 2364 |
| 2364 add(bitmap_reg, Operand(ecx)); | 2365 add(bitmap_reg, Operand(ecx)); |
| 2365 mov(ecx, Operand(addr_reg)); | 2366 mov(ecx, Operand(addr_reg)); |
| 2366 shr(ecx, kPointerSizeLog2); | 2367 shr(ecx, kPointerSizeLog2); |
| 2367 and_(ecx, (1 << Bitmap::kBitsPerCellLog2) - 1); | 2368 and_(ecx, (1 << Bitmap::kBitsPerCellLog2) - 1); |
| 2368 mov(mask_reg, Immediate(1)); | 2369 mov(mask_reg, Immediate(1)); |
| 2369 shl_cl(mask_reg); | 2370 shl_cl(mask_reg); |
| 2370 } | 2371 } |
| 2371 | 2372 |
| 2372 | 2373 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2410 | 2411 |
| 2411 // Value is a data object, and it is white. Mark it black. Since we know | 2412 // Value is a data object, and it is white. Mark it black. Since we know |
| 2412 // that the object is white we can make it black by flipping one bit. | 2413 // that the object is white we can make it black by flipping one bit. |
| 2413 or_(Operand(bitmap_scratch, MemoryChunk::kHeaderSize), mask_scratch); | 2414 or_(Operand(bitmap_scratch, MemoryChunk::kHeaderSize), mask_scratch); |
| 2414 bind(&done); | 2415 bind(&done); |
| 2415 } | 2416 } |
| 2416 | 2417 |
| 2417 } } // namespace v8::internal | 2418 } } // namespace v8::internal |
| 2418 | 2419 |
| 2419 #endif // V8_TARGET_ARCH_IA32 | 2420 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |