Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
00e065ea
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
00e065ea
编写于
5月 02, 2007
作者:
J
Jan Beulich
提交者:
Andi Kleen
5月 02, 2007
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] i386: Add dwarf2 annotations to *_user and checksum functions
Signed-off-by:
N
Andi Kleen
<
ak@suse.de
>
上级
37550907
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
102 addition
and
32 deletion
+102
-32
arch/i386/lib/checksum.S
arch/i386/lib/checksum.S
+60
-9
arch/i386/lib/getuser.S
arch/i386/lib/getuser.S
+17
-9
arch/i386/lib/putuser.S
arch/i386/lib/putuser.S
+25
-14
未找到文件。
arch/i386/lib/checksum.S
浏览文件 @
00e065ea
...
...
@@ -25,6 +25,8 @@
*
2
of
the
License
,
or
(
at
your
option
)
any
later
version
.
*/
#include <linux/linkage.h>
#include <asm/dwarf2.h>
#include <asm/errno.h>
/*
...
...
@@ -36,8 +38,6 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum)
*/
.
text
.
align
4
.
globl
csum_partial
#ifndef CONFIG_X86_USE_PPRO_CHECKSUM
...
...
@@ -48,9 +48,14 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum)
*
Fortunately
,
it
is
easy
to
convert
2
-
byte
alignment
to
4
-
byte
*
alignment
for
the
unrolled
loop
.
*/
csum_partial
:
ENTRY
(
csum_partial
)
CFI_STARTPROC
pushl
%
esi
CFI_ADJUST_CFA_OFFSET
4
CFI_REL_OFFSET
esi
,
0
pushl
%
ebx
CFI_ADJUST_CFA_OFFSET
4
CFI_REL_OFFSET
ebx
,
0
movl
20
(%
esp
),%
eax
#
Function
arg
:
unsigned
int
sum
movl
16
(%
esp
),%
ecx
#
Function
arg
:
int
len
movl
12
(%
esp
),%
esi
#
Function
arg
:
unsigned
char
*
buff
...
...
@@ -128,16 +133,27 @@ csum_partial:
roll
$
8
,
%
eax
8
:
popl
%
ebx
CFI_ADJUST_CFA_OFFSET
-
4
CFI_RESTORE
ebx
popl
%
esi
CFI_ADJUST_CFA_OFFSET
-
4
CFI_RESTORE
esi
ret
CFI_ENDPROC
ENDPROC
(
csum_partial
)
#else
/*
Version
for
PentiumII
/
PPro
*/
csum_partial
:
ENTRY
(
csum_partial
)
CFI_STARTPROC
pushl
%
esi
CFI_ADJUST_CFA_OFFSET
4
CFI_REL_OFFSET
esi
,
0
pushl
%
ebx
CFI_ADJUST_CFA_OFFSET
4
CFI_REL_OFFSET
ebx
,
0
movl
20
(%
esp
),%
eax
#
Function
arg
:
unsigned
int
sum
movl
16
(%
esp
),%
ecx
#
Function
arg
:
int
len
movl
12
(%
esp
),%
esi
#
Function
arg
:
const
unsigned
char
*
buf
...
...
@@ -245,8 +261,14 @@ csum_partial:
roll
$
8
,
%
eax
90
:
popl
%
ebx
CFI_ADJUST_CFA_OFFSET
-
4
CFI_RESTORE
ebx
popl
%
esi
CFI_ADJUST_CFA_OFFSET
-
4
CFI_RESTORE
esi
ret
CFI_ENDPROC
ENDPROC
(
csum_partial
)
#endif
...
...
@@ -278,19 +300,24 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst,
.
long
9999
b
,
6002
f
; \
.
previous
.
align
4
.
globl
csum_partial_copy_generic
#ifndef CONFIG_X86_USE_PPRO_CHECKSUM
#define ARGBASE 16
#define FP 12
csum_partial_copy_generic
:
ENTRY
(
csum_partial_copy_generic
)
CFI_STARTPROC
subl
$
4
,%
esp
CFI_ADJUST_CFA_OFFSET
4
pushl
%
edi
CFI_ADJUST_CFA_OFFSET
4
CFI_REL_OFFSET
edi
,
0
pushl
%
esi
CFI_ADJUST_CFA_OFFSET
4
CFI_REL_OFFSET
esi
,
0
pushl
%
ebx
CFI_ADJUST_CFA_OFFSET
4
CFI_REL_OFFSET
ebx
,
0
movl
ARGBASE
+
16
(%
esp
),%
eax
#
sum
movl
ARGBASE
+
12
(%
esp
),%
ecx
#
len
movl
ARGBASE
+
4
(%
esp
),%
esi
#
src
...
...
@@ -400,10 +427,19 @@ DST( movb %cl, (%edi) )
.
previous
popl
%
ebx
CFI_ADJUST_CFA_OFFSET
-
4
CFI_RESTORE
ebx
popl
%
esi
CFI_ADJUST_CFA_OFFSET
-
4
CFI_RESTORE
esi
popl
%
edi
CFI_ADJUST_CFA_OFFSET
-
4
CFI_RESTORE
edi
popl
%
ecx
#
equivalent
to
addl
$
4
,%
esp
CFI_ADJUST_CFA_OFFSET
-
4
ret
CFI_ENDPROC
ENDPROC
(
csum_partial_copy_generic
)
#else
...
...
@@ -421,10 +457,17 @@ DST( movb %cl, (%edi) )
#define ARGBASE 12
csum_partial_copy_generic
:
ENTRY
(
csum_partial_copy_generic
)
CFI_STARTPROC
pushl
%
ebx
CFI_ADJUST_CFA_OFFSET
4
CFI_REL_OFFSET
ebx
,
0
pushl
%
edi
CFI_ADJUST_CFA_OFFSET
4
CFI_REL_OFFSET
edi
,
0
pushl
%
esi
CFI_ADJUST_CFA_OFFSET
4
CFI_REL_OFFSET
esi
,
0
movl
ARGBASE
+
4
(%
esp
),%
esi
#
src
movl
ARGBASE
+
8
(%
esp
),%
edi
#
dst
movl
ARGBASE
+
12
(%
esp
),%
ecx
#
len
...
...
@@ -485,9 +528,17 @@ DST( movb %dl, (%edi) )
.
previous
popl
%
esi
CFI_ADJUST_CFA_OFFSET
-
4
CFI_RESTORE
esi
popl
%
edi
CFI_ADJUST_CFA_OFFSET
-
4
CFI_RESTORE
edi
popl
%
ebx
CFI_ADJUST_CFA_OFFSET
-
4
CFI_RESTORE
ebx
ret
CFI_ENDPROC
ENDPROC
(
csum_partial_copy_generic
)
#undef ROUND
#undef ROUND1
...
...
arch/i386/lib/getuser.S
浏览文件 @
00e065ea
...
...
@@ -8,6 +8,8 @@
*
return
an
error
value
in
addition
to
the
"real"
*
return
value
.
*/
#include <linux/linkage.h>
#include <asm/dwarf2.h>
#include <asm/thread_info.h>
...
...
@@ -24,19 +26,19 @@
*/
.
text
.
align
4
.
globl
__get_user_1
__get_user_1
:
ENTRY
(
__get_user_1
)
CFI_STARTPROC
GET_THREAD_INFO
(%
edx
)
cmpl
TI_addr_limit
(%
edx
),%
eax
jae
bad_get_user
1
:
movzbl
(%
eax
),%
edx
xorl
%
eax
,%
eax
ret
CFI_ENDPROC
ENDPROC
(
__get_user_1
)
.
align
4
.
globl
__get_user_2
__get_user_2
:
ENTRY
(
__get_user_2
)
CFI_STARTPROC
addl
$
1
,%
eax
jc
bad_get_user
GET_THREAD_INFO
(%
edx
)
...
...
@@ -45,10 +47,11 @@ __get_user_2:
2
:
movzwl
-
1
(%
eax
),%
edx
xorl
%
eax
,%
eax
ret
CFI_ENDPROC
ENDPROC
(
__get_user_2
)
.
align
4
.
globl
__get_user_4
__get_user_4
:
ENTRY
(
__get_user_4
)
CFI_STARTPROC
addl
$
3
,%
eax
jc
bad_get_user
GET_THREAD_INFO
(%
edx
)
...
...
@@ -57,11 +60,16 @@ __get_user_4:
3
:
movl
-
3
(%
eax
),%
edx
xorl
%
eax
,%
eax
ret
CFI_ENDPROC
ENDPROC
(
__get_user_4
)
bad_get_user
:
CFI_STARTPROC
xorl
%
edx
,%
edx
movl
$
-
14
,%
eax
ret
CFI_ENDPROC
END
(
bad_get_user
)
.
section
__ex_table
,"
a
"
.
long
1
b
,
bad_get_user
...
...
arch/i386/lib/putuser.S
浏览文件 @
00e065ea
...
...
@@ -8,6 +8,8 @@
*
return
an
error
value
in
addition
to
the
"real"
*
return
value
.
*/
#include <linux/linkage.h>
#include <asm/dwarf2.h>
#include <asm/thread_info.h>
...
...
@@ -23,23 +25,28 @@
*
as
they
get
called
from
within
inline
assembly
.
*/
#define ENTER pushl %ebx ; GET_THREAD_INFO(%ebx)
#define EXIT popl %ebx ; ret
#define ENTER CFI_STARTPROC ; \
pushl
%
ebx
; \
CFI_ADJUST_CFA_OFFSET
4
; \
CFI_REL_OFFSET
ebx
,
0
; \
GET_THREAD_INFO
(%
ebx
)
#define EXIT popl %ebx ; \
CFI_ADJUST_CFA_OFFSET
-
4
; \
CFI_RESTORE
ebx
; \
ret
; \
CFI_ENDPROC
.
text
.
align
4
.
globl
__put_user_1
__put_user_1
:
ENTRY
(
__put_user_1
)
ENTER
cmpl
TI_addr_limit
(%
ebx
),%
ecx
jae
bad_put_user
1
:
movb
%
al
,(%
ecx
)
xorl
%
eax
,%
eax
EXIT
ENDPROC
(
__put_user_1
)
.
align
4
.
globl
__put_user_2
__put_user_2
:
ENTRY
(
__put_user_2
)
ENTER
movl
TI_addr_limit
(%
ebx
),%
ebx
subl
$
1
,%
ebx
...
...
@@ -48,10 +55,9 @@ __put_user_2:
2
:
movw
%
ax
,(%
ecx
)
xorl
%
eax
,%
eax
EXIT
ENDPROC
(
__put_user_2
)
.
align
4
.
globl
__put_user_4
__put_user_4
:
ENTRY
(
__put_user_4
)
ENTER
movl
TI_addr_limit
(%
ebx
),%
ebx
subl
$
3
,%
ebx
...
...
@@ -60,10 +66,9 @@ __put_user_4:
3
:
movl
%
eax
,(%
ecx
)
xorl
%
eax
,%
eax
EXIT
ENDPROC
(
__put_user_4
)
.
align
4
.
globl
__put_user_8
__put_user_8
:
ENTRY
(
__put_user_8
)
ENTER
movl
TI_addr_limit
(%
ebx
),%
ebx
subl
$
7
,%
ebx
...
...
@@ -73,10 +78,16 @@ __put_user_8:
5
:
movl
%
edx
,
4
(%
ecx
)
xorl
%
eax
,%
eax
EXIT
ENDPROC
(
__put_user_8
)
bad_put_user
:
CFI_STARTPROC
simple
CFI_DEF_CFA
esp
,
2
*
4
CFI_OFFSET
eip
,
-
1
*
4
CFI_OFFSET
ebx
,
-
2
*
4
movl
$
-
14
,%
eax
EXIT
END
(
bad_put_user
)
.
section
__ex_table
,"
a
"
.
long
1
b
,
bad_put_user
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录