aboutsummaryrefslogtreecommitdiff
path: root/src/ejit.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-04-01 22:16:25 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2025-04-01 22:16:25 +0300
commit478c92b425eca53a0d884fb8f5dea8d769016858 (patch)
treed5d85feb1b796530429221d51ab88c8c7f1a0b55 /src/ejit.c
parent4135845b93d5c0eab23ad5da526b03a911878d67 (diff)
downloadejit-478c92b425eca53a0d884fb8f5dea8d769016858.tar.gz
ejit-478c92b425eca53a0d884fb8f5dea8d769016858.zip
expose sqrt
+ Requires linking with libm in some cases, which is fine I suppose, but kind of annoying
Diffstat (limited to 'src/ejit.c')
-rw-r--r--src/ejit.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ejit.c b/src/ejit.c
index e7e2ff2..2224198 100644
--- a/src/ejit.c
+++ b/src/ejit.c
@@ -1371,6 +1371,16 @@ void ejit_truncr_f_64(struct ejit_func *s, struct ejit_gpr r0,
emit_insn_orf(s, EJIT_OP_TRUNCR_F_64, r0, f1);
}
+void ejit_sqrtr_f(struct ejit_func *s, struct ejit_fpr r0, struct ejit_fpr r1)
+{
+ emit_insn_off(s, EJIT_OP_SQRTR_F, r0, r1);
+}
+
+void ejit_sqrtr_d(struct ejit_func *s, struct ejit_fpr r0, struct ejit_fpr r1)
+{
+ emit_insn_off(s, EJIT_OP_SQRTR_D, r0, r1);
+}
+
struct ejit_reloc ejit_bner(struct ejit_func *s, struct ejit_gpr r0,
struct ejit_gpr r1)
{