|author||Rich Felker <firstname.lastname@example.org>||2015-11-02 16:16:00 -0500|
|committer||Rich Felker <email@example.com>||2015-11-02 16:16:00 -0500|
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).
Diffstat (limited to 'src/thread/powerpc')
1 files changed, 3 insertions, 1 deletions
diff --git a/src/thread/powerpc/syscall_cp.s b/src/thread/powerpc/syscall_cp.s
index 20b5e0ac..77f8938d 100644
@@ -38,7 +38,7 @@ __cp_begin:
cmpwi cr7, 0, 0 #compare r0 with 0, store result in cr7.
beq+ cr7, 1f #jump to label 1 if r0 was 0
- b __cancel #else call cancel
+ b __cp_cancel #else call cancel
#ok, the cancel flag was not set
# syscall: number goes to r0, the rest 3-8
@@ -55,3 +55,5 @@ __cp_end:
#else negate result.
neg 3, 3
+ b __cancel