/*#define XADDL(s,d) BYTE $0x0F; BYTE $0xC1; BYTE $((0<<6)|(s<<3)|(d))*/

/*TEXT	xadd(SB),$0	/* long xadd(long *, long); */

/*	MOVL	l+0(FP),BX
/*	MOVL	i+4(FP),AX
/*	LOCK
/*	XADDL(0,3)
/*	RET
*/

TEXT	pm_incref(SB),$0	/* void pm_incref(PmRef *); */
	MOVL	l+0(FP),AX
	LOCK
	INCL	0(AX)
	RET

TEXT	pm_decref(SB),$0	/* int pm_decref(PmRef*); */

	MOVL	l+0(FP),AX
	LOCK
	DECL	0(AX)
	JZ	iszero
	MOVL	$1, AX
	RET
iszero:
	MOVL	$0, AX
	RET
