Explorar o código

fixed HVIRTUAL dynamic call in x64

ncannasse %!s(int64=7) %!d(string=hai) anos
pai
achega
9c7587aeea
Modificáronse 1 ficheiros con 6 adicións e 5 borrados
  1. 6 5
      src/jit.c

+ 6 - 5
src/jit.c

@@ -3429,12 +3429,13 @@ int hl_jit_function( jit_ctx *ctx, hl_module *m, hl_function *f ) {
 
 					jit_buf(ctx);
 
-					size = begin_native_call(ctx, 5);
-					if( !need_dyn )
+					if( !need_dyn ) {
+						size = begin_native_call(ctx, 5);
 						set_native_arg(ctx, pconst(&p,0));
-					else {
-						preg *rtmp = alloc_native_arg(ctx);
-						op64(ctx,LEA,rtmp,pmem(&p,Esp,paramsSize - sizeof(vdynamic) + (size - HL_WSIZE*5)));
+					} else {
+						preg *rtmp = alloc_reg(ctx,RCPU);
+						op64(ctx,LEA,rtmp,pmem(&p,Esp,paramsSize - sizeof(vdynamic)));
+						size = begin_native_call(ctx, 5);
 						set_native_arg(ctx,rtmp);
 						if( !IS_64 ) RUNLOCK(rtmp);
 					}