We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ca7240 commit 1ae750fCopy full SHA for 1ae750f
ujit_codegen.c
@@ -292,7 +292,19 @@ gen_putobject(jitstate_t* jit, ctx_t* ctx)
292
{
293
// Keep track of the fixnum type tag
294
x86opnd_t stack_top = ctx_stack_push(ctx, T_FIXNUM);
295
- mov(cb, stack_top, imm_opnd((int64_t)arg));
+
296
+ x86opnd_t imm = imm_opnd((int64_t)arg);
297
298
+ // 64-bit immediates can't be directly written to memory
299
+ if (imm.num_bits <= 32)
300
+ {
301
+ mov(cb, stack_top, imm);
302
+ }
303
+ else
304
305
+ mov(cb, REG0, imm);
306
+ mov(cb, stack_top, REG0);
307
308
}
309
else if (arg == Qtrue || arg == Qfalse)
310
0 commit comments