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

Unified Diff: src/x64/assembler-x64.cc

Issue 119035: X64: Added implementations of Set(..., Immediate) to macro assembler. (Closed)
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
Index: src/x64/assembler-x64.cc
diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc
index 86e11653383ca2266c5a2dfaf3f95ea71ebed995..77f1a91bbcac87092dadfe577c80813463dc5733 100644
--- a/src/x64/assembler-x64.cc
+++ b/src/x64/assembler-x64.cc
@@ -504,6 +504,16 @@ void Assembler::jmp(Register target) {
}
+void Assembler::movl(Register dst, Immediate value) {
+ EnsureSpace ensure_space(this);
+ last_pc_ = pc_;
+ emit_optional_rex_32(dst);
+ emit(0xC7);
+ emit(0xC0 | (dst.code() & 0x7));
+ emit(value); // Only 32-bit immediates are possible, not 8-bit immediates.
+}
+
+
void Assembler::movq(Register dst, const Operand& src) {
EnsureSpace ensure_space(this);
last_pc_ = pc_;
@@ -541,6 +551,15 @@ void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) {
}
+void Assembler::movq(const Operand& dst, Register src) {
+ EnsureSpace ensure_space(this);
+ last_pc_ = pc_;
+ emit_rex_64(src, dst);
+ emit(0x89);
+ emit_operand(src, dst);
+}
+
+
void Assembler::neg(Register dst) {
EnsureSpace ensure_space(this);
last_pc_ = pc_;

Powered by Google App Engine
This is Rietveld 408576698