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

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

Issue 113997: Add miscellaneous operations to x64 assembler. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/assembler-x64-inl.h
===================================================================
--- src/x64/assembler-x64-inl.h (revision 2088)
+++ src/x64/assembler-x64-inl.h (working copy)
@@ -55,6 +55,12 @@
}
+void Assembler::emitw(uint16_t x) {
+ Memory::uint16_at(pc_) = x;
+ pc_ += sizeof(uint16_t);
+}
+
+
// High bit of reg goes to REX.R, high bit of rm_reg goes to REX.B.
// REX.W is set. REX.X is cleared.
void Assembler::emit_rex_64(Register reg, Register rm_reg) {
@@ -118,14 +124,14 @@
}
-void Assembler::set_target_address_at(byte* location, byte* value) {
- UNIMPLEMENTED();
+Address Assembler::target_address_at(Address pc) {
+ return Memory::Address_at(pc);
}
-byte* Assembler::target_address_at(byte* location) {
- UNIMPLEMENTED();
- return NULL;
+void Assembler::set_target_address_at(Address pc, Address target) {
+ Memory::Address_at(pc) = target;
+ CPU::FlushICache(pc, sizeof(intptr_t));
}
@@ -166,6 +172,8 @@
ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY);
Assembler::set_target_address_at(pc_, target);
}
+
+
Object* RelocInfo::target_object() {
ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
return *reinterpret_cast<Object**>(pc_);
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698