diff options
author | Brett Holman <bpholman5@gmail.com> | 2021-05-21 16:45:38 -0600 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2021-05-22 17:06:31 -0400 |
commit | 11f7e8b5b973a68bb44068744b18276530688e86 (patch) | |
tree | 13c34c1f264c51e41b08b1f55ea69f6d5fcbb6f1 | |
parent | 30a0d955991a42916072a33a9b6ae25a3c8555a9 (diff) |
bcachefs: rewrote prefetch asm in gas syntax for clang compatibility
-rw-r--r-- | fs/bcachefs/bset.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/bcachefs/bset.c b/fs/bcachefs/bset.c index 26203a5da504..8a149e21d0b4 100644 --- a/fs/bcachefs/bset.c +++ b/fs/bcachefs/bset.c @@ -1193,13 +1193,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 |