当前位置: 首页>>代码示例>>C++>>正文


C++ asmjit::X86Assembler类代码示例

本文整理汇总了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);
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例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);
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例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;
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例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);
}
开发者ID:,项目名称:,代码行数:13,代码来源:

示例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));
}
开发者ID:,项目名称:,代码行数:5,代码来源:

示例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);
}
开发者ID:,项目名称:,代码行数:5,代码来源:


注:本文中的asmjit::X86Assembler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。