Recent

Author Topic: [CLOSED] Identifier not found "__m128"  (Read 295 times)

julkas

  • Hero Member
  • *****
  • Posts: 538
  • KISS principle / Lazarus 2.0.6 / FPC 3.0.4
[CLOSED] Identifier not found "__m128"
« on: January 18, 2020, 11:13:10 am »
Cross compiler for AVR build on Win32 fails with error -
Code: Text  [Select]
  1. cpummprocs.inc(1,40) Error: Identifier not found "__m128"
Please help.
« Last Edit: January 18, 2020, 02:11:05 pm by julkas »
procedure mulu64(a, b: QWORD; out clo, chi: QWORD); assembler;
asm
  mov rax, a
  mov rdx, b
  mul rdx
  mov [clo], rax
  mov [chi], rdx
end;

PascalDragon

  • Hero Member
  • *****
  • Posts: 982
  • Compiler Developer
Re: Identifier not found "__m128"
« Reply #1 on: January 18, 2020, 12:22:48 pm »
Should be fixed in revision 43967.

julkas

  • Hero Member
  • *****
  • Posts: 538
  • KISS principle / Lazarus 2.0.6 / FPC 3.0.4
Re: Identifier not found "__m128"
« Reply #2 on: January 18, 2020, 12:32:37 pm »
procedure mulu64(a, b: QWORD; out clo, chi: QWORD); assembler;
asm
  mov rax, a
  mov rdx, b
  mul rdx
  mov [clo], rax
  mov [chi], rdx
end;

PascalDragon

  • Hero Member
  • *****
  • Posts: 982
  • Compiler Developer
Re: Identifier not found "__m128"
« Reply #3 on: January 18, 2020, 01:12:16 pm »
I just committed it a couple minutes ago. The snapshots are done each night (MET). So no. Do a direct SVN checkout instead.

julkas

  • Hero Member
  • *****
  • Posts: 538
  • KISS principle / Lazarus 2.0.6 / FPC 3.0.4
Re: Identifier not found "__m128"
« Reply #4 on: January 18, 2020, 01:17:26 pm »
I just committed it a couple minutes ago. The snapshots are done each night (MET). So no. Do a direct SVN checkout instead.
Can I pull from https://github.com/graemeg/freepascal ?
procedure mulu64(a, b: QWORD; out clo, chi: QWORD); assembler;
asm
  mov rax, a
  mov rdx, b
  mul rdx
  mov [clo], rax
  mov [chi], rdx
end;

ccrause

  • Full Member
  • ***
  • Posts: 229
Re: Identifier not found "__m128"
« Reply #5 on: January 18, 2020, 01:24:58 pm »
I just committed it a couple minutes ago. The snapshots are done each night (MET). So no. Do a direct SVN checkout instead.
Can I pull from https://github.com/graemeg/freepascal ?
Yes, that git mirror auto synchronize with the svn repository very frequently.

julkas

  • Hero Member
  • *****
  • Posts: 538
  • KISS principle / Lazarus 2.0.6 / FPC 3.0.4
Re: Identifier not found "__m128"
« Reply #6 on: January 18, 2020, 01:32:12 pm »
OK. Thanks!
procedure mulu64(a, b: QWORD; out clo, chi: QWORD); assembler;
asm
  mov rax, a
  mov rdx, b
  mul rdx
  mov [clo], rax
  mov [chi], rdx
end;

julkas

  • Hero Member
  • *****
  • Posts: 538
  • KISS principle / Lazarus 2.0.6 / FPC 3.0.4
Re: Identifier not found "__m128"
« Reply #7 on: January 18, 2020, 01:43:18 pm »
I have commented -SfEXCEPTIONS in rtl/embedded/system.cfg. Now build fails with message -
Code: Text  [Select]
  1. C:/OLD_DISK/C_DISK/freepascal/compiler/ppcrossavr.exe -Cpavr5 -Ur -Tembedded -Pavr -Ur -Xs -O2 -n -Fi../inc -Fi../avr -FDC:/OLD_DISK/C_DISK/arduino-1.8.10/hardware/tools/avr/avr/bin -FE. -FUC:/OLD_DISK/C_DISK/freepascal/rtl/units/avr-embedded -davr -dRELEASE -O3 -XX -CX  -Us -Sg system.pp @system.cfg
  2. check.inc(65,6) Fatal: User defined: Using classes requires exceptions
  3. Fatal: Compilation aborted
procedure mulu64(a, b: QWORD; out clo, chi: QWORD); assembler;
asm
  mov rax, a
  mov rdx, b
  mul rdx
  mov [clo], rax
  mov [chi], rdx
end;

ccrause

  • Full Member
  • ***
  • Posts: 229
Re: Identifier not found "__m128"
« Reply #8 on: January 18, 2020, 01:58:17 pm »
I have commented -SfEXCEPTIONS in rtl/embedded/system.cfg. Now build fails with message -
Code: Text  [Select]
  1. C:/OLD_DISK/C_DISK/freepascal/compiler/ppcrossavr.exe -Cpavr5 -Ur -Tembedded -Pavr -Ur -Xs -O2 -n -Fi../inc -Fi../avr -FDC:/OLD_DISK/C_DISK/arduino-1.8.10/hardware/tools/avr/avr/bin -FE. -FUC:/OLD_DISK/C_DISK/freepascal/rtl/units/avr-embedded -davr -dRELEASE -O3 -XX -CX  -Us -Sg system.pp @system.cfg
  2. check.inc(65,6) Fatal: User defined: Using classes requires exceptions
  3. Fatal: Compilation aborted
Keep going then, comment out -SfCLASSES.  If you want to save code footprint then disabling both exception and class support makes sense.

julkas

  • Hero Member
  • *****
  • Posts: 538
  • KISS principle / Lazarus 2.0.6 / FPC 3.0.4
Re: Identifier not found "__m128"
« Reply #9 on: January 18, 2020, 02:00:45 pm »
I have commented -SfEXCEPTIONS in rtl/embedded/system.cfg. Now build fails with message -
Code: Text  [Select]
  1. C:/OLD_DISK/C_DISK/freepascal/compiler/ppcrossavr.exe -Cpavr5 -Ur -Tembedded -Pavr -Ur -Xs -O2 -n -Fi../inc -Fi../avr -FDC:/OLD_DISK/C_DISK/arduino-1.8.10/hardware/tools/avr/avr/bin -FE. -FUC:/OLD_DISK/C_DISK/freepascal/rtl/units/avr-embedded -davr -dRELEASE -O3 -XX -CX  -Us -Sg system.pp @system.cfg
  2. check.inc(65,6) Fatal: User defined: Using classes requires exceptions
  3. Fatal: Compilation aborted
Keep going then, comment out -SfCLASSES.  If you want to save code footprint then disabling both exception and class support makes sense.
OK with -
Code: Text  [Select]
  1. # does not require extra memory, neither code nor data
  2. # in programs not using e. g. writeln based I/O which is the common case for AVR
  3. #ifdef CPUAVR
  4. -SfOBJECTS
  5. # -SfEXCEPTIONS
  6. # -SfCLASSES
  7. -SfRTTI
  8. # AVR6 has normally more memory, so enable more functions
  9. #ifdef CPUAVR6
  10. -SfANSISTRINGS
  11. -SfWIDESTRINGS
  12. -SfDYNARRAYS
  13. -SfTHREADING
  14. -SfVARIANTS
  15. -SfOBJECTS
  16. -SfCOMMANDARGS
  17. -SfRANDOM
  18. -SfRESOURCES
  19. #endif
  20. #endif
  21.  
procedure mulu64(a, b: QWORD; out clo, chi: QWORD); assembler;
asm
  mov rax, a
  mov rdx, b
  mul rdx
  mov [clo], rax
  mov [chi], rdx
end;