aboutsummaryrefslogtreecommitdiff
path: root/src/ejit.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-04-02 21:13:03 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2025-04-02 21:13:03 +0300
commitd8f9699debd435da5e1aef22c94c47154be4e2be (patch)
tree3c01f1844a4832378f1fd288821200abcdfc3988 /src/ejit.c
parenta9b21a1d5c55939cf3db1f3d5c857760601adb3b (diff)
downloadejit-d8f9699debd435da5e1aef22c94c47154be4e2be.tar.gz
ejit-d8f9699debd435da5e1aef22c94c47154be4e2be.zip
fix big endian compilation
+ Code used some assumptions about type aliasing that might not hold for all systems
Diffstat (limited to 'src/ejit.c')
-rw-r--r--src/ejit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ejit.c b/src/ejit.c
index 2224198..0ee3986 100644
--- a/src/ejit.c
+++ b/src/ejit.c
@@ -1726,6 +1726,10 @@ struct ejit_arg ejit_run_func(struct ejit_func *f, size_t argc, struct ejit_arg
};
case EJIT_UINT64:
+ return (struct ejit_arg){
+ .u64 = ejit_run_func_l(f, argc, args),
+ .type = f->rtype
+ };
case EJIT_INT64:
return (struct ejit_arg){
.i64 = ejit_run_func_l(f, argc, args),
@@ -1734,7 +1738,7 @@ struct ejit_arg ejit_run_func(struct ejit_func *f, size_t argc, struct ejit_arg
default:
return (struct ejit_arg){
- .i64 = ejit_run_func_i(f, argc, args),
+ .l = ejit_run_func_i(f, argc, args),
.type = f->rtype
};
}