vppinfra: fix clang-10 build error with asm inline
clang start to support parse asm inline from clang-11,
Use asm volatile instead.
Type: fix
Fixes: d5045e68a782 ("vppinfra: introduce clib_perfmom")
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I00e5e19856caaed94e22f8fa6cf4f918483976a4
diff --git a/src/vppinfra/perfmon/perfmon.c b/src/vppinfra/perfmon/perfmon.c
index 9ec90b8..f44f225 100644
--- a/src/vppinfra/perfmon/perfmon.c
+++ b/src/vppinfra/perfmon/perfmon.c
@@ -179,7 +179,7 @@
clib_perfmon_warmup (clib_perfmon_ctx_t *ctx)
{
for (u64 i = 0; i < (u64) ctx->ref_clock; i++)
- asm inline("" : : "r"(i * i) : "memory");
+ asm volatile("" : : "r"(i * i) : "memory");
}
__clib_export u8 *