code: 9ferno

ref: 8bb05d8ca955ed85c7028d74371f1d23ce66a800
dir: /tests/asmconventions_asm.s/

View raw version

TEXT asmarg1(SB), 1, $-4
	MOVQ	SP, 0(RARG)		/* store SP to the address in the first argument */
	MOVQ	0(SP), BX		/* store return PC - top of stack */
	MOVQ	BX, 8(RARG)		/*		to the next location at the same address */
	MOVL	$0, AX			/* return 0 */
	RET

TEXT asmarg2(SB), 1, $0
	MOVQ	SP, 0(RARG)		/* store SP to the address in the first argument */
	MOVQ	0(SP), BX		/* store return PC - top of stack */
	MOVQ	BX, 8(RARG)		/*		to the next location at the same address */
	MOVL	$0, AX			/* return 0 */
	RET