shithub: scc

Download patch

ref: 148abca828d1f6d5c4cb8753405c398082f77208
parent: 323f749e2672a0001d6fa1f063c23733d970004d
author: zerous Naveen Narayanan <[email protected]>
date: Thu Apr 23 12:05:10 EDT 2020

Use r14 for local variable storage as stw doesn't support r0

--- a/src/libc/arch/ppc32/linux/_cerrno.s
+++ b/src/libc/arch/ppc32/linux/_cerrno.s
@@ -5,8 +5,9 @@
 	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