📄 assembler-ia32.cc.svn-base
字号:
void Assembler::pop(const Operand& dst) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x8F); emit_operand(eax, dst);}void Assembler::mov_b(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x8A); emit_operand(dst, src);}void Assembler::mov_b(const Operand& dst, int8_t imm8) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xC6); emit_operand(eax, dst); EMIT(imm8);}void Assembler::mov_b(const Operand& dst, Register src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x88); emit_operand(src, dst);}void Assembler::mov_w(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x66); EMIT(0x8B); emit_operand(dst, src);}void Assembler::mov_w(const Operand& dst, Register src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x66); EMIT(0x89); emit_operand(src, dst);}void Assembler::mov(Register dst, int32_t imm32) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xB8 | dst.code()); emit(imm32);}void Assembler::mov(Register dst, Handle<Object> handle) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xB8 | dst.code()); emit(handle);}void Assembler::mov(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x8B); emit_operand(dst, src);}void Assembler::mov(const Operand& dst, const Immediate& x) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xC7); emit_operand(eax, dst); emit(x);}void Assembler::mov(const Operand& dst, Handle<Object> handle) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xC7); emit_operand(eax, dst); emit(handle);}void Assembler::mov(const Operand& dst, Register src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x89); emit_operand(src, dst);}void Assembler::movsx_b(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x0F); EMIT(0xBE); emit_operand(dst, src);}void Assembler::movsx_w(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x0F); EMIT(0xBF); emit_operand(dst, src);}void Assembler::movzx_b(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x0F); EMIT(0xB6); emit_operand(dst, src);}void Assembler::movzx_w(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x0F); EMIT(0xB7); emit_operand(dst, src);}void Assembler::cmov(Condition cc, Register dst, int32_t imm32) { ASSERT(CpuFeatures::IsEnabled(CpuFeatures::CMOV)); EnsureSpace ensure_space(this); last_pc_ = pc_; UNIMPLEMENTED(); USE(cc); USE(dst); USE(imm32);}void Assembler::cmov(Condition cc, Register dst, Handle<Object> handle) { ASSERT(CpuFeatures::IsEnabled(CpuFeatures::CMOV)); EnsureSpace ensure_space(this); last_pc_ = pc_; UNIMPLEMENTED(); USE(cc); USE(dst); USE(handle);}void Assembler::cmov(Condition cc, Register dst, const Operand& src) { ASSERT(CpuFeatures::IsEnabled(CpuFeatures::CMOV)); EnsureSpace ensure_space(this); last_pc_ = pc_; UNIMPLEMENTED(); USE(cc); USE(dst); USE(src);}void Assembler::adc(Register dst, int32_t imm32) { EnsureSpace ensure_space(this); last_pc_ = pc_; emit_arith(2, Operand(dst), Immediate(imm32));}void Assembler::adc(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x13); emit_operand(dst, src);}void Assembler::add(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x03); emit_operand(dst, src);}void Assembler::add(const Operand& dst, const Immediate& x) { EnsureSpace ensure_space(this); last_pc_ = pc_; emit_arith(0, dst, x);}void Assembler::and_(Register dst, int32_t imm32) { EnsureSpace ensure_space(this); last_pc_ = pc_; emit_arith(4, Operand(dst), Immediate(imm32));}void Assembler::and_(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x23); emit_operand(dst, src);}void Assembler::and_(const Operand& dst, const Immediate& x) { EnsureSpace ensure_space(this); last_pc_ = pc_; emit_arith(4, dst, x);}void Assembler::and_(const Operand& dst, Register src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x21); emit_operand(dst, src);}void Assembler::cmp(Register reg, int32_t imm32) { EnsureSpace ensure_space(this); last_pc_ = pc_; emit_arith(7, Operand(reg), Immediate(imm32));}void Assembler::cmp(Register reg, Handle<Object> handle) { EnsureSpace ensure_space(this); last_pc_ = pc_; emit_arith(7, Operand(reg), Immediate(handle));}void Assembler::cmp(Register reg, const Operand& op) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x3B); emit_operand(reg, op);}void Assembler::cmp(const Operand& op, const Immediate& imm) { EnsureSpace ensure_space(this); last_pc_ = pc_; emit_arith(7, op, imm);}void Assembler::dec_b(Register dst) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xFE); EMIT(0xC8 | dst.code());}void Assembler::dec(Register dst) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x48 | dst.code());}void Assembler::dec(const Operand& dst) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xFF); emit_operand(ecx, dst);}void Assembler::cdq() { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x99);}void Assembler::idiv(Register src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xF7); EMIT(0xF8 | src.code());}void Assembler::imul(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x0F); EMIT(0xAF); emit_operand(dst, src);}void Assembler::imul(Register dst, Register src, int32_t imm32) { EnsureSpace ensure_space(this); last_pc_ = pc_; if (is_int8(imm32)) { EMIT(0x6B); EMIT(0xC0 | dst.code() << 3 | src.code()); EMIT(imm32); } else { EMIT(0x69); EMIT(0xC0 | dst.code() << 3 | src.code()); emit(imm32); }}void Assembler::inc(Register dst) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x40 | dst.code());}void Assembler::inc(const Operand& dst) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xFF); emit_operand(eax, dst);}void Assembler::lea(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x8D); emit_operand(dst, src);}void Assembler::mul(Register src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xF7); EMIT(0xE0 | src.code());}void Assembler::neg(Register dst) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xF7); EMIT(0xD8 | dst.code());}void Assembler::not_(Register dst) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xF7); EMIT(0xD0 | dst.code());}void Assembler::or_(Register dst, int32_t imm32) { EnsureSpace ensure_space(this); last_pc_ = pc_; emit_arith(1, Operand(dst), Immediate(imm32));}void Assembler::or_(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x0B); emit_operand(dst, src);}void Assembler::or_(const Operand& dst, const Immediate& x) { EnsureSpace ensure_space(this); last_pc_ = pc_; emit_arith(1, dst, x);}void Assembler::or_(const Operand& dst, Register src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x09); emit_operand(dst, src);}void Assembler::rcl(Register dst, uint8_t imm8) { EnsureSpace ensure_space(this); last_pc_ = pc_; ASSERT(is_uint5(imm8)); // illegal shift count if (imm8 == 1) { EMIT(0xD1); EMIT(0xD0 | dst.code()); } else { EMIT(0xC1); EMIT(0xD0 | dst.code()); EMIT(imm8); }}void Assembler::sar(Register dst, uint8_t imm8) { EnsureSpace ensure_space(this); last_pc_ = pc_; ASSERT(is_uint5(imm8)); // illegal shift count if (imm8 == 1) { EMIT(0xD1); EMIT(0xF8 | dst.code()); } else { EMIT(0xC1); EMIT(0xF8 | dst.code()); EMIT(imm8); }}void Assembler::sar(Register dst) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xD3); EMIT(0xF8 | dst.code());}void Assembler::sbb(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x1B); emit_operand(dst, src);}void Assembler::shld(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x0F); EMIT(0xA5); emit_operand(dst, src);}void Assembler::shl(Register dst, uint8_t imm8) { EnsureSpace ensure_space(this); last_pc_ = pc_; ASSERT(is_uint5(imm8)); // illegal shift count if (imm8 == 1) { EMIT(0xD1); EMIT(0xE0 | dst.code()); } else { EMIT(0xC1); EMIT(0xE0 | dst.code()); EMIT(imm8); }}void Assembler::shl(Register dst) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xD3); EMIT(0xE0 | dst.code());}void Assembler::shrd(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x0F); EMIT(0xAD); emit_operand(dst, src);}void Assembler::shr(Register dst, uint8_t imm8) { EnsureSpace ensure_space(this); last_pc_ = pc_; ASSERT(is_uint5(imm8)); // illegal shift count EMIT(0xC1); EMIT(0xE8 | dst.code()); EMIT(imm8);}void Assembler::shr(Register dst) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0xD3); EMIT(0xE8 | dst.code());}void Assembler::sub(const Operand& dst, const Immediate& x) { EnsureSpace ensure_space(this); last_pc_ = pc_; emit_arith(5, dst, x);}void Assembler::sub(Register dst, const Operand& src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x2B); emit_operand(dst, src);}void Assembler::sub(const Operand& dst, Register src) { EnsureSpace ensure_space(this); last_pc_ = pc_; EMIT(0x29); emit_operand(dst, src);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -