Forum > Free Pascal

Preparing FPC 3.2.4, point out road blocks now

<< < (2/12) > >>

FPK:

--- Quote from: Alextp on October 25, 2021, 12:49:26 pm ---I wonder when the FreeBSD patch will be merged? https://github.com/Alexey-T/CudaText/blob/master/doc/freebsd-v12-support-for-fpc32.patch

--- End quote ---

Is this a regression with regard to 3.2.2 or 3.0.4? If not, please do not glutter this thread with unrelated stuff.

AlexTP:
No, it's not a regression, sorry.

Seenkao:
Сделать обработку оптимизации для каждой ОС. Ссылки и код.

Eng: Do optimization processing for each OS. Links and code:

https://forum.lazarus.freepascal.org/index.php/topic,56719.0.html

--- Quote from: Seenkao on October 14, 2021, 12:32:20 am ---FPC 3.2.1, Linux-Debian 10
-al

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  useEl^.rh2 := ry1 + 30 + 33;// assembler//      movaps  %xmm1,%xmm2//      movq    _$DRAWALL$_Ld1@GOTPCREL(%rip),%rdx//      addss   (%rdx),%xmm2//      movq    _$DRAWALL$_Ld48@GOTPCREL(%rip),%rdx//      addss   (%rdx),%xmm2//      movss   %xmm2,28(%rax).Ll56:  useEl^.tx21 := rx1 + 5;// assembler//      movaps  %xmm0,%xmm2//      movq    _$DRAWALL$_Ld16@GOTPCREL(%rip),%rdx//      addss   (%rdx),%xmm2//      movss   %xmm2,56(%rax)
--- End quote ---


--- Quote from: ASerge on October 16, 2021, 10:55:46 am ---Interestingly, Delphi considers constants as a Double type, but sums constants at compile time, no matter in what order it go.
From Delphi 10.4 disassembler:

--- Code: ASM  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Project1.dpr.10: R.rh2 := 30 + 33 + D + 28;000000000040D51F F3480F5A0580280000 cvtss2sd xmm0,qword ptr [rel $00002880]000000000040D528 F20F580528000000 addsd xmm0,qword ptr [rel $00000028]000000000040D530 F2480F5AC0       cvtsd2ss xmm0,xmm0000000000040D535 F30F1105A38C0000 movss dword ptr [rel $00008ca3],xmm0
--- End quote ---

Я проверил и для FPC/Lazarus, код получается подобный Delphi. Данная оптимизация работает на Windows. Но не работает на Linux.

При одном и том же коде паскаля это потеря примерно 8% скорости работы кода для Linux (где это используется).

Eng: I also checked for FPC/Lazarus, the code turns out to be similar to Delphi. This optimization works on Windows. But it doesn't work on Linux.

With the same pascal code, this is a loss of about 8% of the code speed for Linux (where it is used).

FPK:

--- Quote from: Fred vS on October 25, 2021, 02:21:39 pm ---
--- Quote from: FPK on October 25, 2021, 07:57:25 am ---Currently we are in the process of preparing the 3.2.4 release, mainly by merging stuff from main into fixes. If there are any problems with 3.2.2 prevent you from using 3.2.2, it is now the time to point this out :), i.e. if you are stuck with 3.0.4 for some reasons.

--- End quote ---

Hello.

Nice!

Please, if possible, could you make work -Cg -k-pie -k-znow for Linux?

See here:
https://forum.lazarus.freepascal.org/index.php/topic,56842.0.html

It works perfectly with fpc 3.0.4 and fpc 3.3.1.

--- End quote ---

Can you please check after baa28faa19 with main/3.3.1? If it helps, I merge it.

Fred vS:

--- Quote from: FPK on October 25, 2021, 09:41:56 pm ---Can you please check after baa28faa19 with main/3.3.1? If it helps, I merge it.

--- End quote ---

Hello Florian.

Downloaded commit of today 25/10/2021 23:10 : 5c7974fceb768f96853b4abc05cb122ac8ccfd0c
from https://gitlab.com/freepascal.org/fpc/source main branch.

Compiled + installed = OK.

Using -Cg -k-pie -k-znow for a program with BGRABitmap.

It compiles and link without any warning at linking.  ;D


--- Quote ---Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.3.1 [2021/10/25] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
(1002) Target OS: Linux for x86-64
(3104) Compiling strumpract.pas
...
(9015) Linking strumpract
(1008) 567509 lines compiled, 14.7 sec, 4011696 bytes code, 2594736 bytes data
(1021) 184 warning(s) issued
(1022) 3112 hint(s) issued
(1023) 407 note(s) issued
--- End quote ---

Result:


--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---fred@fredvs ~> file /home/fred/strumpract/src/strumpract

--- Quote ---/home/fred/strumpract/src/strumpract: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.4.0, stripped
--- End quote ---

Conclusion, yes, perfect.

Fre;D

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version