瀏覽代碼

* fixed unaryminus overflow check for high level targets (call helper via
hlcg, and use compproc name)
* fixed unaryminus overflow check for targets that use the generic code
for both 32 and 64 bit integers even if their "native" integer size
is 32 bit (by not checking against low(aint), but opsize.low)

git-svn-id: trunk@22807 -

Jonas Maebe 13 年之前
父節點
當前提交
1adeec6212
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      compiler/ncgmat.pas

+ 2 - 2
compiler/ncgmat.pas

@@ -249,8 +249,8 @@ implementation
         if (cs_check_overflow in current_settings.localswitches) then
           begin
             current_asmdata.getjumplabel(hl);
-            hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,opsize,OC_NE,low(aint),location.register,hl);
-            cg.a_call_name(current_asmdata.CurrAsmList,'FPC_OVERFLOW',false);
+            hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,opsize,OC_NE,torddef(opsize).low.svalue,location.register,hl);
+            hlcg.g_call_system_proc(current_asmdata.CurrAsmList,'fpc_overflow',nil);
             hlcg.a_label(current_asmdata.CurrAsmList,hl);
           end;
       end;