bcachefs: rewrote prefetch asm in gas syntax for clang compatibility
Signed-off-by: Brett Holman <bpholman5@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
1ce0cf5fe9
commit
2eba51a69a
1 changed files with 5 additions and 7 deletions
|
@ -1181,13 +1181,11 @@ static struct bkey_packed *bset_search_write_set(const struct btree *b,
|
||||||
|
|
||||||
static inline void prefetch_four_cachelines(void *p)
|
static inline void prefetch_four_cachelines(void *p)
|
||||||
{
|
{
|
||||||
#if (CONFIG_X86_64 && !defined(__clang__))
|
#if CONFIG_X86_64
|
||||||
asm(".intel_syntax noprefix;"
|
asm("prefetcht0 (-127 + 64 * 0)(%0);"
|
||||||
"prefetcht0 [%0 - 127 + 64 * 0];"
|
"prefetcht0 (-127 + 64 * 1)(%0);"
|
||||||
"prefetcht0 [%0 - 127 + 64 * 1];"
|
"prefetcht0 (-127 + 64 * 2)(%0);"
|
||||||
"prefetcht0 [%0 - 127 + 64 * 2];"
|
"prefetcht0 (-127 + 64 * 3)(%0);"
|
||||||
"prefetcht0 [%0 - 127 + 64 * 3];"
|
|
||||||
".att_syntax prefix;"
|
|
||||||
:
|
:
|
||||||
: "r" (p + 127));
|
: "r" (p + 127));
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Reference in a new issue