[fpc-pascal] Ignoring function results

2017-05-19 Thread Mark Morgan Lloyd
According to the Programmer's Guide 1.3.41, {$EXTENDEDSYNTAX OFF} has the effect of permitting the result of a function to be ignored. However it also appears to (at least) prohibit functions/procedures with optional parameters: can these be controlled separately? -- Mark Morgan Lloyd

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Sven Barth via fpc-pascal
Am 19.05.2017 22:24 schrieb "Sven Barth" : > > On 19.05.2017 19:22, Karoly Balogh (Charlie/SGR) wrote: > > Hi, > > > > On Fri, 19 May 2017, Sven Barth via fpc-pascal wrote: > > > >> I think Jeppe wanted to add vector support. Though the question here is > >> whether

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Nikolay Nikolov
On 05/19/2017 11:24 PM, Sven Barth via fpc-pascal wrote: On 19.05.2017 19:22, Karoly Balogh (Charlie/SGR) wrote: Hi, On Fri, 19 May 2017, Sven Barth via fpc-pascal wrote: I think Jeppe wanted to add vector support. Though the question here is whether one wants to optimize/detect this at

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Sven Barth via fpc-pascal
On 19.05.2017 19:22, Karoly Balogh (Charlie/SGR) wrote: > Hi, > > On Fri, 19 May 2017, Sven Barth via fpc-pascal wrote: > >> I think Jeppe wanted to add vector support. Though the question here is >> whether one wants to optimize/detect this at the AST level and convert >> that to implicit

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 19 May 2017, Sven Barth via fpc-pascal wrote: > I think Jeppe wanted to add vector support. Though the question here is > whether one wants to optimize/detect this at the AST level and convert > that to implicit vectors or at the CSE level. I think the higher level you can do an

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Marco van de Voort
In our previous episode, Sven Barth via fpc-pascal said: > > > > I also tried -Oofastmath, but to no avail. (floor is still external, and > > still double) > > Floor is not declared as inline and even the Trunc()/Frac() intrinsics it > uses wouldn't be inlined as they're assembler routines and

Re: [fpc-pascal] FPC 64bit for windows

2017-05-19 Thread Lukasz Sokol
On 19/05/17 16:15, Sven Barth via fpc-pascal wrote: > Am 19.05.2017 14:53 schrieb "Lukasz Sokol" > >: >> >> On 19/05/17 13:33, Sven Barth via fpc-pascal wrote: >> > You don't have to build a 32-bit FPC because an official > released

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Sven Barth via fpc-pascal
Am 19.05.2017 16:39 schrieb "Karoly Balogh (Charlie/SGR)" < char...@scenergy.dfmk.hu>: > > Hi, > > On Fri, 19 May 2017, Reimar Grabowski wrote: > > > Final: The render function takes about 90%, the cast-to-int about 5%. No > > other interesting functions shown. So the missing time must be spent >

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Sven Barth via fpc-pascal
Am 19.05.2017 15:29 schrieb "Marco van de Voort" : > > In our previous episode, Sven Barth via fpc-pascal said: > > > > You only compiled the program with SSE, but not the RTL. And to completely > > avoid the x87 FPU you additionally need to fiddle around with some > >

Re: [fpc-pascal] FPC 64bit for windows

2017-05-19 Thread Sven Barth via fpc-pascal
Am 19.05.2017 14:53 schrieb "Lukasz Sokol" : > > On 19/05/17 13:33, Sven Barth via fpc-pascal wrote: > > >>> You don't have to build a 32-bit FPC because an official > >>> released installer exists. So this is no problem at all. But > >>> seeing as pretty much everything is

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Jon Foster
On 05/18/2017 07:21 PM, Ryan Joseph wrote: On May 19, 2017, at 8:01 AM, Jon Foster wrote: You can find both versions in my GitHub account: https://github.com/jafcobend/fpcflop Thanks again, I was finally able to get this complied. No idea why the inclusion of

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 19 May 2017, Reimar Grabowski wrote: > Final: The render function takes about 90%, the cast-to-int about 5%. No > other interesting functions shown. So the missing time must be spent > doing floating point math and branching (ifs), as that's all the render > function does. Well, if

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Marco van de Voort
In our previous episode, Sven Barth via fpc-pascal said: > > You only compiled the program with SSE, but not the RTL. And to completely > avoid the x87 FPU you additionally need to fiddle around with some > defines/code inside the compiler as well. Hmm. in addition to my earlier benchmarks, the

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Mattias Gaertner
On Fri, 19 May 2017 14:34:40 +0200 (CEST) mar...@stack.nl (Marco van de Voort) wrote: >[...] > Not the point, the point is, does javascript generate exceptions on division > by zero by default? No. It creates Infinity. Mattias ___ fpc-pascal maillist

