static inline void emit_addr_mov_i64(const int reg, const u64 val, struct jit_ctx *ctx) { u64 tmp = val; int shift = 0; emit(A64_MOVZ(1, reg, tmp & 0xffff, shift), ctx); for (;shift < 48;) { tmp >>= 16; shift += 16; emit(A64_MOVK(1, reg, tmp & 0xffff, shift), ctx); } }
static inline void emit_a64_mov_i64(const int reg, const u64 val, struct jit_ctx *ctx) { u64 tmp = val; int shift = 0; emit(A64_MOVZ(1, reg, tmp & 0xffff, shift), ctx); tmp >>= 16; shift += 16; while (tmp) { if (tmp & 0xffff) emit(A64_MOVK(1, reg, tmp & 0xffff, shift), ctx); tmp >>= 16; shift += 16; } }