remove _xinc and _xdec from the c library, as the standard functions are now ainc and adec (see atom(2)). aside: i am not sure about the difference between the rb kernel's implementation of _xdec. it includes a SYNC, which i don't understand. any body have background on this? Reference: /n/atom/patch/applied/noclibxinc Date: Fri Jun 6 17:44:24 CES 2014 Signed-off-by: quanstro@quanstro.net --- /sys/src/libc/power/atom.s Fri Jun 6 17:42:35 2014 +++ /sys/src/libc/power/atom.s Fri Jun 6 17:42:35 2014 @@ -1,21 +1,21 @@ TEXT ainc(SB),$0 /* int ainc(int *); */ MOVW R3, R4 -xincloop: +aincloop: LWAR (R4), R3 ADD $1, R3 DCBT (R4) /* fix 405 errata cpu_210 */ STWCCC R3, (R4) - BNE xincloop + BNE aincloop RETURN TEXT adec(SB),$0 /* int adec(int *); */ MOVW R3, R4 -xdecloop: +adecloop: LWAR (R4), R3 ADD $-1, R3 DCBT (R4) /* fix 405 errata cpu_210 */ STWCCC R3, (R4) - BNE xdecloop + BNE adecloop RETURN TEXT loadlink(SB), $0 --- /sys/src/libc/mips/atom.s Fri Jun 6 17:42:37 2014 +++ /sys/src/libc/mips/atom.s Fri Jun 6 17:42:38 2014 @@ -6,8 +6,7 @@ #define SC(base, rt) WORD $((070<<26)|((base)<<21)|((rt)<<16)) #define NOOP WORD $0x27 -TEXT ainc(SB), 1, $-4 /* int ainc(long *); */ -TEXT _xinc(SB), 1, $-4 /* void _xinc(long *); */ +TEXT ainc(SB), 1, $-4 /* int ainc(int *); */ MOVW R1, R2 /* address of counter */ loop: MOVW $1, R3 LL(2, 1) @@ -19,8 +18,7 @@ BEQ R3,loop RET -TEXT adec(SB), 1, $-4 /* int adec(long*); */ -TEXT _xdec(SB), 1, $-4 /* long _xdec(long *); */ +TEXT adec(SB), 1, $-4 /* int adec(int*); */ MOVW R1, R2 /* address of counter */ loop1: MOVW $-1, R3 LL(2, 1) --- /sys/src/libc/arm/atom.s Fri Jun 6 17:42:39 2014 +++ /sys/src/libc/arm/atom.s Fri Jun 6 17:42:40 2014 @@ -25,7 +25,6 @@ MOVW $0, R0 RET -TEXT _xinc(SB), $0 /* void _xinc(long *); */ TEXT ainc(SB), $0 /* int ainc(int *); */ spinainc: LDREX(0,3) /* LDREX 0(R0),R3 */ @@ -36,7 +35,6 @@ MOVW R3, R0 RET -TEXT _xdec(SB), $0 /* long _xdec(long *); */ TEXT adec(SB), $0 /* int adec(int *); */ spinadec: LDREX(0,3) /* LDREX 0(R0),R3 */