diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2020-09-14 14:36:39 -0400 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:23 -0400 |
commit | 3739588811a621ccfd00aa7f8ad804cd1c60f92d (patch) | |
tree | c1228d4249a6f6222b95c003a14d3fe5612c95bb /ujit_asm.c | |
parent | ca47899ccf9547223f4c64fc4b0837796bee09af (diff) |
Remove PC argument from ujit instructions
Diffstat (limited to 'ujit_asm.c')
-rw-r--r-- | ujit_asm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ujit_asm.c b/ujit_asm.c index dcf1be07f1..67e739f8ad 100644 --- a/ujit_asm.c +++ b/ujit_asm.c @@ -97,6 +97,17 @@ x86opnd_t imm_opnd(int64_t imm) return opnd; } +x86opnd_t const_ptr_opnd(void* ptr) +{ + x86opnd_t opnd = { + OPND_IMM, + 64, + .unsig_imm = (uint64_t)ptr + }; + + return opnd; +} + void cb_init(codeblock_t* cb, size_t mem_size) { // Map the memory as executable |