From 67a13eb82534996fbd6ba2fc0c36d3e1284bcd8e Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 26 Mar 2025 13:17:58 +0200 Subject: handle immediates a bit better + Passing floats as immediate values is not supported in lightening, but I might have a go at adding it since it seems like a useful feature at some point --- src/ejit.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ejit.c') diff --git a/src/ejit.c b/src/ejit.c index 0a0e7a1..94c69e6 100644 --- a/src/ejit.c +++ b/src/ejit.c @@ -1,4 +1,5 @@ #include +#include #include #include @@ -161,6 +162,8 @@ static void emit_insn_af(struct ejit_func *f, enum ejit_opcode op, size_t idx, e static void emit_insn_ad(struct ejit_func *f, enum ejit_opcode op, size_t idx, enum ejit_type type, double d) { + fprintf(stderr, "warning: immediate floats are currently not supported.\n" + "Consider moving values into FPRs.\n"); struct ejit_insn i = {.op = op, .r0 = idx, .r1 = type, .d = d}; insns_append(&f->insns, i); } -- cgit v1.2.3