Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 5736008: Provide baseline for experimental GC implementation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void MacroAssembler::CompareRoot(Register with, Heap::RootListIndex index) { 66 void MacroAssembler::CompareRoot(Register with, Heap::RootListIndex index) {
67 cmpq(with, Operand(kRootRegister, index << kPointerSizeLog2)); 67 cmpq(with, Operand(kRootRegister, index << kPointerSizeLog2));
68 } 68 }
69 69
70 70
71 void MacroAssembler::CompareRoot(Operand with, Heap::RootListIndex index) { 71 void MacroAssembler::CompareRoot(Operand with, Heap::RootListIndex index) {
72 LoadRoot(kScratchRegister, index); 72 LoadRoot(kScratchRegister, index);
73 cmpq(with, kScratchRegister); 73 cmpq(with, kScratchRegister);
74 } 74 }
75 75
76 76 #ifdef ENABLE_CARDMARKING_WRITE_BARRIER
77 void MacroAssembler::RecordWriteHelper(Register object, 77 void MacroAssembler::RecordWriteHelper(Register object,
78 Register addr, 78 Register addr,
79 Register scratch) { 79 Register scratch) {
80 if (FLAG_debug_code) { 80 if (FLAG_debug_code) {
81 // Check that the object is not in new space. 81 // Check that the object is not in new space.
82 NearLabel not_in_new_space; 82 NearLabel not_in_new_space;
83 InNewSpace(object, scratch, not_equal, &not_in_new_space); 83 InNewSpace(object, scratch, not_equal, &not_in_new_space);
84 Abort("new-space object passed to RecordWriteHelper"); 84 Abort("new-space object passed to RecordWriteHelper");
85 bind(&not_in_new_space); 85 bind(&not_in_new_space);
86 } 86 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 bind(&done); 207 bind(&done);
208 208
209 // Clobber all input registers when running with the debug-code flag 209 // Clobber all input registers when running with the debug-code flag
210 // turned on to provoke errors. 210 // turned on to provoke errors.
211 if (FLAG_debug_code) { 211 if (FLAG_debug_code) {
212 movq(object, BitCast<int64_t>(kZapValue), RelocInfo::NONE); 212 movq(object, BitCast<int64_t>(kZapValue), RelocInfo::NONE);
213 movq(scratch, BitCast<int64_t>(kZapValue), RelocInfo::NONE); 213 movq(scratch, BitCast<int64_t>(kZapValue), RelocInfo::NONE);
214 movq(index, BitCast<int64_t>(kZapValue), RelocInfo::NONE); 214 movq(index, BitCast<int64_t>(kZapValue), RelocInfo::NONE);
215 } 215 }
216 } 216 }
217 #endif
217 218
218 void MacroAssembler::Assert(Condition cc, const char* msg) { 219 void MacroAssembler::Assert(Condition cc, const char* msg) {
219 if (FLAG_debug_code) Check(cc, msg); 220 if (FLAG_debug_code) Check(cc, msg);
220 } 221 }
221 222
222 223
223 void MacroAssembler::AssertFastElements(Register elements) { 224 void MacroAssembler::AssertFastElements(Register elements) {
224 if (FLAG_debug_code) { 225 if (FLAG_debug_code) {
225 NearLabel ok; 226 NearLabel ok;
226 CompareRoot(FieldOperand(elements, HeapObject::kMapOffset), 227 CompareRoot(FieldOperand(elements, HeapObject::kMapOffset),
(...skipping 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after
2346 CPU::FlushICache(address_, size_); 2347 CPU::FlushICache(address_, size_);
2347 2348
2348 // Check that the code was patched as expected. 2349 // Check that the code was patched as expected.
2349 ASSERT(masm_.pc_ == address_ + size_); 2350 ASSERT(masm_.pc_ == address_ + size_);
2350 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2351 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2351 } 2352 }
2352 2353
2353 } } // namespace v8::internal 2354 } } // namespace v8::internal
2354 2355
2355 #endif // V8_TARGET_ARCH_X64 2356 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/globals.h ('K') | « src/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698