瀏覽代碼

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

Nicolas Cannasse 6 年之前
父節點
當前提交
eebe567ee9
共有 1 個文件被更改,包括 2 次插入0 次删除
  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;
 		case OToSFloat:
+			if( ra == dst ) break;
 			if( ra->t->kind == HI32 ) {
 				preg *r = alloc_cpu(ctx,ra,true);
 				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;
 		case OToInt:
+			if( ra == dst ) break;
 			if( ra->t->kind == HF64 ) {
 				preg *r = alloc_fpu(ctx,ra,true);
 				preg *w = alloc_cpu(ctx,dst,false);