Recent

Author Topic: [solved]fpcup cross32-64 lcl compiling fail after fpc r24896(avx support).  (Read 3699 times)

parcel

  • Full Member
  • ***
  • Posts: 135
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;

« Last Edit: June 17, 2013, 02:51:30 am by parcel »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8114
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: fpcup cross32-64 lcl compiling fail after fpc r24896(avx support).
« Reply #1 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)

parcel

  • Full Member
  • ***
  • Posts: 135
Re: fpcup cross32-64 lcl compiling fail after fpc r24896(avx support).
« Reply #2 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;   

parcel

  • Full Member
  • ***
  • Posts: 135
Re: fpcup cross32-64 lcl compiling fail after fpc r24896(avx support).
« Reply #3 on: June 17, 2013, 02:51:01 am »
solved r24909.  :)