AsmJit supports immediate operands, all you need is:
using namespace asmjit;
// Create and configure X86Assembler:
X86Assembler a(...);
// The answer:
int x = 234;
a.mov(x86::rax, x);
or just
a.mov(x86::rax, 234);
The previous examples used function overloads that accept immediate values directly. However, it's also possible to create the Imm operand and use it in your code dynamically:
AsmJit supports immediate operands, all you need is:
or just
The previous examples used function overloads that accept immediate values directly. However, it's also possible to create the
Immoperand and use it in your code dynamically:Or: