| Index: src/x64/assembler-x64.cc
|
| diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc
|
| index a92196d74cd34457e4fab08f15d22a677ebd6469..a01b53dc39a63a305c7ce1a0b35519abcb7b8cfb 100644
|
| --- a/src/x64/assembler-x64.cc
|
| +++ b/src/x64/assembler-x64.cc
|
| @@ -1899,7 +1899,7 @@ void Assembler::shrd(Register dst, Register src) {
|
| }
|
|
|
|
|
| -void Assembler::xchg(Register dst, Register src) {
|
| +void Assembler::xchgq(Register dst, Register src) {
|
| EnsureSpace ensure_space(this);
|
| if (src.is(rax) || dst.is(rax)) { // Single-byte encoding
|
| Register other = src.is(rax) ? dst : src;
|
| @@ -1917,6 +1917,24 @@ void Assembler::xchg(Register dst, Register src) {
|
| }
|
|
|
|
|
| +void Assembler::xchgl(Register dst, Register src) {
|
| + EnsureSpace ensure_space(this);
|
| + if (src.is(rax) || dst.is(rax)) { // Single-byte encoding
|
| + Register other = src.is(rax) ? dst : src;
|
| + emit_optional_rex_32(other);
|
| + emit(0x90 | other.low_bits());
|
| + } else if (dst.low_bits() == 4) {
|
| + emit_optional_rex_32(dst, src);
|
| + emit(0x87);
|
| + emit_modrm(dst, src);
|
| + } else {
|
| + emit_optional_rex_32(src, dst);
|
| + emit(0x87);
|
| + emit_modrm(src, dst);
|
| + }
|
| +}
|
| +
|
| +
|
| void Assembler::store_rax(void* dst, RelocInfo::Mode mode) {
|
| EnsureSpace ensure_space(this);
|
| emit(0x48); // REX.W
|
| @@ -2035,6 +2053,14 @@ void Assembler::testl(const Operand& op, Immediate mask) {
|
| }
|
|
|
|
|
| +void Assembler::testl(const Operand& op, Register reg) {
|
| + EnsureSpace ensure_space(this);
|
| + emit_optional_rex_32(reg, op);
|
| + emit(0x85);
|
| + emit_operand(reg, op);
|
| +}
|
| +
|
| +
|
| void Assembler::testq(const Operand& op, Register reg) {
|
| EnsureSpace ensure_space(this);
|
| emit_rex_64(reg, op);
|
|
|