| Index: src/ia32/assembler-ia32.cc
|
| ===================================================================
|
| --- src/ia32/assembler-ia32.cc (revision 7619)
|
| +++ src/ia32/assembler-ia32.cc (working copy)
|
| @@ -283,6 +283,18 @@
|
| && ((buf_[0] & 0x07) == reg.code()); // register codes match.
|
| }
|
|
|
| +
|
| +bool Operand::is_reg_only() const {
|
| + return (buf_[0] & 0xF8) == 0xC0; // Addressing mode is register only.
|
| +}
|
| +
|
| +
|
| +Register Operand::reg() const {
|
| + ASSERT(is_reg_only());
|
| + return Register::from_code(buf_[0] & 0x07);
|
| +}
|
| +
|
| +
|
| // -----------------------------------------------------------------------------
|
| // Implementation of Assembler.
|
|
|
| @@ -1373,6 +1385,10 @@
|
|
|
|
|
| void Assembler::test_b(const Operand& op, uint8_t imm8) {
|
| + if (op.is_reg_only() && op.reg().code() >= 4) {
|
| + test(op, Immediate(imm8));
|
| + return;
|
| + }
|
| EnsureSpace ensure_space(this);
|
| last_pc_ = pc_;
|
| EMIT(0xF6);
|
|
|