| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 : Assembler(arg_isolate, buffer, size), | 46 : Assembler(arg_isolate, buffer, size), |
| 47 generating_stub_(false), | 47 generating_stub_(false), |
| 48 allow_stub_calls_(true) { | 48 allow_stub_calls_(true) { |
| 49 if (isolate() != NULL) { | 49 if (isolate() != NULL) { |
| 50 code_object_ = Handle<Object>(isolate()->heap()->undefined_value(), | 50 code_object_ = Handle<Object>(isolate()->heap()->undefined_value(), |
| 51 isolate()); | 51 isolate()); |
| 52 } | 52 } |
| 53 } | 53 } |
| 54 | 54 |
| 55 | 55 |
| 56 void MacroAssembler::InNewSpace( |
| 57 Register object, |
| 58 Register scratch, |
| 59 Condition cc, |
| 60 Label* condition_met, |
| 61 Label::Distance condition_met_distance) { |
| 62 ASSERT(cc == equal || cc == not_equal); |
| 63 if (scratch.is(object)) { |
| 64 and_(scratch, Immediate(~Page::kPageAlignmentMask)); |
| 65 } else { |
| 66 mov(scratch, Immediate(~Page::kPageAlignmentMask)); |
| 67 and_(scratch, Operand(object)); |
| 68 } |
| 69 // Check that we can use a test_b. |
| 70 ASSERT(MemoryChunk::IN_FROM_SPACE < 8); |
| 71 ASSERT(MemoryChunk::IN_TO_SPACE < 8); |
| 72 int mask = (1 << MemoryChunk::IN_FROM_SPACE) |
| 73 | (1 << MemoryChunk::IN_TO_SPACE); |
| 74 // If non-zero, the page belongs to new-space. |
| 75 test_b(Operand(scratch, MemoryChunk::kFlagsOffset), |
| 76 static_cast<uint8_t>(mask)); |
| 77 j(NegateCondition(cc), condition_met, condition_met_distance); |
| 78 } |
| 79 |
| 80 |
| 56 void MacroAssembler::IncrementalMarkingRecordWriteHelper( | 81 void MacroAssembler::IncrementalMarkingRecordWriteHelper( |
| 57 Register object, | 82 Register object, |
| 58 Register value, | 83 Register value, |
| 59 Register address) { | 84 Register address) { |
| 60 ASSERT(!object.is(address)); | 85 ASSERT(!object.is(address)); |
| 61 ASSERT(!value.is(address)); | 86 ASSERT(!value.is(address)); |
| 62 ASSERT(!value.is(object)); | 87 ASSERT(!value.is(object)); |
| 63 | 88 |
| 64 bool preserve[Register::kNumRegisters]; | 89 bool preserve[Register::kNumRegisters]; |
| 65 | 90 |
| (...skipping 2115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2181 | 2206 |
| 2182 // Check that the code was patched as expected. | 2207 // Check that the code was patched as expected. |
| 2183 ASSERT(masm_.pc_ == address_ + size_); | 2208 ASSERT(masm_.pc_ == address_ + size_); |
| 2184 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2209 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 2185 } | 2210 } |
| 2186 | 2211 |
| 2187 | 2212 |
| 2188 } } // namespace v8::internal | 2213 } } // namespace v8::internal |
| 2189 | 2214 |
| 2190 #endif // V8_TARGET_ARCH_IA32 | 2215 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |