瀏覽代碼

Show better error for OGetMem using i64 on 32 bit (#734)

tobil4sk 8 月之前
父節點
當前提交
c9c4c8b118
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/jit.c

+ 5 - 0
src/jit.c

@@ -3760,6 +3760,11 @@ int hl_jit_function( jit_ctx *ctx, hl_module *m, hl_function *f ) {
 			break;
 			break;
 		case OGetMem:
 		case OGetMem:
 			{
 			{
+				#ifndef HL_64
+				if (dst->t->kind == HI64) {
+					error_i64();
+				}
+				#endif
 				preg *base = alloc_cpu(ctx, ra, true);
 				preg *base = alloc_cpu(ctx, ra, true);
 				preg *offset = alloc_cpu64(ctx, rb, true);
 				preg *offset = alloc_cpu64(ctx, rb, true);
 				store(ctx, dst, pmem2(&p,base->id,offset->id,1,0), false);
 				store(ctx, dst, pmem2(&p,base->id,offset->id,1,0), false);