diff --git a/compiler/arm/cgcpu.pas b/compiler/arm/cgcpu.pas index 68c72683b2..1b73c9bbfb 100644 --- a/compiler/arm/cgcpu.pas +++ b/compiler/arm/cgcpu.pas @@ -1729,7 +1729,7 @@ unit cgcpu; LocalSize:=align(LocalSize,4); { call instruction does not put anything on the stack } stackmisalignment:=0; - tarmprocinfo(current_procinfo).stackpaddingreg:=-1; + tarmprocinfo(current_procinfo).stackpaddingreg:=High(TSuperRegister); if not(nostackframe) then begin firstfloatreg:=RS_NO; @@ -1948,7 +1948,7 @@ unit cgcpu; saveregs, regs : tcpuregisterset; stackmisalignment: pint; - paddingreg: aint; + paddingreg: TSuperRegister; mmpostfix: toppostfix; imm1, imm2: DWord; begin @@ -2075,7 +2075,7 @@ unit cgcpu; { reapply the stack padding reg, in case there was one, see the complimentary comment in g_proc_entry() (KB) } paddingreg:=tarmprocinfo(current_procinfo).stackpaddingreg; - if paddingreg >= RS_R0 then + if paddingreg < RS_R4 then if paddingreg in regs then internalerror(201306190) else diff --git a/compiler/arm/cpupi.pas b/compiler/arm/cpupi.pas index 817789320f..9087a3944a 100644 --- a/compiler/arm/cpupi.pas +++ b/compiler/arm/cpupi.pas @@ -29,7 +29,7 @@ unit cpupi; uses globtype,cutils, - procinfo,cpuinfo,psub, + procinfo,cpuinfo,psub,cgbase, aasmdata; type @@ -40,7 +40,7 @@ unit cpupi; if this size is too little the procedure must be compiled again with a larger value } stackframesize, floatregstart : aint; - stackpaddingreg: aint; + stackpaddingreg: TSuperRegister; // procedure handle_body_start;override; // procedure after_pass1;override; procedure set_first_temp_offset;override; @@ -58,7 +58,7 @@ unit cpupi; cpubase, tgobj, symconst,symtype,symsym,paramgr, - cgbase,cgutils, + cgutils, cgobj, defutil;