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
756cca61
Commit
756cca61
authored
Mar 25, 2011
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MIPS: Microoptimize arch_{read,write}_lock
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
4bafad92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
arch/mips/include/asm/spinlock.h
arch/mips/include/asm/spinlock.h
+11
-11
No files found.
arch/mips/include/asm/spinlock.h
View file @
756cca61
...
@@ -245,16 +245,16 @@ static inline void arch_read_lock(arch_rwlock_t *rw)
...
@@ -245,16 +245,16 @@ static inline void arch_read_lock(arch_rwlock_t *rw)
__asm__
__volatile__
(
__asm__
__volatile__
(
" .set noreorder # arch_read_lock
\n
"
" .set noreorder # arch_read_lock
\n
"
"1: ll %1, %2
\n
"
"1: ll %1, %2
\n
"
" bltz %1,
2
f
\n
"
" bltz %1,
3
f
\n
"
" addu %1, 1
\n
"
" addu %1, 1
\n
"
" sc %1, %0
\n
"
"
2:
sc %1, %0
\n
"
" beqz %1, 1b
\n
"
" beqz %1, 1b
\n
"
" nop
\n
"
" nop
\n
"
" .subsection 2
\n
"
" .subsection 2
\n
"
"
2
: ll %1, %2
\n
"
"
3
: ll %1, %2
\n
"
" bltz %1,
2
b
\n
"
" bltz %1,
3
b
\n
"
" addu %1, 1
\n
"
" addu %1, 1
\n
"
" b
1
b
\n
"
" b
2
b
\n
"
" nop
\n
"
" nop
\n
"
" .previous
\n
"
" .previous
\n
"
" .set reorder
\n
"
" .set reorder
\n
"
...
@@ -324,16 +324,16 @@ static inline void arch_write_lock(arch_rwlock_t *rw)
...
@@ -324,16 +324,16 @@ static inline void arch_write_lock(arch_rwlock_t *rw)
__asm__
__volatile__
(
__asm__
__volatile__
(
" .set noreorder # arch_write_lock
\n
"
" .set noreorder # arch_write_lock
\n
"
"1: ll %1, %2
\n
"
"1: ll %1, %2
\n
"
" bnez %1,
2
f
\n
"
" bnez %1,
3
f
\n
"
" lui %1, 0x8000
\n
"
" lui %1, 0x8000
\n
"
" sc %1, %0
\n
"
"
2:
sc %1, %0
\n
"
" beqz %1,
2
f
\n
"
" beqz %1,
3
f
\n
"
" nop
\n
"
" nop
\n
"
" .subsection 2
\n
"
" .subsection 2
\n
"
"
2
: ll %1, %2
\n
"
"
3
: ll %1, %2
\n
"
" bnez %1,
2
b
\n
"
" bnez %1,
3
b
\n
"
" lui %1, 0x8000
\n
"
" lui %1, 0x8000
\n
"
" b
1
b
\n
"
" b
2
b
\n
"
" nop
\n
"
" nop
\n
"
" .previous
\n
"
" .previous
\n
"
" .set reorder
\n
"
" .set reorder
\n
"
...
...
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