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
nexedi
linux
Commits
f58a69aa
Commit
f58a69aa
authored
Mar 09, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove <asm-i386/xor.h>'s own home-made FPU begin/end macros,
use the real ones instead.
parent
8da730e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
43 deletions
+16
-43
include/asm-i386/xor.h
include/asm-i386/xor.h
+16
-43
No files found.
include/asm-i386/xor.h
View file @
f58a69aa
...
...
@@ -18,22 +18,6 @@
* Copyright (C) 1998 Ingo Molnar.
*/
#define FPU_SAVE \
do { \
preempt_disable(); \
if (!test_thread_flag(TIF_USEDFPU)) \
__asm__ __volatile__ (" clts;\n"); \
__asm__ __volatile__ ("fsave %0; fwait": "=m"(fpu_save[0])); \
} while (0)
#define FPU_RESTORE \
do { \
__asm__ __volatile__ ("frstor %0": : "m"(fpu_save[0])); \
if (!test_thread_flag(TIF_USEDFPU)) \
stts(); \
preempt_enable(); \
} while (0)
#define LD(x,y) " movq 8*("#x")(%1), %%mm"#y" ;\n"
#define ST(x,y) " movq %%mm"#y", 8*("#x")(%1) ;\n"
#define XO1(x,y) " pxor 8*("#x")(%2), %%mm"#y" ;\n"
...
...
@@ -46,9 +30,8 @@ static void
xor_pII_mmx_2
(
unsigned
long
bytes
,
unsigned
long
*
p1
,
unsigned
long
*
p2
)
{
unsigned
long
lines
=
bytes
>>
7
;
char
fpu_save
[
108
];
FPU_SAVE
;
kernel_fpu_begin
()
;
__asm__
__volatile__
(
#undef BLOCK
...
...
@@ -83,7 +66,7 @@ xor_pII_mmx_2(unsigned long bytes, unsigned long *p1, unsigned long *p2)
:
:
"memory"
);
FPU_RESTORE
;
kernel_fpu_end
()
;
}
static
void
...
...
@@ -91,9 +74,8 @@ xor_pII_mmx_3(unsigned long bytes, unsigned long *p1, unsigned long *p2,
unsigned
long
*
p3
)
{
unsigned
long
lines
=
bytes
>>
7
;
char
fpu_save
[
108
];
FPU_SAVE
;
kernel_fpu_begin
()
;
__asm__
__volatile__
(
#undef BLOCK
...
...
@@ -133,7 +115,7 @@ xor_pII_mmx_3(unsigned long bytes, unsigned long *p1, unsigned long *p2,
:
:
"memory"
);
FPU_RESTORE
;
kernel_fpu_end
()
;
}
static
void
...
...
@@ -141,9 +123,8 @@ xor_pII_mmx_4(unsigned long bytes, unsigned long *p1, unsigned long *p2,
unsigned
long
*
p3
,
unsigned
long
*
p4
)
{
unsigned
long
lines
=
bytes
>>
7
;
char
fpu_save
[
108
];
FPU_SAVE
;
kernel_fpu_begin
()
;
__asm__
__volatile__
(
#undef BLOCK
...
...
@@ -188,7 +169,7 @@ xor_pII_mmx_4(unsigned long bytes, unsigned long *p1, unsigned long *p2,
:
:
"memory"
);
FPU_RESTORE
;
kernel_fpu_end
()
;
}
...
...
@@ -197,9 +178,8 @@ xor_pII_mmx_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
unsigned
long
*
p3
,
unsigned
long
*
p4
,
unsigned
long
*
p5
)
{
unsigned
long
lines
=
bytes
>>
7
;
char
fpu_save
[
108
];
FPU_SAVE
;
kernel_fpu_begin
()
;
/* need to save/restore p4/p5 manually otherwise gcc's 10 argument
limit gets exceeded (+ counts as two arguments) */
...
...
@@ -255,7 +235,7 @@ xor_pII_mmx_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
:
"r"
(
p4
),
"r"
(
p5
)
:
"memory"
);
FPU_RESTORE
;
kernel_fpu_end
()
;
}
#undef LD
...
...
@@ -270,9 +250,8 @@ static void
xor_p5_mmx_2
(
unsigned
long
bytes
,
unsigned
long
*
p1
,
unsigned
long
*
p2
)
{
unsigned
long
lines
=
bytes
>>
6
;
char
fpu_save
[
108
];
FPU_SAVE
;
kernel_fpu_begin
()
;
__asm__
__volatile__
(
" .align 32 ;
\n
"
...
...
@@ -311,7 +290,7 @@ xor_p5_mmx_2(unsigned long bytes, unsigned long *p1, unsigned long *p2)
:
:
"memory"
);
FPU_RESTORE
;
kernel_fpu_end
()
;
}
static
void
...
...
@@ -319,9 +298,8 @@ xor_p5_mmx_3(unsigned long bytes, unsigned long *p1, unsigned long *p2,
unsigned
long
*
p3
)
{
unsigned
long
lines
=
bytes
>>
6
;
char
fpu_save
[
108
];
FPU_SAVE
;
kernel_fpu_begin
()
;
__asm__
__volatile__
(
" .align 32,0x90 ;
\n
"
...
...
@@ -369,7 +347,7 @@ xor_p5_mmx_3(unsigned long bytes, unsigned long *p1, unsigned long *p2,
:
:
"memory"
);
FPU_RESTORE
;
kernel_fpu_end
()
;
}
static
void
...
...
@@ -377,9 +355,8 @@ xor_p5_mmx_4(unsigned long bytes, unsigned long *p1, unsigned long *p2,
unsigned
long
*
p3
,
unsigned
long
*
p4
)
{
unsigned
long
lines
=
bytes
>>
6
;
char
fpu_save
[
108
];
FPU_SAVE
;
kernel_fpu_begin
()
;
__asm__
__volatile__
(
" .align 32,0x90 ;
\n
"
...
...
@@ -436,7 +413,7 @@ xor_p5_mmx_4(unsigned long bytes, unsigned long *p1, unsigned long *p2,
:
:
"memory"
);
FPU_RESTORE
;
kernel_fpu_end
()
;
}
static
void
...
...
@@ -444,9 +421,8 @@ xor_p5_mmx_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
unsigned
long
*
p3
,
unsigned
long
*
p4
,
unsigned
long
*
p5
)
{
unsigned
long
lines
=
bytes
>>
6
;
char
fpu_save
[
108
];
FPU_SAVE
;
kernel_fpu_begin
()
;
/* need to save p4/p5 manually to not exceed gcc's 10 argument limit */
__asm__
__volatile__
(
...
...
@@ -517,7 +493,7 @@ xor_p5_mmx_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
:
"r"
(
p4
),
"r"
(
p5
)
:
"memory"
);
FPU_RESTORE
;
kernel_fpu_end
()
;
}
static
struct
xor_block_template
xor_block_pII_mmx
=
{
...
...
@@ -536,9 +512,6 @@ static struct xor_block_template xor_block_p5_mmx = {
.
do_5
=
xor_p5_mmx_5
,
};
#undef FPU_SAVE
#undef FPU_RESTORE
/*
* Cache avoiding checksumming functions utilizing KNI instructions
* Copyright (C) 1999 Zach Brown (with obvious credit due Ingo)
...
...
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