Re: [fpc-devel] Successful implementation of inline support for pure assembler routines on x86

2019-03-24 Thread Florian Klämpfl
Am 19.03.2019 um 20:17 schrieb J. Gareth Moreton: > I would have allowed writing to the stack with inline assembly functions if a > way could be found to ensure that the > compiled program behaves the same way whether the function is inlined or > called directly (e.g. through a direct CALL or >

Re: [fpc-devel] Successful implementation of inline support for pure assembler routines on x86

2019-03-21 Thread Jonas Maebe
On 2019-03-19 20:17, J. Gareth Moreton wrote: If you want to inline regular functions with assembler blocks, you'll need the attached bug fixes. The rest I'll leave up to you. Thanks, I'll have a look at the patch this weekend. What is Florian's and your vision for Free Pascal? You already

Re: [fpc-devel] Successful implementation of inline support for pure assembler routines on x86

2019-03-20 Thread Ryan Joseph
> On Mar 19, 2019, at 3:17 PM, J. Gareth Moreton > wrote: > > What is Florian's and your vision for Free Pascal? You already have a > cross-platform Object Pascal compiler... what's next for it? Does any of my > proposals even have a place in that vision, because honestly I don't know if

Re: [fpc-devel] Successful implementation of inline support for pure assembler routines on x86

2019-03-19 Thread J. Gareth Moreton
I would have allowed writing to the stack with inline assembly functions if a way could be found to ensure that the compiled program behaves the same way whether the function is inlined or called directly (e.g. through a direct CALL or a function pointer), which would otherwise require shifting

Re: [fpc-devel] Successful implementation of inline support for pure assembler routines on x86

2019-03-17 Thread Marģers . via fpc-devel
  - Reply to message - Subject: Re: [fpc-devel] Successful implementation of inline support for pure assembler routines on x86 Date: 2019. gada 17. marts 19:38:03 From: Florian Klämpfl To: > Am 15.03.19 um 11:32 schrieb J. Gareth Moreton: > * using inline assembler is always the worst

Re: [fpc-devel] Successful implementation of inline support for pure assembler routines on x86

2019-03-17 Thread Florian Klämpfl
Am 15.03.19 um 11:32 schrieb J. Gareth Moreton: Hi everyone, Sorry for the slightly long-winded title.  This was something I've been working on for the past few weeks to allow the use of "inline" with certain x86 assembler routines, subject to restrictions for safety reasons.  I have

Re: [fpc-devel] Successful implementation of inline support for pure assembler routines on x86

2019-03-16 Thread Ryan Joseph
> On Mar 15, 2019, at 9:37 AM, Sven Barth via fpc-devel > wrote: > > That could maybe be managed once the support for constants as parameter for > generics is added (note: I don't know right now how SHUFPS works, so take the > following as pseudo code): > I fixed the patch for constants

Re: [fpc-devel] Successful implementation of inline support for pure assembler routines on x86

2019-03-15 Thread Sven Barth via fpc-devel
J. Gareth Moreton schrieb am Fr., 15. März 2019, 12:33: > P.S. Though this feature can be used for implementing intrinsics, it is > not a direct replacement for them because instructions like SHUFPS cannot > be flexibly encoded due to its immediate operand (i.e. it has to be a raw > number... it

[fpc-devel] Successful implementation of inline support for pure assembler routines on x86

2019-03-15 Thread J. Gareth Moreton
Hi everyone, Sorry for the slightly long-winded title.  This was something I've been working on for the past few weeks to allow the use of "inline" with certain x86 assembler routines, subject to restrictions for safety reasons.  I have successfully written code that implements this support