commit 148abca828d1f6d5c4cb8753405c398082f77208
parent 323f749e2672a0001d6fa1f063c23733d970004d
Author: zerous Naveen Narayanan <zerous@simple-cc.org>
Date: Thu, 23 Apr 2020 16:05:10 +0200
Use r14 for local variable storage as stw doesn't support r0
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/libc/arch/ppc32/linux/_cerrno.s b/src/libc/arch/ppc32/linux/_cerrno.s
@@ -5,8 +5,9 @@ _cerrno:
bne err
blr
err:
- lis 0,errno@h
- ori 0,0,errno@l
- stw 3,0(0)
+ lis 14,errno@h
+ ori 14,14,errno@l
+ stw 3,0(14)
+ xor 3,3,3
addi 3,3,-1
blr