Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

32 bit JIT error with nightly haxe #708

Open
tobil4sk opened this issue Sep 3, 2024 · 1 comment
Open

32 bit JIT error with nightly haxe #708

tobil4sk opened this issue Sep 3, 2024 · 1 comment

Comments

@tobil4sk
Copy link
Member

tobil4sk commented Sep 3, 2024

As mentioned in HaxeFoundation/haxe#11734 (comment), 32 bit builds of hashlink fail to run any program and exit with the error:

JIT ERROR 0 (jit.c line 1242)

Here is the line where the error is coming from:

ASSERT(0);

This only came up on the CMake build (which has since been disabled), but it also affects the vs2019 build, it's just that those builds don't run any tests.

@tobil4sk
Copy link
Member Author

tobil4sk commented Sep 3, 2024

This patch seems to avoid the error, but I'm not sure if it's correct:

diff --git a/src/jit.c b/src/jit.c
index 7571090..b971f85 100644
--- a/src/jit.c
+++ b/src/jit.c
@@ -1238,7 +1238,7 @@ static void store( jit_ctx *ctx, vreg *r, preg *v, bool bind ) {
                r->current = NULL;
        }
        v = copy(ctx,&r->stack,v,r->size);
-       if( IS_FLOAT(r) != (v->kind == RFPU) )
+       if( (IS_FLOAT(r) || (!IS_64 && r->t->kind == HI64)) != (v->kind == RFPU) )^M
                ASSERT(0);
        if( bind && r->current != v && (v->kind == RCPU || v->kind == RFPU) ) {
                scratch(v);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant