Commit 2eba51a6 authored by Brett Holman's avatar Brett Holman Committed by Kent Overstreet

bcachefs: rewrote prefetch asm in gas syntax for clang compatibility

Signed-off-by: default avatarBrett Holman <bpholman5@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 1ce0cf5f
......@@ -1181,13 +1181,11 @@ static struct bkey_packed *bset_search_write_set(const struct btree *b,
static inline void prefetch_four_cachelines(void *p)
{
#if (CONFIG_X86_64 && !defined(__clang__))
asm(".intel_syntax noprefix;"
"prefetcht0 [%0 - 127 + 64 * 0];"
"prefetcht0 [%0 - 127 + 64 * 1];"
"prefetcht0 [%0 - 127 + 64 * 2];"
"prefetcht0 [%0 - 127 + 64 * 3];"
".att_syntax prefix;"
#if CONFIG_X86_64
asm("prefetcht0 (-127 + 64 * 0)(%0);"
"prefetcht0 (-127 + 64 * 1)(%0);"
"prefetcht0 (-127 + 64 * 2)(%0);"
"prefetcht0 (-127 + 64 * 3)(%0);"
:
: "r" (p + 127));
#else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment