Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ca282f69
Commit
ca282f69
authored
Mar 07, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alpha: add a helper for emitting exception table entries
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
c9df6025
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
186 deletions
+68
-186
arch/alpha/include/asm/futex.h
arch/alpha/include/asm/futex.h
+4
-12
arch/alpha/include/asm/uaccess.h
arch/alpha/include/asm/uaccess.h
+22
-58
arch/alpha/kernel/traps.c
arch/alpha/kernel/traps.c
+40
-108
arch/alpha/lib/csum_partial_copy.c
arch/alpha/lib/csum_partial_copy.c
+2
-8
No files found.
arch/alpha/include/asm/futex.h
View file @
ca282f69
...
@@ -19,12 +19,8 @@
...
@@ -19,12 +19,8 @@
"3: .subsection 2\n" \
"3: .subsection 2\n" \
"4: br 1b\n" \
"4: br 1b\n" \
" .previous\n" \
" .previous\n" \
" .section __ex_table,\"a\"\n" \
EXC(1b,3b,%1,$31) \
" .long 1b-.\n" \
EXC(2b,3b,%1,$31) \
" lda $31,3b-1b(%1)\n" \
" .long 2b-.\n" \
" lda $31,3b-2b(%1)\n" \
" .previous\n" \
: "=&r" (oldval), "=&r"(ret) \
: "=&r" (oldval), "=&r"(ret) \
: "r" (uaddr), "r"(oparg) \
: "r" (uaddr), "r"(oparg) \
: "memory")
: "memory")
...
@@ -101,12 +97,8 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
...
@@ -101,12 +97,8 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
"3: .subsection 2
\n
"
"3: .subsection 2
\n
"
"4: br 1b
\n
"
"4: br 1b
\n
"
" .previous
\n
"
" .previous
\n
"
" .section __ex_table,
\"
a
\"\n
"
EXC
(
1
b
,
3
b
,
%
0
,
$
31
)
" .long 1b-.
\n
"
EXC
(
2
b
,
3
b
,
%
0
,
$
31
)
" lda $31,3b-1b(%0)
\n
"
" .long 2b-.
\n
"
" lda $31,3b-2b(%0)
\n
"
" .previous
\n
"
:
"+r"
(
ret
),
"=&r"
(
prev
),
"=&r"
(
cmp
)
:
"+r"
(
ret
),
"=&r"
(
prev
),
"=&r"
(
cmp
)
:
"r"
(
uaddr
),
"r"
((
long
)(
int
)
oldval
),
"r"
(
newval
)
:
"r"
(
uaddr
),
"r"
((
long
)(
int
)
oldval
),
"r"
(
newval
)
:
"memory"
);
:
"memory"
);
...
...
arch/alpha/include/asm/uaccess.h
View file @
ca282f69
...
@@ -74,6 +74,11 @@
...
@@ -74,6 +74,11 @@
* more extensive comments with fixup_inline_exception below for
* more extensive comments with fixup_inline_exception below for
* more information.
* more information.
*/
*/
#define EXC(label,cont,res,err) \
".section __ex_table,\"a\"\n" \
" .long "#label"-.\n" \
" lda "#res","#cont"-"#label"("#err")\n" \
".previous\n"
extern
void
__get_user_unknown
(
void
);
extern
void
__get_user_unknown
(
void
);
...
@@ -118,20 +123,14 @@ struct __large_struct { unsigned long buf[100]; };
...
@@ -118,20 +123,14 @@ struct __large_struct { unsigned long buf[100]; };
#define __get_user_64(addr) \
#define __get_user_64(addr) \
__asm__("1: ldq %0,%2\n" \
__asm__("1: ldq %0,%2\n" \
"2:\n" \
"2:\n" \
".section __ex_table,\"a\"\n" \
EXC(1b,2b,%0,%1) \
" .long 1b - .\n" \
" lda %0, 2b-1b(%1)\n" \
".previous" \
: "=r"(__gu_val), "=r"(__gu_err) \
: "=r"(__gu_val), "=r"(__gu_err) \
: "m"(__m(addr)), "1"(__gu_err))
: "m"(__m(addr)), "1"(__gu_err))
#define __get_user_32(addr) \
#define __get_user_32(addr) \
__asm__("1: ldl %0,%2\n" \
__asm__("1: ldl %0,%2\n" \
"2:\n" \
"2:\n" \
".section __ex_table,\"a\"\n" \
EXC(1b,2b,%0,%1) \
" .long 1b - .\n" \
" lda %0, 2b-1b(%1)\n" \
".previous" \
: "=r"(__gu_val), "=r"(__gu_err) \
: "=r"(__gu_val), "=r"(__gu_err) \
: "m"(__m(addr)), "1"(__gu_err))
: "m"(__m(addr)), "1"(__gu_err))
...
@@ -141,20 +140,14 @@ struct __large_struct { unsigned long buf[100]; };
...
@@ -141,20 +140,14 @@ struct __large_struct { unsigned long buf[100]; };
#define __get_user_16(addr) \
#define __get_user_16(addr) \
__asm__("1: ldwu %0,%2\n" \
__asm__("1: ldwu %0,%2\n" \
"2:\n" \
"2:\n" \
".section __ex_table,\"a\"\n" \
EXC(1b,2b,%0,%1) \
" .long 1b - .\n" \
" lda %0, 2b-1b(%1)\n" \
".previous" \
: "=r"(__gu_val), "=r"(__gu_err) \
: "=r"(__gu_val), "=r"(__gu_err) \
: "m"(__m(addr)), "1"(__gu_err))
: "m"(__m(addr)), "1"(__gu_err))
#define __get_user_8(addr) \
#define __get_user_8(addr) \
__asm__("1: ldbu %0,%2\n" \
__asm__("1: ldbu %0,%2\n" \
"2:\n" \
"2:\n" \
".section __ex_table,\"a\"\n" \
EXC(1b,2b,%0,%1) \
" .long 1b - .\n" \
" lda %0, 2b-1b(%1)\n" \
".previous" \
: "=r"(__gu_val), "=r"(__gu_err) \
: "=r"(__gu_val), "=r"(__gu_err) \
: "m"(__m(addr)), "1"(__gu_err))
: "m"(__m(addr)), "1"(__gu_err))
#else
#else
...
@@ -170,12 +163,8 @@ struct __large_struct { unsigned long buf[100]; };
...
@@ -170,12 +163,8 @@ struct __large_struct { unsigned long buf[100]; };
" extwh %1,%3,%1\n" \
" extwh %1,%3,%1\n" \
" or %0,%1,%0\n" \
" or %0,%1,%0\n" \
"3:\n" \
"3:\n" \
".section __ex_table,\"a\"\n" \
EXC(1b,3b,%0,%2) \
" .long 1b - .\n" \
EXC(2b,3b,%0,%2) \
" lda %0, 3b-1b(%2)\n" \
" .long 2b - .\n" \
" lda %0, 3b-2b(%2)\n" \
".previous" \
: "=&r"(__gu_val), "=&r"(__gu_tmp), "=r"(__gu_err) \
: "=&r"(__gu_val), "=&r"(__gu_tmp), "=r"(__gu_err) \
: "r"(addr), "2"(__gu_err)); \
: "r"(addr), "2"(__gu_err)); \
}
}
...
@@ -184,10 +173,7 @@ struct __large_struct { unsigned long buf[100]; };
...
@@ -184,10 +173,7 @@ struct __large_struct { unsigned long buf[100]; };
__asm__("1: ldq_u %0,0(%2)\n" \
__asm__("1: ldq_u %0,0(%2)\n" \
" extbl %0,%2,%0\n" \
" extbl %0,%2,%0\n" \
"2:\n" \
"2:\n" \
".section __ex_table,\"a\"\n" \
EXC(1b,2b,%0,%1) \
" .long 1b - .\n" \
" lda %0, 2b-1b(%1)\n" \
".previous" \
: "=&r"(__gu_val), "=r"(__gu_err) \
: "=&r"(__gu_val), "=r"(__gu_err) \
: "r"(addr), "1"(__gu_err))
: "r"(addr), "1"(__gu_err))
#endif
#endif
...
@@ -233,20 +219,14 @@ extern void __put_user_unknown(void);
...
@@ -233,20 +219,14 @@ extern void __put_user_unknown(void);
#define __put_user_64(x, addr) \
#define __put_user_64(x, addr) \
__asm__ __volatile__("1: stq %r2,%1\n" \
__asm__ __volatile__("1: stq %r2,%1\n" \
"2:\n" \
"2:\n" \
".section __ex_table,\"a\"\n" \
EXC(1b,2b,$31,%0) \
" .long 1b - .\n" \
" lda $31,2b-1b(%0)\n" \
".previous" \
: "=r"(__pu_err) \
: "=r"(__pu_err) \
: "m" (__m(addr)), "rJ" (x), "0"(__pu_err))
: "m" (__m(addr)), "rJ" (x), "0"(__pu_err))
#define __put_user_32(x, addr) \
#define __put_user_32(x, addr) \
__asm__ __volatile__("1: stl %r2,%1\n" \
__asm__ __volatile__("1: stl %r2,%1\n" \
"2:\n" \
"2:\n" \
".section __ex_table,\"a\"\n" \
EXC(1b,2b,$31,%0) \
" .long 1b - .\n" \
" lda $31,2b-1b(%0)\n" \
".previous" \
: "=r"(__pu_err) \
: "=r"(__pu_err) \
: "m"(__m(addr)), "rJ"(x), "0"(__pu_err))
: "m"(__m(addr)), "rJ"(x), "0"(__pu_err))
...
@@ -256,20 +236,14 @@ __asm__ __volatile__("1: stl %r2,%1\n" \
...
@@ -256,20 +236,14 @@ __asm__ __volatile__("1: stl %r2,%1\n" \
#define __put_user_16(x, addr) \
#define __put_user_16(x, addr) \
__asm__ __volatile__("1: stw %r2,%1\n" \
__asm__ __volatile__("1: stw %r2,%1\n" \
"2:\n" \
"2:\n" \
".section __ex_table,\"a\"\n" \
EXC(1b,2b,$31,%0) \
" .long 1b - .\n" \
" lda $31,2b-1b(%0)\n" \
".previous" \
: "=r"(__pu_err) \
: "=r"(__pu_err) \
: "m"(__m(addr)), "rJ"(x), "0"(__pu_err))
: "m"(__m(addr)), "rJ"(x), "0"(__pu_err))
#define __put_user_8(x, addr) \
#define __put_user_8(x, addr) \
__asm__ __volatile__("1: stb %r2,%1\n" \
__asm__ __volatile__("1: stb %r2,%1\n" \
"2:\n" \
"2:\n" \
".section __ex_table,\"a\"\n" \
EXC(1b,2b,$31,%0) \
" .long 1b - .\n" \
" lda $31,2b-1b(%0)\n" \
".previous" \
: "=r"(__pu_err) \
: "=r"(__pu_err) \
: "m"(__m(addr)), "rJ"(x), "0"(__pu_err))
: "m"(__m(addr)), "rJ"(x), "0"(__pu_err))
#else
#else
...
@@ -291,16 +265,10 @@ __asm__ __volatile__("1: stb %r2,%1\n" \
...
@@ -291,16 +265,10 @@ __asm__ __volatile__("1: stb %r2,%1\n" \
"3: stq_u %2,1(%5)\n" \
"3: stq_u %2,1(%5)\n" \
"4: stq_u %1,0(%5)\n" \
"4: stq_u %1,0(%5)\n" \
"5:\n" \
"5:\n" \
".section __ex_table,\"a\"\n" \
EXC(1b,5b,$31,%0) \
" .long 1b - .\n" \
EXC(2b,5b,$31,%0) \
" lda $31, 5b-1b(%0)\n" \
EXC(3b,5b,$31,%0) \
" .long 2b - .\n" \
EXC(4b,5b,$31,%0) \
" lda $31, 5b-2b(%0)\n" \
" .long 3b - .\n" \
" lda $31, 5b-3b(%0)\n" \
" .long 4b - .\n" \
" lda $31, 5b-4b(%0)\n" \
".previous" \
: "=r"(__pu_err), "=&r"(__pu_tmp1), \
: "=r"(__pu_err), "=&r"(__pu_tmp1), \
"=&r"(__pu_tmp2), "=&r"(__pu_tmp3), \
"=&r"(__pu_tmp2), "=&r"(__pu_tmp3), \
"=&r"(__pu_tmp4) \
"=&r"(__pu_tmp4) \
...
@@ -317,12 +285,8 @@ __asm__ __volatile__("1: stb %r2,%1\n" \
...
@@ -317,12 +285,8 @@ __asm__ __volatile__("1: stb %r2,%1\n" \
" or %1,%2,%1\n" \
" or %1,%2,%1\n" \
"2: stq_u %1,0(%4)\n" \
"2: stq_u %1,0(%4)\n" \
"3:\n" \
"3:\n" \
".section __ex_table,\"a\"\n" \
EXC(1b,3b,$31,%0) \
" .long 1b - .\n" \
EXC(2b,3b,$31,%0) \
" lda $31, 3b-1b(%0)\n" \
" .long 2b - .\n" \
" lda $31, 3b-2b(%0)\n" \
".previous" \
: "=r"(__pu_err), \
: "=r"(__pu_err), \
"=&r"(__pu_tmp1), "=&r"(__pu_tmp2) \
"=&r"(__pu_tmp1), "=&r"(__pu_tmp2) \
: "r"((unsigned long)(x)), "r"(addr), "0"(__pu_err)); \
: "r"((unsigned long)(x)), "r"(addr), "0"(__pu_err)); \
...
...
arch/alpha/kernel/traps.c
View file @
ca282f69
...
@@ -482,12 +482,8 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
...
@@ -482,12 +482,8 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
" extwl %1,%3,%1
\n
"
" extwl %1,%3,%1
\n
"
" extwh %2,%3,%2
\n
"
" extwh %2,%3,%2
\n
"
"3:
\n
"
"3:
\n
"
".section __ex_table,
\"
a
\"\n
"
EXC
(
1
b
,
3
b
,
%
1
,
%
0
)
" .long 1b - .
\n
"
EXC
(
2
b
,
3
b
,
%
2
,
%
0
)
" lda %1,3b-1b(%0)
\n
"
" .long 2b - .
\n
"
" lda %2,3b-2b(%0)
\n
"
".previous"
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"r"
(
va
),
"0"
(
0
));
:
"r"
(
va
),
"0"
(
0
));
if
(
error
)
if
(
error
)
...
@@ -502,12 +498,8 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
...
@@ -502,12 +498,8 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
" extll %1,%3,%1
\n
"
" extll %1,%3,%1
\n
"
" extlh %2,%3,%2
\n
"
" extlh %2,%3,%2
\n
"
"3:
\n
"
"3:
\n
"
".section __ex_table,
\"
a
\"\n
"
EXC
(
1
b
,
3
b
,
%
1
,
%
0
)
" .long 1b - .
\n
"
EXC
(
2
b
,
3
b
,
%
2
,
%
0
)
" lda %1,3b-1b(%0)
\n
"
" .long 2b - .
\n
"
" lda %2,3b-2b(%0)
\n
"
".previous"
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"r"
(
va
),
"0"
(
0
));
:
"r"
(
va
),
"0"
(
0
));
if
(
error
)
if
(
error
)
...
@@ -522,12 +514,8 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
...
@@ -522,12 +514,8 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
" extql %1,%3,%1
\n
"
" extql %1,%3,%1
\n
"
" extqh %2,%3,%2
\n
"
" extqh %2,%3,%2
\n
"
"3:
\n
"
"3:
\n
"
".section __ex_table,
\"
a
\"\n
"
EXC
(
1
b
,
3
b
,
%
1
,
%
0
)
" .long 1b - .
\n
"
EXC
(
2
b
,
3
b
,
%
2
,
%
0
)
" lda %1,3b-1b(%0)
\n
"
" .long 2b - .
\n
"
" lda %2,3b-2b(%0)
\n
"
".previous"
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"r"
(
va
),
"0"
(
0
));
:
"r"
(
va
),
"0"
(
0
));
if
(
error
)
if
(
error
)
...
@@ -551,16 +539,10 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
...
@@ -551,16 +539,10 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
"3: stq_u %2,1(%5)
\n
"
"3: stq_u %2,1(%5)
\n
"
"4: stq_u %1,0(%5)
\n
"
"4: stq_u %1,0(%5)
\n
"
"5:
\n
"
"5:
\n
"
".section __ex_table,
\"
a
\"\n
"
EXC
(
1
b
,
5
b
,
%
2
,
%
0
)
" .long 1b - .
\n
"
EXC
(
2
b
,
5
b
,
%
1
,
%
0
)
" lda %2,5b-1b(%0)
\n
"
EXC
(
3
b
,
5
b
,
$
31
,
%
0
)
" .long 2b - .
\n
"
EXC
(
4
b
,
5
b
,
$
31
,
%
0
)
" lda %1,5b-2b(%0)
\n
"
" .long 3b - .
\n
"
" lda $31,5b-3b(%0)
\n
"
" .long 4b - .
\n
"
" lda $31,5b-4b(%0)
\n
"
".previous"
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
),
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
),
"=&r"
(
tmp3
),
"=&r"
(
tmp4
)
"=&r"
(
tmp3
),
"=&r"
(
tmp4
)
:
"r"
(
va
),
"r"
(
una_reg
(
reg
)),
"0"
(
0
));
:
"r"
(
va
),
"r"
(
una_reg
(
reg
)),
"0"
(
0
));
...
@@ -581,16 +563,10 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
...
@@ -581,16 +563,10 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
"3: stq_u %2,3(%5)
\n
"
"3: stq_u %2,3(%5)
\n
"
"4: stq_u %1,0(%5)
\n
"
"4: stq_u %1,0(%5)
\n
"
"5:
\n
"
"5:
\n
"
".section __ex_table,
\"
a
\"\n
"
EXC
(
1
b
,
5
b
,
%
2
,
%
0
)
" .long 1b - .
\n
"
EXC
(
2
b
,
5
b
,
%
1
,
%
0
)
" lda %2,5b-1b(%0)
\n
"
EXC
(
3
b
,
5
b
,
$
31
,
%
0
)
" .long 2b - .
\n
"
EXC
(
4
b
,
5
b
,
$
31
,
%
0
)
" lda %1,5b-2b(%0)
\n
"
" .long 3b - .
\n
"
" lda $31,5b-3b(%0)
\n
"
" .long 4b - .
\n
"
" lda $31,5b-4b(%0)
\n
"
".previous"
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
),
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
),
"=&r"
(
tmp3
),
"=&r"
(
tmp4
)
"=&r"
(
tmp3
),
"=&r"
(
tmp4
)
:
"r"
(
va
),
"r"
(
una_reg
(
reg
)),
"0"
(
0
));
:
"r"
(
va
),
"r"
(
una_reg
(
reg
)),
"0"
(
0
));
...
@@ -611,16 +587,10 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
...
@@ -611,16 +587,10 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
"3: stq_u %2,7(%5)
\n
"
"3: stq_u %2,7(%5)
\n
"
"4: stq_u %1,0(%5)
\n
"
"4: stq_u %1,0(%5)
\n
"
"5:
\n
"
"5:
\n
"
".section __ex_table,
\"
a
\"\n\t
"
EXC
(
1
b
,
5
b
,
%
2
,
%
0
)
" .long 1b - .
\n
"
EXC
(
2
b
,
5
b
,
%
1
,
%
0
)
" lda %2,5b-1b(%0)
\n
"
EXC
(
3
b
,
5
b
,
$
31
,
%
0
)
" .long 2b - .
\n
"
EXC
(
4
b
,
5
b
,
$
31
,
%
0
)
" lda %1,5b-2b(%0)
\n
"
" .long 3b - .
\n
"
" lda $31,5b-3b(%0)
\n
"
" .long 4b - .
\n
"
" lda $31,5b-4b(%0)
\n
"
".previous"
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
),
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
),
"=&r"
(
tmp3
),
"=&r"
(
tmp4
)
"=&r"
(
tmp3
),
"=&r"
(
tmp4
)
:
"r"
(
va
),
"r"
(
una_reg
(
reg
)),
"0"
(
0
));
:
"r"
(
va
),
"r"
(
una_reg
(
reg
)),
"0"
(
0
));
...
@@ -835,12 +805,8 @@ do_entUnaUser(void __user * va, unsigned long opcode,
...
@@ -835,12 +805,8 @@ do_entUnaUser(void __user * va, unsigned long opcode,
" extwl %1,%3,%1
\n
"
" extwl %1,%3,%1
\n
"
" extwh %2,%3,%2
\n
"
" extwh %2,%3,%2
\n
"
"3:
\n
"
"3:
\n
"
".section __ex_table,
\"
a
\"\n
"
EXC
(
1
b
,
3
b
,
%
1
,
%
0
)
" .long 1b - .
\n
"
EXC
(
2
b
,
3
b
,
%
2
,
%
0
)
" lda %1,3b-1b(%0)
\n
"
" .long 2b - .
\n
"
" lda %2,3b-2b(%0)
\n
"
".previous"
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"r"
(
va
),
"0"
(
0
));
:
"r"
(
va
),
"0"
(
0
));
if
(
error
)
if
(
error
)
...
@@ -855,12 +821,8 @@ do_entUnaUser(void __user * va, unsigned long opcode,
...
@@ -855,12 +821,8 @@ do_entUnaUser(void __user * va, unsigned long opcode,
" extll %1,%3,%1
\n
"
" extll %1,%3,%1
\n
"
" extlh %2,%3,%2
\n
"
" extlh %2,%3,%2
\n
"
"3:
\n
"
"3:
\n
"
".section __ex_table,
\"
a
\"\n
"
EXC
(
1
b
,
3
b
,
%
1
,
%
0
)
" .long 1b - .
\n
"
EXC
(
2
b
,
3
b
,
%
2
,
%
0
)
" lda %1,3b-1b(%0)
\n
"
" .long 2b - .
\n
"
" lda %2,3b-2b(%0)
\n
"
".previous"
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"r"
(
va
),
"0"
(
0
));
:
"r"
(
va
),
"0"
(
0
));
if
(
error
)
if
(
error
)
...
@@ -875,12 +837,8 @@ do_entUnaUser(void __user * va, unsigned long opcode,
...
@@ -875,12 +837,8 @@ do_entUnaUser(void __user * va, unsigned long opcode,
" extql %1,%3,%1
\n
"
" extql %1,%3,%1
\n
"
" extqh %2,%3,%2
\n
"
" extqh %2,%3,%2
\n
"
"3:
\n
"
"3:
\n
"
".section __ex_table,
\"
a
\"\n
"
EXC
(
1
b
,
3
b
,
%
1
,
%
0
)
" .long 1b - .
\n
"
EXC
(
2
b
,
3
b
,
%
2
,
%
0
)
" lda %1,3b-1b(%0)
\n
"
" .long 2b - .
\n
"
" lda %2,3b-2b(%0)
\n
"
".previous"
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"r"
(
va
),
"0"
(
0
));
:
"r"
(
va
),
"0"
(
0
));
if
(
error
)
if
(
error
)
...
@@ -895,12 +853,8 @@ do_entUnaUser(void __user * va, unsigned long opcode,
...
@@ -895,12 +853,8 @@ do_entUnaUser(void __user * va, unsigned long opcode,
" extll %1,%3,%1
\n
"
" extll %1,%3,%1
\n
"
" extlh %2,%3,%2
\n
"
" extlh %2,%3,%2
\n
"
"3:
\n
"
"3:
\n
"
".section __ex_table,
\"
a
\"\n
"
EXC
(
1
b
,
3
b
,
%
1
,
%
0
)
" .long 1b - .
\n
"
EXC
(
2
b
,
3
b
,
%
2
,
%
0
)
" lda %1,3b-1b(%0)
\n
"
" .long 2b - .
\n
"
" lda %2,3b-2b(%0)
\n
"
".previous"
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"r"
(
va
),
"0"
(
0
));
:
"r"
(
va
),
"0"
(
0
));
if
(
error
)
if
(
error
)
...
@@ -915,12 +869,8 @@ do_entUnaUser(void __user * va, unsigned long opcode,
...
@@ -915,12 +869,8 @@ do_entUnaUser(void __user * va, unsigned long opcode,
" extql %1,%3,%1
\n
"
" extql %1,%3,%1
\n
"
" extqh %2,%3,%2
\n
"
" extqh %2,%3,%2
\n
"
"3:
\n
"
"3:
\n
"
".section __ex_table,
\"
a
\"\n
"
EXC
(
1
b
,
3
b
,
%
1
,
%
0
)
" .long 1b - .
\n
"
EXC
(
2
b
,
3
b
,
%
2
,
%
0
)
" lda %1,3b-1b(%0)
\n
"
" .long 2b - .
\n
"
" lda %2,3b-2b(%0)
\n
"
".previous"
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
)
:
"r"
(
va
),
"0"
(
0
));
:
"r"
(
va
),
"0"
(
0
));
if
(
error
)
if
(
error
)
...
@@ -944,16 +894,10 @@ do_entUnaUser(void __user * va, unsigned long opcode,
...
@@ -944,16 +894,10 @@ do_entUnaUser(void __user * va, unsigned long opcode,
"3: stq_u %2,1(%5)
\n
"
"3: stq_u %2,1(%5)
\n
"
"4: stq_u %1,0(%5)
\n
"
"4: stq_u %1,0(%5)
\n
"
"5:
\n
"
"5:
\n
"
".section __ex_table,
\"
a
\"\n
"
EXC
(
1
b
,
5
b
,
%
2
,
%
0
)
" .long 1b - .
\n
"
EXC
(
2
b
,
5
b
,
%
1
,
%
0
)
" lda %2,5b-1b(%0)
\n
"
EXC
(
3
b
,
5
b
,
$
31
,
%
0
)
" .long 2b - .
\n
"
EXC
(
4
b
,
5
b
,
$
31
,
%
0
)
" lda %1,5b-2b(%0)
\n
"
" .long 3b - .
\n
"
" lda $31,5b-3b(%0)
\n
"
" .long 4b - .
\n
"
" lda $31,5b-4b(%0)
\n
"
".previous"
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
),
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
),
"=&r"
(
tmp3
),
"=&r"
(
tmp4
)
"=&r"
(
tmp3
),
"=&r"
(
tmp4
)
:
"r"
(
va
),
"r"
(
*
reg_addr
),
"0"
(
0
));
:
"r"
(
va
),
"r"
(
*
reg_addr
),
"0"
(
0
));
...
@@ -978,16 +922,10 @@ do_entUnaUser(void __user * va, unsigned long opcode,
...
@@ -978,16 +922,10 @@ do_entUnaUser(void __user * va, unsigned long opcode,
"3: stq_u %2,3(%5)
\n
"
"3: stq_u %2,3(%5)
\n
"
"4: stq_u %1,0(%5)
\n
"
"4: stq_u %1,0(%5)
\n
"
"5:
\n
"
"5:
\n
"
".section __ex_table,
\"
a
\"\n
"
EXC
(
1
b
,
5
b
,
%
2
,
%
0
)
" .long 1b - .
\n
"
EXC
(
2
b
,
5
b
,
%
1
,
%
0
)
" lda %2,5b-1b(%0)
\n
"
EXC
(
3
b
,
5
b
,
$
31
,
%
0
)
" .long 2b - .
\n
"
EXC
(
4
b
,
5
b
,
$
31
,
%
0
)
" lda %1,5b-2b(%0)
\n
"
" .long 3b - .
\n
"
" lda $31,5b-3b(%0)
\n
"
" .long 4b - .
\n
"
" lda $31,5b-4b(%0)
\n
"
".previous"
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
),
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
),
"=&r"
(
tmp3
),
"=&r"
(
tmp4
)
"=&r"
(
tmp3
),
"=&r"
(
tmp4
)
:
"r"
(
va
),
"r"
(
*
reg_addr
),
"0"
(
0
));
:
"r"
(
va
),
"r"
(
*
reg_addr
),
"0"
(
0
));
...
@@ -1012,16 +950,10 @@ do_entUnaUser(void __user * va, unsigned long opcode,
...
@@ -1012,16 +950,10 @@ do_entUnaUser(void __user * va, unsigned long opcode,
"3: stq_u %2,7(%5)
\n
"
"3: stq_u %2,7(%5)
\n
"
"4: stq_u %1,0(%5)
\n
"
"4: stq_u %1,0(%5)
\n
"
"5:
\n
"
"5:
\n
"
".section __ex_table,
\"
a
\"\n\t
"
EXC
(
1
b
,
5
b
,
%
2
,
%
0
)
" .long 1b - .
\n
"
EXC
(
2
b
,
5
b
,
%
1
,
%
0
)
" lda %2,5b-1b(%0)
\n
"
EXC
(
3
b
,
5
b
,
$
31
,
%
0
)
" .long 2b - .
\n
"
EXC
(
4
b
,
5
b
,
$
31
,
%
0
)
" lda %1,5b-2b(%0)
\n
"
" .long 3b - .
\n
"
" lda $31,5b-3b(%0)
\n
"
" .long 4b - .
\n
"
" lda $31,5b-4b(%0)
\n
"
".previous"
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
),
:
"=r"
(
error
),
"=&r"
(
tmp1
),
"=&r"
(
tmp2
),
"=&r"
(
tmp3
),
"=&r"
(
tmp4
)
"=&r"
(
tmp3
),
"=&r"
(
tmp4
)
:
"r"
(
va
),
"r"
(
*
reg_addr
),
"0"
(
0
));
:
"r"
(
va
),
"r"
(
*
reg_addr
),
"0"
(
0
));
...
...
arch/alpha/lib/csum_partial_copy.c
View file @
ca282f69
...
@@ -45,10 +45,7 @@ __asm__ __volatile__("insqh %1,%2,%0":"=r" (z):"r" (x),"r" (y))
...
@@ -45,10 +45,7 @@ __asm__ __volatile__("insqh %1,%2,%0":"=r" (z):"r" (x),"r" (y))
__asm__ __volatile__( \
__asm__ __volatile__( \
"1: ldq_u %0,%2\n" \
"1: ldq_u %0,%2\n" \
"2:\n" \
"2:\n" \
".section __ex_table,\"a\"\n" \
EXC(1b,2b,%0,%1) \
" .long 1b - .\n" \
" lda %0,2b-1b(%1)\n" \
".previous" \
: "=r"(x), "=r"(__guu_err) \
: "=r"(x), "=r"(__guu_err) \
: "m"(__m(ptr)), "1"(0)); \
: "m"(__m(ptr)), "1"(0)); \
__guu_err; \
__guu_err; \
...
@@ -60,10 +57,7 @@ __asm__ __volatile__("insqh %1,%2,%0":"=r" (z):"r" (x),"r" (y))
...
@@ -60,10 +57,7 @@ __asm__ __volatile__("insqh %1,%2,%0":"=r" (z):"r" (x),"r" (y))
__asm__ __volatile__( \
__asm__ __volatile__( \
"1: stq_u %2,%1\n" \
"1: stq_u %2,%1\n" \
"2:\n" \
"2:\n" \
".section __ex_table,\"a\"\n" \
EXC(1b,2b,$31,%0) \
" .long 1b - ." \
" lda $31,2b-1b(%0)\n" \
".previous" \
: "=r"(__puu_err) \
: "=r"(__puu_err) \
: "m"(__m(addr)), "rJ"(x), "0"(0)); \
: "m"(__m(addr)), "rJ"(x), "0"(0)); \
__puu_err; \
__puu_err; \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment