[CRIU] [PATCH 1/7] criu/arch/arm/bitops.S: fix clang compile

Kir Kolyshkin kir at openvz.org
Wed Mar 15 16:17:18 PDT 2017


clang-3.8 complains:

> criu/arch/arm/bitops.S:5:2: error: invalid instruction
>  strneb r1, [ip] @ assert word-aligned
>  ^

Apparently (see [1]) this is some old asm syntax, which, I guess,
was deliberately dropped from clang.

[1] https://sourceware.org/ml/libc-ports/2013-03/msg00095.html

Cc: Kirill Tkhai <ktkhai at virtuozzo.com>
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 criu/arch/arm/bitops.S | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/criu/arch/arm/bitops.S b/criu/arch/arm/bitops.S
index db8360f..5193911 100644
--- a/criu/arch/arm/bitops.S
+++ b/criu/arch/arm/bitops.S
@@ -1,8 +1,10 @@
 #include "common/asm/linkage.h"
 
+.syntax unified
+
 ENTRY(test_and_set_bit)
 	ands    ip, r1, #3
-	strneb  r1, [ip]                @ assert word-aligned
+	strbne  r1, [ip]                @ assert word-aligned
 	mov     r2, #1
 	and     r3, r0, #31             @ Get bit offset
 	mov     r0, r0, lsr #5
-- 
2.9.3



More information about the CRIU mailing list