Explorar o código

one more x64 linux fix

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

+ 3 - 1
src/jit.c

@@ -1370,7 +1370,9 @@ static void set_native_arg( jit_ctx *ctx, preg *r ) {
 static void set_native_arg_fpu( jit_ctx *ctx, preg *r, bool isf32 ) {
 #	ifdef HL_64
 	if( r->kind == RCPU ) ASSERT(0);
-	preg *target = REG_AT(XMM(IS_WINCALL64 ? --ctx->nativeArgsCount : ctx->nativeArgsCount));
+	// can only be used if last argument !!
+	ctx->nativeArgsCount--;
+	preg *target = REG_AT(XMM(IS_WINCALL64 ? ctx->nativeArgsCount : 0));
 	if( target != r ) {
 		op64(ctx, isf32 ? MOVSS : MOVSD, target, r);
 		scratch(target);