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
54ea06f6
Commit
54ea06f6
authored
Jul 16, 2005
by
Russell King
Committed by
Russell King
Jul 16, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] ARM: Convert bitops to use ARMv6 ldrex/strex instructions
Signed-off-by:
Russell King
<
rmk+kernel@arm.linux.org.uk
>
parent
9fb1759a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
arch/arm/lib/bitops.h
arch/arm/lib/bitops.h
+31
-0
No files found.
arch/arm/lib/bitops.h
View file @
54ea06f6
#if __LINUX_ARM_ARCH__ >= 6
.
macro
bitop
,
instr
mov
r2
,
#
1
and
r3
,
r0
,
#
7
@
Get
bit
offset
add
r1
,
r1
,
r0
,
lsr
#
3
@
Get
byte
offset
mov
r3
,
r2
,
lsl
r3
1
:
ldrexb
r2
,
[
r1
]
\
instr
r2
,
r2
,
r3
strexb
r0
,
r2
,
[
r1
]
cmpne
r0
,
#
0
bne
1
b
mov
pc
,
lr
.
endm
.
macro
testop
,
instr
,
store
and
r3
,
r0
,
#
7
@
Get
bit
offset
mov
r2
,
#
1
add
r1
,
r1
,
r0
,
lsr
#
3
@
Get
byte
offset
mov
r3
,
r2
,
lsl
r3
@
create
mask
1
:
ldrexb
r2
,
[
r1
]
ands
r0
,
r2
,
r3
@
save
old
value
of
bit
\
instr
ip
,
r2
,
r3
@
toggle
bit
strexb
r2
,
ip
,
[
r1
]
cmp
r2
,
#
0
bne
1
b
cmp
r0
,
#
0
movne
r0
,
#
1
2
:
mov
pc
,
lr
.
endm
#else
.
macro
bitop
,
instr
.
macro
bitop
,
instr
and
r2
,
r0
,
#
7
and
r2
,
r0
,
#
7
mov
r3
,
#
1
mov
r3
,
#
1
...
@@ -31,3 +61,4 @@
...
@@ -31,3 +61,4 @@
moveq
r0
,
#
0
moveq
r0
,
#
0
mov
pc
,
lr
mov
pc
,
lr
.
endm
.
endm
#endif
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