Re: [fpc-devel] LEA instruction speed

2023-10-26 Thread Nikolay Nikolov via fpc-devel
On 10/11/23 11:21, Tomas Hajny via fpc-devel wrote: On 2023-10-11 04:15, J. Gareth Moreton via fpc-devel wrote: Sweet, thank you.  Would you be willing to share your modified test's source? I was worried that if CPUID wasn't present it would cause a SIGILL. Sure, attached, but I didn't do

Re: [fpc-devel] WebAssembly compilation problems - Wasm32 symbol xxx without index value error

2023-03-31 Thread Nikolay Nikolov via fpc-devel
, Michalis czw., 30 mar 2023 o 21:11 Nikolay Nikolov via fpc-devel napisał(a): On 3/28/23 02:12, Michalis Kamburelis via fpc-devel wrote: Hi, We're experimenting with compiling Castle Game Engine using FPC WebAssembly target. A lot of units and classes compiled smoothly, however we hit a w

Re: [fpc-devel] WebAssembly compilation problems - Wasm32 symbol xxx without index value error

2023-03-30 Thread Nikolay Nikolov via fpc-devel
On 3/28/23 02:12, Michalis Kamburelis via fpc-devel wrote: Hi, We're experimenting with compiling Castle Game Engine using FPC WebAssembly target. A lot of units and classes compiled smoothly, however we hit a weird bug(s) at compiling our (big, too big!) unit X3DNodes. We get errors "Wasm32

Re: [fpc-devel] Sorting tests

2022-11-29 Thread Nikolay Nikolov via fpc-devel
On 11/30/22 08:30, Nikolay Nikolov wrote: On 11/30/22 01:57, J. Gareth Moreton via fpc-devel wrote: Familarity mostly.  More people are familiar with quicksort than introsort. Are there any explicit code examples where quicksort succeeds and introsort fails?  I'm told even Lazarus crashes

Re: [fpc-devel] Sorting tests

2022-11-29 Thread Nikolay Nikolov via fpc-devel
On 11/30/22 01:57, J. Gareth Moreton via fpc-devel wrote: Familarity mostly.  More people are familiar with quicksort than introsort. Are there any explicit code examples where quicksort succeeds and introsort fails?  I'm told even Lazarus crashes (or used to crash), so I'll be interested to

Re: [fpc-devel] Sorting tests

