Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ebd52051
Commit
ebd52051
authored
Oct 12, 2021
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-26467 fixup for clang-9 and earlier
Before clang-10, asm goto was not supported, so we must use fetch_or().
parent
d8b8258a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
storage/innobase/include/fil0fil.h
storage/innobase/include/fil0fil.h
+4
-1
storage/innobase/sync/srw_lock.cc
storage/innobase/sync/srw_lock.cc
+4
-1
No files found.
storage/innobase/include/fil0fil.h
View file @
ebd52051
...
...
@@ -1539,7 +1539,10 @@ inline void fil_space_t::reacquire()
inline
bool
fil_space_t
::
set_stopping_check
()
{
mysql_mutex_assert_owner
(
&
fil_system
.
mutex
);
#if defined __GNUC__ && (defined __i386__ || defined __x86_64__)
#if defined __clang_major__ && __clang_major__ < 10
/* Only clang-10 introduced support for asm goto */
return
n_pending
.
fetch_or
(
STOPPING
,
std
::
memory_order_relaxed
)
&
STOPPING
;
#elif defined __GNUC__ && (defined __i386__ || defined __x86_64__)
static_assert
(
STOPPING
==
1U
<<
31
,
"compatibility"
);
__asm__
goto
(
"lock btsl $31, %0
\t\n
jnc %l1"
:
:
"m"
(
n_pending
)
:
"cc"
,
"memory"
:
not_stopped
);
...
...
storage/innobase/sync/srw_lock.cc
View file @
ebd52051
...
...
@@ -308,7 +308,10 @@ Hence, we will manually translate fetch_or() using GCC-style inline
assembler code or a Microsoft intrinsic function.
*/
#if defined __GNUC__ && (defined __i386__ || defined __x86_64__)
#if defined __clang_major__ && __clang_major__ < 10
/* Only clang-10 introduced support for asm goto */
#elif defined __GNUC__ && (defined __i386__ || defined __x86_64__)
# define IF_FETCH_OR_GOTO(mem, bit, label) \
__asm__ goto("lock btsl $" #bit ", %0\n\t" \
"jc %l1" : : "m" (mem) : "cc", "memory" : label);
...
...
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