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/ia32/assembler-ia32-inl.h

Issue 7015043: Fix the GC branch so it compiles and runs on 64 bit. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 7 months 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
« no previous file with comments | « src/flag-definitions.h ('k') | src/ia32/code-stubs-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 return reinterpret_cast<Address>(pc_); 82 return reinterpret_cast<Address>(pc_);
83 } 83 }
84 84
85 85
86 int RelocInfo::target_address_size() { 86 int RelocInfo::target_address_size() {
87 return Assembler::kExternalTargetSize; 87 return Assembler::kExternalTargetSize;
88 } 88 }
89 89
90 90
91 void RelocInfo::set_target_address(Address target, Code* code) { 91 void RelocInfo::set_target_address(Address target, Code* code) {
92 Assembler::set_target_address_at(pc_, target);
92 ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY); 93 ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY);
93 if (code != NULL && IsCodeTarget(rmode_)) { 94 if (code != NULL && IsCodeTarget(rmode_)) {
94 Object* target_code = Code::GetCodeFromTargetAddress(target); 95 Object* target_code = Code::GetCodeFromTargetAddress(target);
95 // TODO(gc) ISOLATES MERGE code should have heap.
96 code->GetHeap()->incremental_marking()->RecordWrite( 96 code->GetHeap()->incremental_marking()->RecordWrite(
97 code, HeapObject::cast(target_code)); 97 code, HeapObject::cast(target_code));
98 } 98 }
99 Assembler::set_target_address_at(pc_, target);
100 } 99 }
101 100
102 101
103 Object* RelocInfo::target_object() { 102 Object* RelocInfo::target_object() {
104 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 103 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
105 return Memory::Object_at(pc_); 104 return Memory::Object_at(pc_);
106 } 105 }
107 106
108 107
109 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { 108 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) {
110 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 109 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
111 return Memory::Object_Handle_at(pc_); 110 return Memory::Object_Handle_at(pc_);
112 } 111 }
113 112
114 113
115 Object** RelocInfo::target_object_address() { 114 Object** RelocInfo::target_object_address() {
116 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 115 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
117 return &Memory::Object_at(pc_); 116 return &Memory::Object_at(pc_);
118 } 117 }
119 118
120 119
121 void RelocInfo::set_target_object(Object* target, Code* code) { 120 void RelocInfo::set_target_object(Object* target, Code* code) {
122 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); 121 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
123 Memory::Object_at(pc_) = target; 122 Memory::Object_at(pc_) = target;
124 CPU::FlushICache(pc_, sizeof(Address)); 123 CPU::FlushICache(pc_, sizeof(Address));
125 if (code != NULL && target->IsHeapObject()) { 124 if (code != NULL && target->IsHeapObject()) {
126 // TODO(gc) ISOLATES MERGE code object should have heap() accessor.
127 code->GetHeap()->incremental_marking()->RecordWrite( 125 code->GetHeap()->incremental_marking()->RecordWrite(
128 code, HeapObject::cast(target)); 126 code, HeapObject::cast(target));
129 } 127 }
130 } 128 }
131 129
132 130
133 Address* RelocInfo::target_reference_address() { 131 Address* RelocInfo::target_reference_address() {
134 ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE); 132 ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE);
135 return reinterpret_cast<Address*>(pc_); 133 return reinterpret_cast<Address*>(pc_);
136 } 134 }
(...skipping 15 matching lines...) Expand all
152 return reinterpret_cast<JSGlobalPropertyCell*>(object); 150 return reinterpret_cast<JSGlobalPropertyCell*>(object);
153 } 151 }
154 152
155 153
156 void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell, Code* code) { 154 void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell, Code* code) {
157 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); 155 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL);
158 Address address = cell->address() + JSGlobalPropertyCell::kValueOffset; 156 Address address = cell->address() + JSGlobalPropertyCell::kValueOffset;
159 Memory::Address_at(pc_) = address; 157 Memory::Address_at(pc_) = address;
160 CPU::FlushICache(pc_, sizeof(Address)); 158 CPU::FlushICache(pc_, sizeof(Address));
161 if (code != NULL) { 159 if (code != NULL) {
162 // TODO(gc) ISOLATES MERGE code object should have heap() accessor.
163 code->GetHeap()->incremental_marking()->RecordWrite(code, cell); 160 code->GetHeap()->incremental_marking()->RecordWrite(code, cell);
164 } 161 }
165 } 162 }
166 163
167 164
168 Address RelocInfo::call_address() { 165 Address RelocInfo::call_address() {
169 ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || 166 ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) ||
170 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); 167 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()));
171 return Assembler::target_address_at(pc_ + 1); 168 return Assembler::target_address_at(pc_ + 1);
172 } 169 }
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 437
441 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { 438 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) {
442 // [disp/r] 439 // [disp/r]
443 set_modrm(0, ebp); 440 set_modrm(0, ebp);
444 set_dispr(disp, rmode); 441 set_dispr(disp, rmode);
445 } 442 }
446 443
447 } } // namespace v8::internal 444 } } // namespace v8::internal
448 445
449 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ 446 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/ia32/code-stubs-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698