Lazarus

Installation => General => Topic started by: parcel on June 15, 2013, 11:33:52 pm

Title: [solved]fpcup cross32-64 lcl compiling fail after fpc r24896(avx support).
Post by: parcel on June 15, 2013, 11:33:52 pm
I got new error with new fpc trunk r24896. Only happens 64bit cross compiling and 32bit compiler works ok. It maybe trouble on 64bit compiler, I guess.

Anyone have solve this problem?

Code: [Select]
Compiling graphmath.pp
graphmath.pp(743,65) Fatal: Internal error 200310121
TExternalToolList.Run Exception: C:\development\lazarus\lcl\graphmath.pp(743,65)
 Fatal: Internal error 200310121
ERROR: tool reported error     

Code: [Select]
function EllipseRadialLength(Rect : TRect; EccentricAngle : Extended) : Longint;
var
  a, b, R : Extended;
begin
  a := (Rect.Right - Rect.Left) div 2;
  b := (Rect.Bottom - Rect.Top) div 2;
  R := Sqr(a)*Sqr(b);
  if R <> 0 then
    R := Sqrt(R / ((Sqr(b)*Sqr(Cos(DegToRad(EccentricAngle/16)))) + // <--- Error
      (Sqr(a)*Sqr(Sin(DegToRad(EccentricAngle/16))))));
  Result := TruncToInt(R);
end;   


Code: [Select]
    procedure tcg.a_loadmm_loc_reg(list: TAsmList; size: tcgsize; const loc: tlocation; const reg: tregister;shuffle : pmmshuffle);
      begin
        case loc.loc of
          LOC_MMREGISTER,LOC_CMMREGISTER:
            a_loadmm_reg_reg(list,loc.size,size,loc.register,reg,shuffle);
          LOC_REFERENCE,LOC_CREFERENCE:
            a_loadmm_ref_reg(list,loc.size,size,loc.reference,reg,shuffle);
          LOC_REGISTER,LOC_CREGISTER:
            a_loadmm_intreg_reg(list,loc.size,size,loc.register,reg,shuffle);
          else
            internalerror(200310121);
        end;
      end;

Title: Re: fpcup cross32-64 lcl compiling fail after fpc r24896(avx support).
Post by: Leledumbo on June 16, 2013, 04:22:38 am
Report to ugtracker with simple example that demonstrates this behavior (I guess a FAQ entry on internal error should be made so people don't ask anymore)
Title: Re: fpcup cross32-64 lcl compiling fail after fpc r24896(avx support).
Post by: parcel on June 16, 2013, 06:42:26 am
Report to ugtracker with simple example that demonstrates this behavior (I guess a FAQ entry on internal error should be made so people don't ask anymore)

Thank you  :)

I temporary solve problem and more digging it  :D

Code: [Select]
function EllipseRadialLength(Rect : TRect; EccentricAngle : Extended) : Longint;
var
  a, b, R, c, d : Extended;
begin
  a := (Rect.Right - Rect.Left) div 2;
  b := (Rect.Bottom - Rect.Top) div 2;
  R := Sqr(a)*Sqr(b);
  if R <> 0 then begin // tweak
    c :=Cos(DegToRad(EccentricAngle/16));
    d :=Sin(DegToRad(EccentricAngle/16));
    R := Sqrt(R / ((Sqr(b)*Sqr(c))) +
      (Sqr(a)*Sqr(d)));
  end;
  Result := TruncToInt(R);
end;   
Title: Re: fpcup cross32-64 lcl compiling fail after fpc r24896(avx support).
Post by: parcel on June 17, 2013, 02:51:01 am
solved r24909.  :)
TinyPortal © 2005-2018