[Bug 266] Can threadasm.S be replaced with generics?
via D.gnu
d.gnu at puremagic.com
Wed Jul 19 02:09:45 PDT 2017
https://bugzilla.gdcproject.org/show_bug.cgi?id=266
--- Comment #3 from Iain Buclaw <ibuclaw at gdcproject.org> ---
(In reply to Iain Buclaw from comment #2)
> (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.
>
>
And this explains why the call to stack_restore() was optimized away entirely
without a compiler level memory barrier. I was rather puzzled by that last
night.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the D.gnu
mailing list