[Bug 266] Can threadasm.S be replaced with generics?

via D.gnu d.gnu at puremagic.com
Wed Jul 19 01:09:38 PDT 2017


https://bugzilla.gdcproject.org/show_bug.cgi?id=266

--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject.org> ---
(In reply to Johannes Pfau from comment #1)
> What is the add/sub fp code supposed to do? Doesn't this actually restore
> the old stack pointer (have to look up the ARM assembler operand order, but
> isn't add.. => fp = sp+28 and sub... => sp = fp-28 which restores the old
> sp?).

Hmm, yeah you're right.  It would all be fine if it weren't for the restoring
of the FP.  Having a look again, there is the same in the x86 version too.


        mov     QWORD PTR [rdi], rsp
        mov     rsp, rsi
        lea     rsp, -40[rbp]  <-- Here.


So at best it makes a good indicator of what you should go threadasm,  but
*watch out* for FP restoring.

So this is would be for documentation purposes then.

https://explore.dgnu.org/g/z3dB2R

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the D.gnu mailing list