pipe.s 312 字节
Newer Older
R
Rich Felker 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
.set	noreorder
.global	pipe
.type	pipe,@function
pipe:
	lui	$3, %hi(%neg(%gp_rel(pipe)))
	daddiu	$3, $3, %lo(%neg(%gp_rel(pipe)))
	daddu	$3, $3, $25
	li	$2, 5021
	syscall
	beq	$7, $0, 1f
	nop
	ld	$25, %got_disp(__syscall_ret)($3)
	jr	$25
	dsubu	$4, $0, $2
1:	sw	$2, 0($4)
	sw	$3, 4($4)
	move	$2, $0
	jr	$ra
	nop