Bläddra i källkod

* 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 år sedan
förälder
incheckning
1adeec6212
1 ändrade filer med 2 tillägg och 2 borttagningar
  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;