Re: [fpc-pascal] FPC 64bit for windows

2017-05-19 Thread Lukasz Sokol
On 19/05/17 13:33, Sven Barth via fpc-pascal wrote: >>> You don't have to build a 32-bit FPC because an official >>> released installer exists. So this is no problem at all. But >>> seeing as pretty much everything is moving (or already has moved) >>> to 64-bit, why bother with 32-bit these days.

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Reimar Grabowski
On Fri, 19 May 2017 12:32:17 +0100 Graeme Geldenhuys wrote: > And no, I don’t agree that this is a “special case”. Doing lots of calculations in a tight loop is more or less a special case. On the other hand I have written quite some code that doesn't do much else

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Sven Barth via fpc-pascal
Am 19.05.2017 12:51 schrieb "Mattias Gaertner" : > > On Fri, 19 May 2017 10:54:25 +0200 > Sven Barth via fpc-pascal wrote: > > >[...] > > Even though FPC might use SSE for maths it will still use the x87 to > > transfer floating values

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Sven Barth via fpc-pascal
Am 19.05.2017 13:32 schrieb "Graeme Geldenhuys" < mailingli...@geldenhuys.co.uk>: > > On 2017-05-19 12:11, Nikolay Nikolov wrote: >> >> In FPC, if you want to use SSE and >> avoid the x87 FPU, you have to compile with a specific compiler options >> and forfeit the option for your executable to run

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > Then maybe the original code was DESIGNED for gcc and/or java ? > > Now you are taking the piss! > > The code I worked from was JavaScript actually. I posted the link a > couple minutes ago. Translating the JavaScript code to Object Pascal

Re: [fpc-pascal] FPC 64bit for windows

2017-05-19 Thread Sven Barth via fpc-pascal
Am 19.05.2017 13:54 schrieb "Lukasz Sokol" : > > On 19/05/17 11:15, Graeme Geldenhuys wrote: > > On 2017-05-19 00:38, Nikolay Nikolov wrote: > >> windows OS - there are simply no known issues with that under any > >> 64-bit windows version that I know of. snip... It won't

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Graeme Geldenhuys
On 2017-05-19 13:14, Karoly Balogh (Charlie/SGR) wrote: Ps: can someone direct me to the right code you are discussing? Forwarded Message Subject: Re: [fpc-pascal] FPC Graphics options? Date: Fri, 12 May 2017 18:29:05 +0100 From: Graeme Geldenhuys To:

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Graeme Geldenhuys
On 2017-05-19 12:43, Marco van de Voort wrote: Then maybe the original code was DESIGNED for gcc and/or java ? Now you are taking the piss! The code I worked from was JavaScript actually. I posted the link a couple minutes ago. Translating the JavaScript code to Object Pascal was a manual

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 19 May 2017, Graeme Geldenhuys wrote: > Bottom line is, with the exact same code, NO work-arounds is required > for GCC or Java! So why must we have work-arounds for FPC? It's a > compiler or RTL issue - not being able to understand the code good > enough to generate more efficient

Re: [fpc-pascal] FPC 64bit for windows

