[fpc-pascal] backtrace code in fpc

2017-07-18 Thread Matias Vara
Hello everyone, I am trying to port the code for backtrace, e.g., GetLineInfo(), to my freepascal kernel in order to print a backtrace when an exception happens. The drawback now is that I am not sure where the source is. I think it is the unit lnfodwrf.pp however I am not sure. From the code, it

Re: [fpc-pascal] backtrace code in fpc

2017-07-18 Thread Matias Vara
Hello Charlie and thanks for the comments. I ended up by implementing my own Infodwrf unit. Matias On 18 Jul 2017 11:48 p.m., "Karoly Balogh (Charlie/SGR)" < char...@scenergy.dfmk.hu> wrote: Hi, On Mon, 17 Jul 2017, Matias Vara wrote: > Hello everyone, I am tryi

Re: [fpc-pascal] backtrace code in fpc

2017-07-22 Thread Matias Vara
Hello, I am not sure why my executable does not contains a .debug_aranges section. It contains .debug_line and .debug_info. Am I missing some linker flags? Thanks, Matias. 2017-07-19 0:05 GMT+01:00 Matias Vara <matiasev...@gmail.com>: > Hello Charlie and thanks for the comments. I

Re: [fpc-pascal] backtrace code in fpc

2017-07-22 Thread Matias Vara
Hello Florian, 2017-07-22 13:49 GMT+01:00 Florian Klämpfl <flor...@freepascal.org>: > Am 22.07.2017 um 14:47 schrieb Matias Vara: > > Hello, > > > > I am not sure why my executable does not contains a .debug_aranges > section. It contains .debug_line > > and .

Re: [fpc-pascal] cpu_relax() in freepascal

2017-11-03 Thread Matias Vara
0-29 16:59 GMT+01:00 Matias Vara <matiasev...@gmail.com>: > Hello everyone, > > I want to implement the cpu_relax() function in order to use it inside > loops. However before, I would like to know if the fpc compiler is doing an > optimizatio

Re: [fpc-pascal] cpu_relax() in freepascal

2017-11-03 Thread Matias Vara
Hi and thanks for the answers, This feature seems to be a compiler intrinsic at least in the Intel C > compiler. We don't have anything similar, so you have to fall back either > to an asm procedure or a line of inline assembler. The compiler is also > not doing an optimization similar to this.

Re: [fpc-pascal] Lazarus Release 1.8

2017-12-08 Thread Matias Vara
Hello, 2017-12-07 9:36 GMT+01:00 Mattias Gaertner : > The Lazarus team is glad to announce the release of Lazarus 1.8. > > The release was built with FPC 3.0.4. > The previous release Lazarus 1.6.4 was built with FPC 3.0.2. > > Here is the list of changes for Lazarus

[fpc-pascal] cpu_relax() in freepascal

2017-10-29 Thread Matias Vara
Hello everyone, I want to implement the cpu_relax() function in order to use it inside loops. However before, I would like to know if the fpc compiler is doing an optimization of this kind. Kinds regards, Matias. ___ fpc-pascal maillist -

[fpc-pascal] issue when enabling -O2

2018-01-10 Thread Matias Vara
Hello everyone, I am getting an exception when I enable the -O2 optimization. More precisaily, the line that stars with write_portd is corrupting the data section. This is the pascal code: function PciReadDword(const bus, device, func, regnum: UInt32): UInt32; var Send: DWORD; begin Send

Re: [fpc-pascal] issue when enabling -O2

2018-01-10 Thread Matias Vara
har...@scenergy.dfmk.hu>: > Hi, > > On Wed, 10 Jan 2018, Matias Vara wrote: > > > Hi Karol and thanks you very much! I got confused with the function > > names, I feel very sorry.As I said in my previous email, I fixed by > > rewriting the assembler function. However, I

Re: [fpc-pascal] issue when enabling -O2

