[Bug 266] Can threadasm.S be replaced with generics?
via D.gnu
d.gnu at puremagic.com
Tue Jul 18 23:38:11 PDT 2017
https://bugzilla.gdcproject.org/show_bug.cgi?id=266
Johannes Pfau <johannespfau at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |johannespfau at gmail.com
--- Comment #1 from Johannes Pfau <johannespfau at gmail.com> ---
Interesting. Is there any documentation for these functions?
I'm wondering whether these functions are always guaranteed to save/restore all
registers? And why is __builtin_unwind_init required? Is this used to mark
registers as 'live' as written in some exception documentation?
We probably have to be careful when calling the builtin directly:
https://github.com/gcc-mirror/gcc/blob/master/gcc/ipa-split.c#L928
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31128
Also generated ARM code looks basically good, but there's one thing I don't
understand:
https://explore.dgnu.org/g/U2QTsK
push {r4, r5, r6, r7, r8, r9, r10, fp}
add fp, sp, #28
str sp, [r0]
mov sp, r1
sub sp, fp, #28
pop {r4, r5, r6, r7, r8, r9, r10, fp}
bx lr
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?).
--
You are receiving this mail because:
You are watching all bug changes.
More information about the D.gnu
mailing list