Index: src/x64/assembler-x64.cc |
diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc |
index a9fb834394cebe41d91e5c2cee464a5e174adf2f..8cc53953e7a116d3b86ab67a1db47e257db35e0b 100644 |
--- a/src/x64/assembler-x64.cc |
+++ b/src/x64/assembler-x64.cc |
@@ -617,6 +617,24 @@ void Assembler::shift(Register dst, |
} |
+void Assembler::shift(Operand dst, Immediate shift_amount, int subcode, |
+ int size) { |
+ EnsureSpace ensure_space(this); |
+ DCHECK(size == kInt64Size ? is_uint6(shift_amount.value_) |
+ : is_uint5(shift_amount.value_)); |
+ if (shift_amount.value_ == 1) { |
+ emit_rex(dst, size); |
+ emit(0xD1); |
+ emit_operand(subcode, dst); |
+ } else { |
+ emit_rex(dst, size); |
+ emit(0xC1); |
+ emit_operand(subcode, dst); |
+ emit(shift_amount.value_); |
+ } |
+} |
+ |
+ |
void Assembler::shift(Register dst, int subcode, int size) { |
EnsureSpace ensure_space(this); |
emit_rex(dst, size); |
@@ -625,6 +643,14 @@ void Assembler::shift(Register dst, int subcode, int size) { |
} |
+void Assembler::shift(Operand dst, int subcode, int size) { |
+ EnsureSpace ensure_space(this); |
+ emit_rex(dst, size); |
+ emit(0xD3); |
+ emit_operand(subcode, dst); |
+} |
+ |
+ |
void Assembler::bt(const Operand& dst, Register src) { |
EnsureSpace ensure_space(this); |
emit_rex_64(src, dst); |