summaryrefslogtreecommitdiff
path: root/ujit_asm.c
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2020-09-14 14:36:39 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:23 -0400
commit3739588811a621ccfd00aa7f8ad804cd1c60f92d (patch)
treec1228d4249a6f6222b95c003a14d3fe5612c95bb /ujit_asm.c
parentca47899ccf9547223f4c64fc4b0837796bee09af (diff)
Remove PC argument from ujit instructions
Diffstat (limited to 'ujit_asm.c')
-rw-r--r--ujit_asm.c11
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