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

Unified Diff: src/x64/assembler-x64-inl.h

Issue 887013003: [x64] Assembler support for internal references and RIP relative addressing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/disasm-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/assembler-x64-inl.h
diff --git a/src/x64/assembler-x64-inl.h b/src/x64/assembler-x64-inl.h
index caf7af6ec94368b5140b485fc7caa06469ad2c2c..64c71cfaee9afca8ef3d87d44fcb0b2c7c637413 100644
--- a/src/x64/assembler-x64-inl.h
+++ b/src/x64/assembler-x64-inl.h
@@ -292,7 +292,7 @@ void RelocInfo::apply(intptr_t delta, ICacheFlushMode icache_flush_mode) {
bool flush_icache = icache_flush_mode != SKIP_ICACHE_FLUSH;
if (IsInternalReference(rmode_)) {
// absolute code pointer inside code object moves with the code object.
- Memory::Address_at(pc_) += static_cast<int32_t>(delta);
+ Memory::Address_at(pc_) += delta;
if (flush_icache) CpuFeatures::FlushICache(pc_, sizeof(Address));
} else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) {
Memory::int32_at(pc_) -= static_cast<int32_t>(delta);
@@ -621,7 +621,12 @@ void Operand::set_disp32(int disp) {
len_ += sizeof(int32_t);
}
-
+void Operand::set_disp64(int64_t disp) {
+ DCHECK_EQ(1, len_);
+ int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]);
+ *p = disp;
+ len_ += sizeof(disp);
+}
} } // namespace v8::internal
#endif // V8_X64_ASSEMBLER_X64_INL_H_
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698