| Index: src/ia32/macro-assembler-ia32.cc
|
| ===================================================================
|
| --- src/ia32/macro-assembler-ia32.cc (revision 7978)
|
| +++ src/ia32/macro-assembler-ia32.cc (working copy)
|
| @@ -73,7 +73,12 @@
|
| shr(addr, Page::kRegionSizeLog2);
|
|
|
| // Set dirty mark for region.
|
| - bts(Operand(object, Page::kDirtyFlagOffset), addr);
|
| + // Bit tests with a memory operand should be avoided on Intel processors,
|
| + // as they usually have long latency and multiple uops. We load the bit base
|
| + // operand to a register at first and store it back after bit set.
|
| + mov(scratch, Operand(object, Page::kDirtyFlagOffset));
|
| + bts(Operand(scratch), addr);
|
| + mov(Operand(object, Page::kDirtyFlagOffset), scratch);
|
| }
|
|
|
|
|
|
|