Index: src/x64/assembler-x64.cc |
diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc |
index eb8d7d4d998048f79bd20c77eb05760fe93094ec..6d4f4d8541f773bbb1ebb5c2884c4b43b8d133a1 100644 |
--- a/src/x64/assembler-x64.cc |
+++ b/src/x64/assembler-x64.cc |
@@ -775,7 +775,7 @@ void Assembler::immediate_arithmetic_op_8(byte subcode, |
Register dst, |
Immediate src) { |
EnsureSpace ensure_space(this); |
- if (dst.code() > 3) { |
+ if (!dst.is_byte_register()) { |
// Use 64-bit mode byte registers. |
emit_rex_64(dst); |
} |
@@ -1059,7 +1059,7 @@ void Assembler::decl(const Operand& dst) { |
void Assembler::decb(Register dst) { |
EnsureSpace ensure_space(this); |
- if (dst.code() > 3) { |
+ if (!dst.is_byte_register()) { |
// Register is not one of al, bl, cl, dl. Its encoding needs REX. |
emit_rex_32(dst); |
} |
@@ -1387,7 +1387,7 @@ void Assembler::leave() { |
void Assembler::movb(Register dst, const Operand& src) { |
EnsureSpace ensure_space(this); |
- if (dst.code() > 3) { |
+ if (!dst.is_byte_register()) { |
// Register is not one of al, bl, cl, dl. Its encoding needs REX. |
emit_rex_32(dst, src); |
} else { |
@@ -1400,7 +1400,7 @@ void Assembler::movb(Register dst, const Operand& src) { |
void Assembler::movb(Register dst, Immediate imm) { |
EnsureSpace ensure_space(this); |
- if (dst.code() > 3) { |
+ if (!dst.is_byte_register()) { |
emit_rex_32(dst); |
} |
emit(0xB0 + dst.low_bits()); |
@@ -1410,7 +1410,7 @@ void Assembler::movb(Register dst, Immediate imm) { |
void Assembler::movb(const Operand& dst, Register src) { |
EnsureSpace ensure_space(this); |
- if (src.code() > 3) { |
+ if (!src.is_byte_register()) { |
emit_rex_32(src, dst); |
} else { |
emit_optional_rex_32(src, dst); |
@@ -1931,7 +1931,7 @@ void Assembler::setcc(Condition cc, Register reg) { |
} |
EnsureSpace ensure_space(this); |
ASSERT(is_uint4(cc)); |
- if (reg.code() > 3) { // Use x64 byte registers, where different. |
+ if (!reg.is_byte_register()) { // Use x64 byte registers, where different. |
emit_rex_32(reg); |
} |
emit(0x0F); |
@@ -1996,7 +1996,7 @@ void Assembler::testb(Register dst, Register src) { |
emit(0x84); |
emit_modrm(src, dst); |
} else { |
- if (dst.code() > 3 || src.code() > 3) { |
+ if (!dst.is_byte_register() || !src.is_byte_register()) { |
// Register is not one of al, bl, cl, dl. Its encoding needs REX. |
emit_rex_32(dst, src); |
} |
@@ -2013,7 +2013,7 @@ void Assembler::testb(Register reg, Immediate mask) { |
emit(0xA8); |
emit(mask.value_); // Low byte emitted. |
} else { |
- if (reg.code() > 3) { |
+ if (!reg.is_byte_register()) { |
// Register is not one of al, bl, cl, dl. Its encoding needs REX. |
emit_rex_32(reg); |
} |
@@ -2036,7 +2036,7 @@ void Assembler::testb(const Operand& op, Immediate mask) { |
void Assembler::testb(const Operand& op, Register reg) { |
EnsureSpace ensure_space(this); |
- if (reg.code() > 3) { |
+ if (!reg.is_byte_register()) { |
// Register is not one of al, bl, cl, dl. Its encoding needs REX. |
emit_rex_32(reg, op); |
} else { |