Commit 8721bed0 authored by Mao Minkai's avatar Mao Minkai Committed by guzitao
Browse files

sw64: adjust layout of clear_user.S

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5XTLH



--------------------------------

Adjust layout of clear_user.S to make sure we can get the correct
symbol name when tracing.

Signed-off-by: default avatarMao Minkai <maominkai@wxiat.com>
Reviewed-by: default avatarHe Sheng <hesheng@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent 6769f44c
Loading
Loading
Loading
Loading
+32 −32
Original line number Diff line number Diff line
@@ -27,6 +27,38 @@
	.ent __clear_user
	.frame $30, 0, $26
	.prologue 0
__clear_user:
	and	$17, $17, $0
	and	$16, 7, $4
	beq	$0, $zerolength
	addl	$0, $4, $1
	and	$1, 7, $2
	srl	$1, 3, $1
	beq	$4, $loop

	subl	$4, 8, $4
	addl	$0, $4, $0
	beq	$1, $oneword

$head:
	EX(stb $31, 0($16))
	addl	$16, 1, $16
	addl	$4, 1, $4
	bne	$4, $head
	subl	$1, 1, $1
	br	$loop
	unop

$oneword:
	EX(stb $31, 0($16))
	addl	$16, 1, $16
	addl	$4, 1, $4
	bne	$4, $oneword
	clr	$0

$zerolength:
$exception:
	ret	$31, ($26), 1

$loop:
	and	$1, 3, $4
@@ -66,37 +98,5 @@ $tail:
	clr	$0
	ret	$31, ($26), 1

__clear_user:
	and	$17, $17, $0
	and	$16, 7, $4
	beq	$0, $zerolength
	addl	$0, $4, $1
	and	$1, 7, $2
	srl	$1, 3, $1
	beq	$4, $loop

	subl	$4, 8, $4
	addl	$0, $4, $0
	beq	$1, $oneword

$head:
	EX(stb $31, 0($16))
	addl	$16, 1, $16
	addl	$4, 1, $4
	bne	$4, $head
	subl	$1, 1, $1
	br	$loop
	unop

$oneword:
	EX(stb $31, 0($16))
	addl	$16, 1, $16
	addl	$4, 1, $4
	bne	$4, $oneword
	clr	$0

$zerolength:
$exception:
	ret	$31, ($26), 1
	.end __clear_user
	EXPORT_SYMBOL(__clear_user)