Skip to content

Commit 29d44cc

Browse files
seehearfeelborkmann
authored andcommitted
selftests/bpf: Use asm constraint "m" for LoongArch
Currently, LoongArch LLVM does not support the constraint "o" and no plan to support it, it only supports the similar constraint "m", so change the constraints from "nor" in the "else" case to arch-specific "nmr" to avoid the build error such as "unexpected asm memory constraint" for LoongArch. Fixes: 630301b ("selftests/bpf: Add basic USDT selftests") Suggested-by: Weining Lu <[email protected]> Suggested-by: Li Chen <[email protected]> Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Reviewed-by: Huacai Chen <[email protected]> Cc: [email protected] Link: https://llvm.org/docs/LangRef.html#supported-constraint-code-list Link: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp#L172 Link: https://lore.kernel.org/bpf/[email protected]
1 parent 2357901 commit 29d44cc

File tree

1 file changed

+2
-0
lines changed
  • tools/testing/selftests/bpf

1 file changed

+2
-0
lines changed

tools/testing/selftests/bpf/sdt.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@
102102
# define STAP_SDT_ARG_CONSTRAINT nZr
103103
# elif defined __arm__
104104
# define STAP_SDT_ARG_CONSTRAINT g
105+
# elif defined __loongarch__
106+
# define STAP_SDT_ARG_CONSTRAINT nmr
105107
# else
106108
# define STAP_SDT_ARG_CONSTRAINT nor
107109
# endif

0 commit comments

Comments
 (0)