Re: [fpc-devel] Regarding issue/patch 0032637

2017-11-30 Thread J. Gareth Moreton
With no further objections, I've uploaded the patch to https://bugs.freepascal.org/view.php?id=32637 - it is prefixed with "STACK_FRAME_" - ignore the other 3 patches, as they're incorrect. Gareth aka. Kit On Thu 30/11/17 04:47 , "J. Gareth Moreton" gar...@moreton-family.com sent: > Would

Re: [fpc-devel] Regarding issue/patch 0032637

2017-11-29 Thread J. Gareth Moreton
Would code like this be correct? Procedure FillWord(var x; count: SizeInt; value: Word); assembler; nostackframe; asm { win64: rcx dest, rdx count, r8w value linux: rdi dest, rsi count, dx value } {$ifdef win64} push%rdi .seh_pushreg %rdi .seh_endprologue cmp $0x0, %rdx

Re: [fpc-devel] Regarding issue/patch 0032637

2017-11-29 Thread J. Gareth Moreton
Ooh right, okay. Thanks for that Sergei. I just put it in somewhat blindly because the compiler inserts it for Pascal code after the normal prologue after creating a stack frame, but complained and threw an error if I used .seh_pushreg but then neglected to use .seh_endprologue. I agree

Re: [fpc-devel] Regarding issue/patch 0032637

2017-11-29 Thread Sergei Gorelkin via fpc-devel
29.11.2017 15:12, J. Gareth Moreton wrote: Thanks Christo. Apologies for 4 messages coming in at once. I think there were a few technical glitches with the mailing list. Either way, I have submitted an updated patch to the bug report in question that corrects the stack unwinding for

Re: [fpc-devel] Regarding issue/patch 0032637

2017-11-29 Thread J. Gareth Moreton
Thanks Christo. Apologies for 4 messages coming in at once. I think there were a few technical glitches with the mailing list. Either way, I have submitted an updated patch to the bug report in question that corrects the stack unwinding for Windows. Any testing would be greatly appreciated

Re: [fpc-devel] Regarding issue/patch 0032637

2017-11-28 Thread Christo
On Sun, 2017-11-26 at 09:29 +, J. Gareth Moreton wrote: > I'm guessing my code is not correct or causes problems.  I haven't > had much luck in finding a straight answer  > regarding proper exception handling with assembler code (where > correcting non-volatile registers and stack  > space are

[fpc-devel] Regarding Issue/Patch 0032637

2017-11-28 Thread J. Gareth Moreton
Hi everyone, Re: https://bugs.freepascal.org/view.php? id=32637 I have now modified my assembler code that contains ".seh_pushreg %rdi" after each "push %rdi" instruction (the Linux versions don't actually push any registers because the required %rdi register is volatile on that platform).

[fpc-devel] Regarding Issue/Patch 0032637

2017-11-28 Thread J. Gareth Moreton
Hi everyone, Re: https://bugs.freepascal.org/view.php?id=32637 I apologise for my slight outburst. I didn't quite appreciate Thaddy's response when I asked how to get SEH to keep track of pushed registers ( http://forum.lazarus.freepascal.org/index.php/topic,39071.msg266937 ), but Marcov

Re: [fpc-devel] Regarding Issue/Patch 0032637

2017-11-28 Thread J. Gareth Moreton
Hi everyone, Re: https://bugs.freepascal.org/view.php?id=32637 I apologise for my slight outburst. I didn't quite appreciate Thaddy's response when I asked how to get SEH to keep track of pushed registers ( http://forum.lazarus.freepascal.org/index.php/topic,39071.msg266937 ), but Marcov

[fpc-devel] Regarding issue/patch 0032637

2017-11-28 Thread J. Gareth Moreton
I'm guessing my code is not correct or causes problems. I haven't had much luck in finding a straight answer regarding proper exception handling with assembler code (where correcting non-volatile registers and stack space are concerned), although I'll keep trying. I tried asking on the