Plan 9 from Bell Labs’s /usr/web/sources/contrib/quanstro/locktest/threadmcs/xincalpha.s

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


TEXT	_xdec(SB), $-8
	MOVQ	R0, R1		/* p */
dec1:
	MOVLL	(R1), R0		/* *p */
	SUBL		$1, R0
	MOVQ	R0, R2
	MOVLC	R2, (R1)		/* --(*p) */
	BEQ		R2, dec1		/* write failed, retry */
	RET

TEXT	_xinc(SB), $-8
	MOVQ	R0, R1		/* p */
inc1:
	MOVLL	(R1), R0		/* *p */
	ADDL	$1, R0
	MOVLC	R0, (R1)		/* (*p)++ */
	BEQ		R0, inc1		/* write failed, retry */
	RET


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].