本文整理汇总了C++中asmjit::X86Assembler类的典型用法代码示例。如果您正苦于以下问题:C++ X86Assembler类的具体用法?C++ X86Assembler怎么用?C++ X86Assembler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了X86Assembler类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: virtual_push
void virtual_push(asmjit::X86Assembler& a, MemoryMapper& m, T value) {
a.mov(REG_TMP, 0x0100);
// @CLEANUP TMP is rax, but we can't or with a larger register
a.add(asmjit::x86::al, REG_SP);
m.emitDynamicStore(a, REG_TMP, value);
a.dec(REG_SP);
}
示例2: virtual_pop
void virtual_pop(asmjit::X86Assembler& a, MemoryMapper& m, T dst) {
a.inc(REG_SP);
a.mov(REG_TMP, 0x0100);
// @CLEANUP TMP is rax, but we can't or with a larger register
a.add(asmjit::x86::al, REG_SP);
m.emitDynamicLoad(a, REG_TMP, dst);
}
示例3: exp
bool LDXImmInstr::exp(asmjit::X86Assembler& a, MemoryMapper& m) {
a.mov(REG_X, this->m_value);
// Immediate mode knows the value at compile time, so just emit the right
// thing
if(this->m_value == 0)
a.bts(REG_S, S_ZERO);
else
a.btr(REG_S, S_ZERO);
return true;
}
示例4: emitDump
static void emitDump(asmjit::X86Assembler& a) {
a.push(asmjit::x86::r10);
a.push(asmjit::x86::r11);
a.mov(asmjit::x86::dil, REG_A);
a.mov(asmjit::x86::sil, REG_X);
a.mov(asmjit::x86::dl, REG_Y);
a.mov(asmjit::x86::cl, REG_S);
a.call((uint64_t)&dump);
a.pop(asmjit::x86::r11);
a.pop(asmjit::x86::r10);
}
示例5: emitLoad
void RamMemoryBank::emitLoad(asmjit::X86Assembler& a, uint16_t addr, asmjit::X86Gp dest) {
auto temp = asmjit::x86::rax;
a.mov(temp, (uint64_t)this->memory.get() + addr);
a.mov(dest, asmjit::x86::byte_ptr(temp));
}
示例6: emitStore
void RamMemoryBank::emitStore(asmjit::X86Assembler& a, uint16_t addr, asmjit::X86Gp src) {
auto temp = asmjit::x86::rax;
a.mov(temp, (uint64_t)this->memory.get() + addr);
a.mov(asmjit::x86::byte_ptr(temp), src);
}