summaryrefslogtreecommitdiff
path: root/yjit_asm.h
diff options
context:
space:
mode:
authorNoah Gibbs <noah.gibbs@shopify.com>2021-10-01 12:17:09 +0100
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:42 -0400
commitbe06112d48b763da1e3f29b03e5e59d2a44e7b72 (patch)
tree8f15daffd7b106ff642b100e9dec22df49084b5d /yjit_asm.h
parentf36a5a98c02ba38d05d345104b1a6d0c0c1af29b (diff)
Fix changes from rebase
Diffstat (limited to 'yjit_asm.h')
-rw-r--r--yjit_asm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/yjit_asm.h b/yjit_asm.h
index a9796b8584..2502a2084c 100644
--- a/yjit_asm.h
+++ b/yjit_asm.h
@@ -233,6 +233,10 @@ static const x86opnd_t R15B = { OPND_REG, 8, .as.reg = { REG_GP, 15 }};
#define NUM_C_ARG_REGS 6
#define C_ARG_REGS ( (x86opnd_t[]){ RDI, RSI, RDX, RCX, R8, R9 } )
+// Compute the number of bits needed to store a signed or unsigned value
+uint32_t sig_imm_size(int64_t imm);
+uint32_t unsig_imm_size(uint64_t imm);
+
// Memory operand with base register and displacement/offset
x86opnd_t mem_opnd(uint32_t num_bits, x86opnd_t base_reg, int32_t disp);