Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108027753
D27886.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
701 B
Referenced Files
None
Subscribers
None
D27886.diff
View Options
diff --git a/sys/arm64/include/atomic.h b/sys/arm64/include/atomic.h
--- a/sys/arm64/include/atomic.h
+++ b/sys/arm64/include/atomic.h
@@ -409,7 +409,7 @@
uint##t##_t mask, old, tmp; \
int res; \
\
- mask = 1u << (val & 0x1f); \
+ mask = ((uint##t##_t)1) << (val & (t - 1)); \
__asm __volatile( \
"1: ldxr %"#w"2, [%3]\n" \
" "#llsc_asm_op" %"#w"0, %"#w"2, %"#w"4\n" \
@@ -427,7 +427,7 @@
{ \
uint##t##_t mask, old; \
\
- mask = 1u << (val & 0x1f); \
+ mask = ((uint##t##_t)1) << (val & (t - 1)); \
__asm __volatile( \
".arch_extension lse\n" \
"ld"#lse_asm_op" %"#w"2, %"#w"0, [%1]\n" \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 21, 4:50 PM (19 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16016809
Default Alt Text
D27886.diff (701 B)
Attached To
Mode
D27886: arm64: fix mask in atomic_testand{set,clear}_64
Attached
Detach File
Event Timeline
Log In to Comment