allow load of float32 constants
@@ -3094,10 +3094,11 @@ int hl_jit_function( jit_ctx *ctx, hl_module *m, hl_function *f ) {
op64(ctx,XORPD,f,f);
} else switch( dst->t->kind ) {
case HF64:
+ case HF32:
# ifdef HL_64
- op64(ctx,MOVSD,alloc_fpu(ctx,dst,false),pcodeaddr(&p,o->p2 * 8));
+ op64(ctx,dst->t->kind == HF32 ? MOVSS : MOVSD,alloc_fpu(ctx,dst,false),pcodeaddr(&p,o->p2 * 8));
# else
- op64(ctx,MOVSD,alloc_fpu(ctx,dst,false),paddr(&p,m->code->floats + o->p2));
+ op64(ctx,dst->t->kind == HF32 ? MOVSS : MOVSD,alloc_fpu(ctx,dst,false),paddr(&p,m->code->floats + o->p2));
# endif
break;
default:
