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

Side by Side Diff: src/x64/assembler-x64-inl.h

Issue 1030353003: Enable constant pool support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_X64_ASSEMBLER_X64_INL_H_ 5 #ifndef V8_X64_ASSEMBLER_X64_INL_H_
6 #define V8_X64_ASSEMBLER_X64_INL_H_ 6 #define V8_X64_ASSEMBLER_X64_INL_H_
7 7
8 #include "src/x64/assembler-x64.h" 8 #include "src/x64/assembler-x64.h"
9 9
10 #include "src/base/cpu.h" 10 #include "src/base/cpu.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 emit_vex3_byte0(); 241 emit_vex3_byte0();
242 emit_vex3_byte1(reg, rm, mm); 242 emit_vex3_byte1(reg, rm, mm);
243 emit_vex3_byte2(w, vreg, l, pp); 243 emit_vex3_byte2(w, vreg, l, pp);
244 } else { 244 } else {
245 emit_vex2_byte0(); 245 emit_vex2_byte0();
246 emit_vex2_byte1(reg, vreg, l, pp); 246 emit_vex2_byte1(reg, vreg, l, pp);
247 } 247 }
248 } 248 }
249 249
250 250
251 Address Assembler::target_address_at(Address pc, 251 Address Assembler::target_address_at(Address pc, Address constant_pool) {
252 ConstantPoolArray* constant_pool) {
253 return Memory::int32_at(pc) + pc + 4; 252 return Memory::int32_at(pc) + pc + 4;
254 } 253 }
255 254
256 255
257 void Assembler::set_target_address_at(Address pc, 256 void Assembler::set_target_address_at(Address pc, Address constant_pool,
258 ConstantPoolArray* constant_pool,
259 Address target, 257 Address target,
260 ICacheFlushMode icache_flush_mode) { 258 ICacheFlushMode icache_flush_mode) {
261 Memory::int32_at(pc) = static_cast<int32_t>(target - pc - 4); 259 Memory::int32_at(pc) = static_cast<int32_t>(target - pc - 4);
262 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 260 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
263 CpuFeatures::FlushICache(pc, sizeof(int32_t)); 261 CpuFeatures::FlushICache(pc, sizeof(int32_t));
264 } 262 }
265 } 263 }
266 264
267 265
268 void Assembler::deserialization_set_target_internal_reference_at( 266 void Assembler::deserialization_set_target_internal_reference_at(
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 642
645 void Operand::set_disp64(int64_t disp) { 643 void Operand::set_disp64(int64_t disp) {
646 DCHECK_EQ(1, len_); 644 DCHECK_EQ(1, len_);
647 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); 645 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]);
648 *p = disp; 646 *p = disp;
649 len_ += sizeof(disp); 647 len_ += sizeof(disp);
650 } 648 }
651 } } // namespace v8::internal 649 } } // namespace v8::internal
652 650
653 #endif // V8_X64_ASSEMBLER_X64_INL_H_ 651 #endif // V8_X64_ASSEMBLER_X64_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698