use explicit __cp_cancel label in cancellable syscall asm for all archs

previously, only archs that needed to do stack cleanup defined a
__cp_cancel label for acting on cancellation in their syscall asm, and
a default definition was provided by a weak alias to __cancel, the C
function. this resulted in wrong codegen for arm on gcc versions
affected by pr 68178 and possibly similar issues (like pr 66609) on
other archs, and also created an inconsistency where the __cp_begin
and __cp_end labels were treated as const data but __cp_cancel was
treated as a function. this in turn caused incorrect code generation
on archs where function pointers point to function descriptors rather
than code (for now, only sh/fdpic).
This commit is contained in:
Rich Felker
2015-11-02 16:16:00 -05:00
parent cb1bf2f321
commit 36e8b6a28b
8 changed files with 32 additions and 28 deletions

View File

@ -12,7 +12,7 @@ __syscall_cp_asm:
__cp_begin:
l.lwz r3, 0(r3)
l.sfeqi r3, 0
l.bnf __cancel
l.bnf __cp_cancel
l.ori r11, r4, 0
l.ori r3, r5, 0
l.ori r4, r6, 0
@ -24,3 +24,6 @@ __cp_begin:
__cp_end:
l.jr r9
l.nop
__cp_cancel:
l.j __cancel
l.nop