[Ohrrpgce] SVN: teeemcee/7974 Change asm gosub implementation to preserve 16 byte stack alignment.

Ralph Versteegen teeemcee at gmail.com
Fri Apr 29 14:47:22 PDT 2016


On 30 April 2016 at 09:45, Ralph Versteegen <teeemcee at gmail.com> wrote:
> No, this doesn't fix anything.
>
> Unlike Linux, which requires 16 byte stack alignment but will never
> actually throw a SIGBUS unless you use SSE (and we pass options to gcc
> to prevent that in code we compile), on Mac you have to keep the stack
> aligned or even a PRINT will crash.
> However while it wasn't much work to update the backend, it turns out
> that there are no assemblers for OSX that support Intel syntax. Apple
> gas is broken, LLVM is *really* broken, and FSF gas hasn't been ported
> at all. So the FB gas backend, while having complete support, can't be
> used.
>
> So this patch isn't useful yet, but if my patch is merged and we drop
> support FB 1.05 and earlier, then we will be able to stop passing
> -mpreferred-stack-boundary to gcc.
(Referring to a patch to get FB to keep the stack aligned on Linux.)

> On 30 April 2016 at 02:06, James Paige <Bob at hamsterrepublic.com> wrote:
>> Does this one need to be merged for callipygous+1?
>>
>> On Thu, Apr 28, 2016 at 7:30 AM, <subversion at hamsterrepublic.com> wrote:
>>>
>>> teeemcee
>>> 2016-04-28 07:30:30 -0700 (Thu, 28 Apr 2016)
>>> 316
>>> Change asm gosub implementation to preserve 16 byte stack alignment.
>>>
>>> This is only important on Macs (where the asm implementation isn't used)
>>> and on Linux (where I haven't seen any problems so far, despite the fact
>>> that FB doesn't align the stack although it's meant to, so GOSUB is the
>>> least of our worries there.)
>>> ---
>>> U   wip/config.bi


More information about the Ohrrpgce mailing list