2018-01-10 Thread Matias Vara
Hello, 2018-01-10 18:03 GMT+01:00 Karoly Balogh (Charlie/SGR) < char...@scenergy.dfmk.hu>: > Hi, > > On Wed, 10 Jan 2018, Matias Vara wrote: > > > Thank you very much Karol, I completly missed this point during the > > development of my kernel (Or maybe I

Re: [fpc-pascal] issue when enabling -O2

2018-01-10 Thread Matias Vara
2018-01-10 18:09 GMT+01:00 Karoly Balogh (Charlie/SGR) < char...@scenergy.dfmk.hu>: > Hi, > > On Wed, 10 Jan 2018, Matias Vara wrote: > > > BTW, this only applies to inline assembler functions rigth? In the case > > of normal procedures that contains a block asm end;

Re: [fpc-pascal] issue when enabling -O2

2018-01-10 Thread Matias Vara
with something that does not use the outsd instruction, it works fine. Matias 2018-01-10 15:55 GMT+01:00 Matias Vara <matiasev...@gmail.com>: > Hello everyone, > > I am getting an exception when I enable the -O2 optimization. More > precisaily, the line that stars with write_portd is c

Re: [fpc-pascal] issue when enabling -O2

2018-01-10 Thread Matias Vara
trash a variable that the compiler is using. Is the compiler warning me about this? Matias 2018-01-10 17:14 GMT+01:00 Karoly Balogh (Charlie/SGR) < char...@scenergy.dfmk.hu>: > Hi, > > On Wed, 10 Jan 2018, Matias Vara wrote: > > > I am getting an exception when I ena

Re: [fpc-pascal] issue when enabling -O2

2018-01-10 Thread Matias Vara
BTW, this only applies to inline assembler functions rigth? In the case of normal procedures that contains a block asm end; there is no problem, Am I right? Matias 2018-01-10 17:51 GMT+01:00 Matias Vara <matiasev...@gmail.com>: > Thank you very much Karol, I completly missed this poi

Re: [fpc-pascal] issue when enabling -O2

2018-01-11 Thread Matias Vara
After fixing the assembler code and other issues, e.g., interruption handlers were not restoring all registers, I observed an speed up of ~12% with -O2 when running a simple webserver example. That's very impresive! Thanks for you help, Matias. 2018-01-10 18:19 GMT+01:00 Matias Vara <matia

Re: [fpc-pascal] question about _fpc_local_unwind

2018-02-02 Thread Matias Vara
Thanks for the answer, I will imitate in Toro the behavior of Win64. Matias 2018-02-01 20:49 GMT+01:00 Jonas Maebe <jo...@freepascal.org>: > On 01/02/18 16:24, Matias Vara wrote: > >> I partial answered my question by reading https://www.freepascal.org/doc >> s-html

Re: [fpc-pascal] question about _fpc_local_unwind

2018-02-02 Thread Matias Vara
Hello, 2018-02-02 17:17 GMT+01:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > Am 02.02.2018 15 <02%2002%2020%2018%2015>:50 schrieb "Matias Vara" < > matiasev...@gmail.com>: > > Thanks for the answer, I will imitate in Toro the behavior

Re: [fpc-pascal] question about _fpc_local_unwind

2018-02-01 Thread Matias Vara
he compiler "generate the 'try-finally-end' block as in Linux"? I don't think so but It is worth to ask. Thanks, Matias. 2018-01-31 11:17 GMT+01:00 Matias Vara <matiasev...@gmail.com>: > Hello eveyryone, > > in my rtl for torokernel, I have to implement "_fpc_local_u

[fpc-pascal] question about _fpc_local_unwind

2018-01-31 Thread Matias Vara
Hello eveyryone, in my rtl for torokernel, I have to implement "_fpc_local_unwind()" however I am not sure about the expected behavior of this function. It appers in the code when I use "Exit" inside a "try finally" structure. I would like to know what this function should do. So if someone can

Re: [fpc-pascal] How __FPC_specific_handler() is invoked

2018-07-25 Thread Matias Vara
El mar., 24 jul. 2018 a las 13:57, Sven Barth via fpc-pascal (< fpc-pascal@lists.freepascal.org>) escribió: > Matias Vara schrieb am Di., 24. Juli 2018, 11:04: > >> Hello, >> >> I am writing my own __FPC_specific_handler() but I can't figure out when >>

Re: [fpc-pascal] How __FPC_specific_handler() is invoked

2018-07-25 Thread Matias Vara
El mié., 25 jul. 2018 a las 14:33, Sven Barth via fpc-pascal (< fpc-pascal@lists.freepascal.org>) escribió: > Matias Vara schrieb am Mi., 25. Juli 2018, 12:55: > >> >> El mar., 24 jul. 2018 a las 13:57, Sven Barth via fpc-pascal (< >> fpc-pascal@lists.freepas

[fpc-pascal] How __FPC_specific_handler() is invoked

2018-07-24 Thread Matias Vara
Hello, I am writing my own __FPC_specific_handler() but I can't figure out when this function is registered. I guess this function is registered to the OS to be invoked when an exception happens. In the assembler code I have something like: .seh_handler __FPC_specific_handler,@unwind But I am

[fpc-pascal] Reduce gap between .text section and .data section in ELF

2018-10-29 Thread Matias Vara
Hi, When I am compiling to ELF64, the linker is located the .text section at the address 4MB and the .data at address 6MB. Is there any way to reduce this 2MB gap between those sections? Matias ___ fpc-pascal maillist -

[fpc-pascal] Clone() in Linux x86-64 RTL

2021-10-13 Thread Matias Vara via fpc-pascal
Hello everyone, I just checked that clone() is only present in i386 Linux RTL but it is not defined in x86-64. Am I right? Or, I am missing something. Matias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org