Browse Source

fixed toint R,R or tosfloat R,R JIT (should be no-op)

Nicolas Cannasse 6 years ago
parent
commit
eebe567ee9
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/jit.c

+ 2 - 0
src/jit.c

@@ -2992,6 +2992,7 @@ int hl_jit_function( jit_ctx *ctx, hl_module *m, hl_function *f ) {
 			}
 			}
 			break;
 			break;
 		case OToSFloat:
 		case OToSFloat:
+			if( ra == dst ) break;
 			if( ra->t->kind == HI32 ) {
 			if( ra->t->kind == HI32 ) {
 				preg *r = alloc_cpu(ctx,ra,true);
 				preg *r = alloc_cpu(ctx,ra,true);
 				preg *w = alloc_fpu(ctx,dst,false);
 				preg *w = alloc_fpu(ctx,dst,false);
@@ -3019,6 +3020,7 @@ int hl_jit_function( jit_ctx *ctx, hl_module *m, hl_function *f ) {
 			}
 			}
 			break;
 			break;
 		case OToInt:
 		case OToInt:
+			if( ra == dst ) break;
 			if( ra->t->kind == HF64 ) {
 			if( ra->t->kind == HF64 ) {
 				preg *r = alloc_fpu(ctx,ra,true);
 				preg *r = alloc_fpu(ctx,ra,true);
 				preg *w = alloc_cpu(ctx,dst,false);
 				preg *w = alloc_cpu(ctx,dst,false);