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

Side by Side Diff: src/x87/assembler-x87-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 (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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 468
469 469
470 void Assembler::emit_w(const Immediate& x) { 470 void Assembler::emit_w(const Immediate& x) {
471 DCHECK(RelocInfo::IsNone(x.rmode_)); 471 DCHECK(RelocInfo::IsNone(x.rmode_));
472 uint16_t value = static_cast<uint16_t>(x.x_); 472 uint16_t value = static_cast<uint16_t>(x.x_);
473 reinterpret_cast<uint16_t*>(pc_)[0] = value; 473 reinterpret_cast<uint16_t*>(pc_)[0] = value;
474 pc_ += sizeof(uint16_t); 474 pc_ += sizeof(uint16_t);
475 } 475 }
476 476
477 477
478 Address Assembler::target_address_at(Address pc, 478 Address Assembler::target_address_at(Address pc, Address constant_pool) {
479 ConstantPoolArray* constant_pool) {
480 return pc + sizeof(int32_t) + *reinterpret_cast<int32_t*>(pc); 479 return pc + sizeof(int32_t) + *reinterpret_cast<int32_t*>(pc);
481 } 480 }
482 481
483 482
484 void Assembler::set_target_address_at(Address pc, 483 void Assembler::set_target_address_at(Address pc, Address constant_pool,
485 ConstantPoolArray* constant_pool,
486 Address target, 484 Address target,
487 ICacheFlushMode icache_flush_mode) { 485 ICacheFlushMode icache_flush_mode) {
488 int32_t* p = reinterpret_cast<int32_t*>(pc); 486 int32_t* p = reinterpret_cast<int32_t*>(pc);
489 *p = target - (pc + sizeof(int32_t)); 487 *p = target - (pc + sizeof(int32_t));
490 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 488 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
491 CpuFeatures::FlushICache(p, sizeof(int32_t)); 489 CpuFeatures::FlushICache(p, sizeof(int32_t));
492 } 490 }
493 } 491 }
494 492
495 493
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 581
584 582
585 Operand::Operand(Immediate imm) { 583 Operand::Operand(Immediate imm) {
586 // [disp/r] 584 // [disp/r]
587 set_modrm(0, ebp); 585 set_modrm(0, ebp);
588 set_dispr(imm.x_, imm.rmode_); 586 set_dispr(imm.x_, imm.rmode_);
589 } 587 }
590 } } // namespace v8::internal 588 } } // namespace v8::internal
591 589
592 #endif // V8_X87_ASSEMBLER_X87_INL_H_ 590 #endif // V8_X87_ASSEMBLER_X87_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698