2017-05-19 Thread Lukasz Sokol
On 19/05/17 11:15, Graeme Geldenhuys wrote: > On 2017-05-19 00:38, Nikolay Nikolov wrote: >> windows OS - there are simply no known issues with that under any >> 64-bit windows version that I know of. snip... It won't work >> from the IDE, though, but compiling your program from the command >>

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > Bottom line is, with the exact same code, NO work-arounds is required > for GCC or Java! Then maybe the original code was DESIGNED for gcc and/or java ? > So why must we have work-arounds for FPC? The language is different. E.g. I get

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Marco van de Voort
In our previous episode, Jon Foster said: > > I read that some were having trouble compiling Graeme's code because of SDL > version differences so I stripped out the SDL code and replaced the timing > function with traditional time/now calls. I then realized I still had Kylix > buried in some

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Graeme Geldenhuys
On 2017-05-19 12:11, Nikolay Nikolov wrote: In FPC, if you want to use SSE and avoid the x87 FPU, you have to compile with a specific compiler options and forfeit the option for your executable to run on non-SSE capable CPUs, because FPC generates native code. If you want to keep All good and

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Graeme Geldenhuys
On 2017-05-19 12:16, Graeme Geldenhuys wrote: The JavaScript version runs very smooth on my system. ps: And it doesn't use WebGL either. Simply blitting of a memory image to the canvas. Regards, Graeme ___ fpc-pascal maillist -

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Nikolay Nikolov
On 05/19/2017 02:11 PM, Nikolay Nikolov wrote: On 05/19/2017 03:54 AM, Ryan Joseph wrote: On May 18, 2017, at 10:40 PM, Jon Foster wrote: 62.44 1.33 1.33 fpc_frac_real 26.76 1.90 0.57 MATH_$$_FLOOR$EXTENDED$$LONGINT 10.33 2.12

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Graeme Geldenhuys
On 2017-05-18 16:33, Reimar Grabowski wrote: and JS is clearly not faster than FPC. The JavaScript version runs very smooth on my system. There is no framerate counter though, so I don't know how much faster. http://jsdo.it/notch/dB1E Again, what does that say about FPC generated binary

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Nikolay Nikolov
On 05/19/2017 03:54 AM, Ryan Joseph wrote: On May 18, 2017, at 10:40 PM, Jon Foster wrote: 62.44 1.33 1.33 fpc_frac_real 26.76 1.90 0.57 MATH_$$_FLOOR$EXTENDED$$LONGINT 10.33 2.12 0.22

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Mattias Gaertner
On Fri, 19 May 2017 10:54:25 +0200 Sven Barth via fpc-pascal wrote: >[...] > Even though FPC might use SSE for maths it will still use the x87 to > transfer floating values to/from function, especially if they take Extended > as parameter/result. Can you

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Graeme Geldenhuys
On 2017-05-19 06:58, Florian Klämpfl wrote: Over the weekend I’ll verify by testing on both FreeBSD and Windows, and then see if “calling conventions” make any difference. *BSD is the same as Linux. Good to know, thanks. It has its purposes, but it is not suitable for the main repository

Re: [fpc-pascal] FPC 64bit for windows

2017-05-19 Thread Graeme Geldenhuys
On 2017-05-18 23:14, James Richters wrote: That would be very much appreciated, http://geldenhuys.co.uk/~graemeg/fpc-3.0.2-win64.7z It's a 53MB download. It includes the 3.0.2 64-bit Windows compiler and source code, as well as the binutils and the go.bat batch file I used to compile the

Re: [fpc-pascal] FPC 64bit for windows

2017-05-19 Thread Graeme Geldenhuys
On 2017-05-19 00:38, Nikolay Nikolov wrote: windows OS - there are simply no known issues with that under any 64-bit windows version that I know of. snip... It won't work from the IDE, though, but compiling your program from the command line, when you want to build a 64-bit .exe shouldn't be

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Sven Barth via fpc-pascal
Am 19.05.2017 03:30 schrieb "Ryan Joseph" : > > > > On May 19, 2017, at 3:48 AM, Florian Klämpfl wrote: > > > > Well, the reason are the linux calling conventions: there are no callee saved xmm registers. This > > means FPC does not use any

Re: [fpc-pascal] FPC 64bit for windows

2017-05-19 Thread Sven Barth via fpc-pascal
Am 19.05.2017 02:22 schrieb "James Richters" : > > Thank you for the explanation. I didn't really understand how to use the cross compiler. > > I have installed the cross compiler and tried to compile my program with > > ppcrossx64 program.pas > > but I get >