2022-11-29 Thread Nikolay Nikolov via fpc-devel
On 11/29/22 22:16, J. Gareth Moreton via fpc-devel wrote: On 29/11/2022 20:03, Nikolay Nikolov via fpc-devel wrote: if (a That's the big one that sorting algorithms rely on... the transitive law.  If that is violated, then you cannot guarantee a sorted result. It doesn't matter if (a <

Re: [fpc-devel] Sorting tests

2022-11-29 Thread Nikolay Nikolov via fpc-devel
On 11/29/22 16:44, Ondrej Pokorny via fpc-devel wrote: Am 29.11.2022 um 14:25 schrieb Sven Barth via fpc-devel: For such a comparison function the issue is indeed in the comparison function, but Nikolay also mentioned "ais the case for equal elements. I assume this was some kind of typo or

Re: [fpc-devel] Sorting tests

2022-11-29 Thread Nikolay Nikolov via fpc-devel
On 11/24/22 20:51, J. Gareth Moreton via fpc-devel wrote: Hi everyone, I just need to touch on the knowledge base.  What tests exist that test the functionality of rtl/inc/sortbase.pp?  As Olly suggested, I'm looking at creating Introsort for this unit as well, but I need to know if such a

Re: [fpc-devel] Wasm/embedded target compilation error

2022-07-28 Thread Nikolay Nikolov via fpc-devel
On 7/22/22 01:36, Kostas Michalopoulos via fpc-devel wrote: Hi all, I was trying to use the Wasm/embedded target to port a game i made some time ago[0] to WebAssembly to run inside a browser, but i am getting a bunch of errors that i can't figure out the issue. When compiling with the

Re: [fpc-devel] Questions about cross-compiling (z80)

2022-02-12 Thread Nikolay Nikolov via fpc-devel
On 2/11/22 19:14, Sven Barth via fpc-devel wrote: Tomas Hajny via fpc-devel schrieb am Fr., 11. Feb. 2022, 17:24: On 2022-02-11 14:14, Sven Barth via fpc-devel wrote: > BogDan via fpc-devel schrieb am Fr., > 11. Feb. 2022, 11:09:   .   . >> It seems is an IHX

Re: [fpc-devel] I've asked this before, but perhaps I wasn't specific enough that time: what do I *personally*, specifically need to do to ensure that a native Windows 64-bit build winds up on the FPC

2022-01-14 Thread Nikolay Nikolov via fpc-devel
On 1/15/22 01:47, Ben Grasset via fpc-devel wrote: On Fri, Jan 14, 2022 at 5:49 AM Nikolay Nikolov via fpc-devel wrote: No, it's not, because in linux I tested "make -j24 all" in the compiler directory That isn't what you said in your original comment about benchmarking

Re: [fpc-devel] I've asked this before, but perhaps I wasn't specific enough that time: what do I *personally*, specifically need to do to ensure that a native Windows 64-bit build winds up on the FPC

2022-01-13 Thread Nikolay Nikolov via fpc-devel
On 1/14/22 06:45, Ben Grasset via fpc-devel wrote: On Thu, Jan 13, 2022 at 11:38 PM Nikolay Nikolov via fpc-devel wrote: For the record, I did try make cycle for ppc386 and ppcx64 on my Windows 10 (with Windows Defender turned on) and both finished in exactly 42 seconds

Re: [fpc-devel] I've asked this before, but perhaps I wasn't specific enough that time: what do I *personally*, specifically need to do to ensure that a native Windows 64-bit build winds up on the FPC

2022-01-13 Thread Nikolay Nikolov via fpc-devel
On 1/14/22 05:55, Ben Grasset via fpc-devel wrote: On Thu, Jan 13, 2022 at 10:18 PM Nikolay Nikolov via fpc-devel wrote: Just for the record, is this with antivirus off or on and which antivirus program? I have no anti-virus actively installed or enabled on an ongoing basis at all

Re: [fpc-devel] I've asked this before, but perhaps I wasn't specific enough that time: what do I *personally*, specifically need to do to ensure that a native Windows 64-bit build winds up on the FPC

2022-01-13 Thread Nikolay Nikolov via fpc-devel
On 1/14/22 03:18, Ben Grasset via fpc-devel wrote: On Thu, Jan 13, 2022 at 11:28 AM Nikolay Nikolov via fpc-devel wrote: So, instead of giving actual benchmark data on the Windows performance, you speculate by claiming that having faster exception handling matters, and then you

Re: [fpc-devel] I've asked this before, but perhaps I wasn't specific enough that time: what do I *personally*, specifically need to do to ensure that a native Windows 64-bit build winds up on the FPC

2022-01-13 Thread Nikolay Nikolov via fpc-devel
On 1/13/22 16:33, Nikolay Nikolov wrote: On 1/13/22 10:58, Ben Grasset via fpc-devel wrote: On Thu, Jan 13, 2022 at 1:58 AM Nikolay Nikolov via fpc-devel wrote: I haven't tested in Windows, but it would be very strange and suspicious if the results are very different. It would

Re: [fpc-devel] I've asked this before, but perhaps I wasn't specific enough that time: what do I *personally*, specifically need to do to ensure that a native Windows 64-bit build winds up on the FPC

2022-01-13 Thread Nikolay Nikolov via fpc-devel
On 1/13/22 10:50, Ben Grasset via fpc-devel wrote: On Thu, Jan 13, 2022 at 1:25 AM Nikolay Nikolov via fpc-devel wrote: We do care about scientific code as well as fast code, that's why we support both the FPU and SSE2+ (as well as AVX, etc.). FPC *chooses *not to generate x87 FPU

Re: [fpc-devel] I've asked this before, but perhaps I wasn't specific enough that time: what do I *personally*, specifically need to do to ensure that a native Windows 64-bit build winds up on the FPC

2022-01-13 Thread Nikolay Nikolov via fpc-devel
On 1/13/22 10:58, Ben Grasset via fpc-devel wrote: On Thu, Jan 13, 2022 at 1:58 AM Nikolay Nikolov via fpc-devel wrote: I haven't tested in Windows, but it would be very strange and suspicious if the results are very different. It would be neither of those things. The exception

Re: [fpc-devel] I've asked this before, but perhaps I wasn't specific enough that time: what do I *personally*, specifically need to do to ensure that a native Windows 64-bit build winds up on the FPC

2022-01-12 Thread Nikolay Nikolov via fpc-devel
On 1/13/22 02:31, Ben Grasset via fpc-devel wrote: On Wed, Jan 12, 2022 at 7:38 AM Martin Frb via fpc-devel wrote: The downloads provided by Lazarus are also NOT a "pure, native 64-bit download". Only the "fpc.exe" and the non-cross "ppc64.exe" are native 64 bit. As I

Re: [fpc-devel] I've asked this before, but perhaps I wasn't specific enough that time: what do I *personally*, specifically need to do to ensure that a native Windows 64-bit build winds up on the FPC

2022-01-12 Thread Nikolay Nikolov via fpc-devel
On 1/13/22 07:44, Ben Grasset via fpc-devel wrote: It does work on 64-bit Windows, it's just technically deprecated. Beyond that, the 80-bit Extended type dates back to the mid 1980s, The year 1980, not the mid 1980s. But the x86 family dates back to 1978. Most x86_64 instructions are the

Re: [fpc-devel] I've asked this before, but perhaps I wasn't specific enough that time: what do I *personally*, specifically need to do to ensure that a native Windows 64-bit build winds up on the FPC

2022-01-12 Thread Nikolay Nikolov via fpc-devel
On 1/13/22 05:59, Travis Siegel via fpc-devel wrote: On 1/12/2022 5:20 PM, Sven Barth via fpc-devel wrote: When compiling from a target supporting Extended to one only supporting Double there isn't a loss of precision when calculating values at compile time. The other way around however,

Re: [fpc-devel] Discussion on a particular optimisation development (WARNING: Technical!)

2021-02-02 Thread Nikolay Nikolov via fpc-devel
On 2/2/21 11:06 PM, J. Gareth Moreton via fpc-devel wrote: Hi everyone, I've found a potential optimisation for conditions of the form "(x <> 0) and (y <> 0)", which are very common because this is semantically equivalent to "Assigned(x) and Assigned(y)", for example, and such a construct

Re: [fpc-devel] x86_64 question

2020-10-05 Thread Nikolay Nikolov via fpc-devel
platform a Windows or a Unix machine?  I ask because I don't want to send you functions that use the wrong calling convention! I dual boot Linux and Windows, but prefer testing on Linux. Best regards, Nikolay Gareth aka. Kit On 02/10/2020 14:13, Nikolay Nikolov via fpc-devel wrote: On 10/2

Re: [fpc-devel] x86_64 question

2020-10-02 Thread Nikolay Nikolov via fpc-devel
On 10/2/20 2:13 PM, J. Gareth Moreton via fpc-devel wrote: Confirmed my suspicions.  if I zero the upper bits of the register (I used something akin to "AND RCX, $F"), there is no speed loss. Therefore, I can make the hypothesis, on my Intel(R) Core(TM) i7-10750H, that using TEST on a

Re: [fpc-devel] x86_64 question

2020-10-01 Thread Nikolay Nikolov via fpc-devel
On 10/1/20 11:36 PM, J. Gareth Moreton via fpc-devel wrote: I thought that might be the case - thanks Nikolay.  And I meant to say lower bits of a REGISTER, not an instruction! Admittedly I'm cycle-counting and byte-counting again!  I was looking for ways to reduce 13 bytes of padding in one

Re: [fpc-devel] x86_64 question

2020-10-01 Thread Nikolay Nikolov via fpc-devel
On 10/1/20 8:17 PM, J. Gareth Moreton via fpc-devel wrote: Hi everyone, I have a small question with assembler size optimisation that maybe one of you guys can give me a second opinion on: If you are using the "test" instruction to test some of the lower bits of an instruction, e.g. TEST

Re: [fpc-devel] Another thread about the fact that official FPC releases are *unnecessarily* non-representative of the platforms it actually runs on

2020-09-28 Thread Nikolay Nikolov via fpc-devel
On 9/28/20 10:01 PM, Bart via fpc-devel wrote: On Mon, Sep 28, 2020 at 3:45 PM Nikolay Nikolov via fpc-devel wrote: compile to win32 via: fpc -Pi386 hello.pas AFAIK a simple fpc hello.pas will do in that setup. Yes, that is true. The -Pi386 is optional in this case. and to win64 via

Re: [fpc-devel] Another thread about the fact that official FPC releases are *unnecessarily* non-representative of the platforms it actually runs on

2020-09-28 Thread Nikolay Nikolov via fpc-devel
On 9/28/20 12:24 AM, Travis Siegel via fpc-devel wrote: How does one get a 64-bit version on windows.  When I try to run a 64-bit version on windows, I encounter an error, though I don't remember what that error is, since I've not tried it for a couple weeks.  I didn't even know there was a

Re: [fpc-devel] Another thread about the fact that official FPC releases are *unnecessarily* non-representative of the platforms it actually runs on

2020-09-27 Thread Nikolay Nikolov via fpc-devel
On 9/28/20 12:30 AM, Tomas Hajny via fpc-devel wrote: On 2020-09-27 18:27, Nikolay Nikolov via fpc-devel wrote: On 9/27/20 7:21 PM, Florian Klämpfl via fpc-devel wrote: Am 27.09.20 um 18:03 schrieb Martin Frb via fpc-devel: On 27/09/2020 09:34, Sven Barth via fpc-devel wrote: Ben Grasset via

Re: [fpc-devel] Another thread about the fact that official FPC releases are *unnecessarily* non-representative of the platforms it actually runs on

2020-09-27 Thread Nikolay Nikolov via fpc-devel
On 9/27/20 7:21 PM, Florian Klämpfl via fpc-devel wrote: Am 27.09.20 um 18:03 schrieb Martin Frb via fpc-devel: On 27/09/2020 09:34, Sven Barth via fpc-devel wrote: Ben Grasset via fpc-devel > schrieb am So., 27. Sep. 2020, 07:50:     That last quote

Re: [fpc-devel] Another thread about the fact that official FPC releases are *unnecessarily* non-representative of the platforms it actually runs on

2020-09-27 Thread Nikolay Nikolov via fpc-devel
On 9/27/20 7:03 PM, Martin Frb via fpc-devel wrote: On 27/09/2020 09:34, Sven Barth via fpc-devel wrote: Ben Grasset via fpc-devel > schrieb am So., 27. Sep. 2020, 07:50: That last quote is absolute BS, to be very frank. There is no reason

Re: [fpc-devel] Another thread about the fact that official FPC releases are *unnecessarily* non-representative of the platforms it actually runs on

2020-09-27 Thread Nikolay Nikolov via fpc-devel
On 9/27/20 10:48 AM, Florian Klämpfl via fpc-devel wrote: As long as there is no generic 80 bit float support in the compiler, there is no need to discuss anything else. Yes. And unlike some other compilers, we don't exhaust our 32-bit address space during compilation or linking of very