Recent

Author Topic: Internal error  (Read 790 times)

LemonParty

  • Full Member
  • ***
  • Posts: 159
Internal error
« on: March 18, 2025, 04:33:23 pm »
Hello.
I get this error Fatal: Internal error 2009112903 on line
Code: ASM  [Select][+][-]
  1. ldr     q1, [x9]
FPC version 3.2.2, architecture AARCH64.
Why is this happening?

jamie

  • Hero Member
  • *****
  • Posts: 6867
Re: Internal error
« Reply #1 on: March 18, 2025, 04:52:07 pm »
Maybe x09
It
The only true wisdom is knowing you know nothing

PascalDragon

  • Hero Member
  • *****
  • Posts: 5930
  • Compiler Developer
Re: Internal error
« Reply #2 on: March 18, 2025, 08:24:30 pm »
I get this error Fatal: Internal error 2009112903 on line
Code: ASM  [Select][+][-]
  1. ldr     q1, [x9]
FPC version 3.2.2, architecture AARCH64.
Why is this happening?

Please report a bug with a complete, self contained example.

d2010

  • Full Member
  • ***
  • Posts: 139
Re: Internal error
« Reply #3 on: March 21, 2025, 04:16:01 am »
In old days,year1995, with BP7w, I remember. this trick
Code: [Select]
  PUSH X9
  POP Q1
Eu multumesc ArsenieBoca.
Code: [Select]
Var d1,d2,d3:word;
 Begin asm mov ax,[d1]
                 push ax
                 mov ax,[d2]
                 push ax
                 mov ax,[d3]
                 pop   Rax
   end;
End;

O you make backup of q1
Code: [Select]
Var IsaveQ1:int64;
Begin  IsaveQ1:=asm.Q1;
Maybe x09
It
Code: [Select]
    asm.Q1:=IsaveQ1
End;
               

« Last Edit: March 21, 2025, 04:20:22 am by d2010 »

WooBean

  • Sr. Member
  • ****
  • Posts: 282
Re: Internal error
« Reply #4 on: March 21, 2025, 08:18:23 am »
Hello.
I get this error Fatal: Internal error 2009112903 on line
Code: ASM  [Select][+][-]
  1. ldr     q1, [x9]
FPC version 3.2.2, architecture AARCH64.
Why is this happening?

More Pascalish context looks like below:
Code: Pascal  [Select][+][-]
  1. function reg_cgsize(const reg: tregister): tcgsize;
  2.       begin
  3.         case getregtype(reg) of
  4.           R_INTREGISTER:
  5.             case getsubreg(reg) of
  6.               R_SUBD:
  7.                 result:=OS_32
  8.               else
  9.                 result:=OS_64;
  10.             end;
  11.           R_MMREGISTER :
  12.             begin
  13.               case getsubreg(reg) of
  14.                 R_SUBMMD:
  15.                   result:=OS_F64;
  16.                 R_SUBMMS:
  17.                   result:=OS_F32;
  18.                 R_SUBMMWHOLE:
  19.                   result:=OS_M128;
  20.                 else
  21.                   internalerror(2009112903);
  22.               end;
  23.             end;
  24.           else
  25.             internalerror(200303181);
  26.           end;
  27.         end;
  28.  
  29.  

The citation above taken from FPC source "\fpcsrc\compiler\aarch64\cpubase.pas".

This suggest that:
- presented asm code for aarch64 architecture is invalid,  or
- FPC was written in a hurry at this point (much less possible).
« Last Edit: March 21, 2025, 08:36:16 am by WooBean »
Platforms: Win7/64, Linux Mint Ulyssa/64

PascalDragon

  • Hero Member
  • *****
  • Posts: 5930
  • Compiler Developer
Re: Internal error
« Reply #5 on: March 22, 2025, 09:52:18 am »
This suggest that:
- presented asm code for aarch64 architecture is invalid,  or
- FPC was written in a hurry at this point (much less possible).

Especially for the assembly readers its more possible than you might think, considering that one does not have every possible construct in mind that a user might use. (I'm saying this as someone who already fixed a bunch of errors in the assembler readers 😅)

That's why I said to LemonParty to please report a bug.

 

TinyPortal © 2005-2018