From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:33177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1golms-00086o-DX for qemu-devel@nongnu.org; Wed, 30 Jan 2019 04:04:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1golml-0000BA-Pq for qemu-devel@nongnu.org; Wed, 30 Jan 2019 04:04:02 -0500 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:43637) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1golml-0000AU-Hz for qemu-devel@nongnu.org; Wed, 30 Jan 2019 04:03:55 -0500 Received: by mail-pf1-x444.google.com with SMTP id w73so11109901pfk.10 for ; Wed, 30 Jan 2019 01:03:55 -0800 (PST) From: Catherine Ho Date: Wed, 30 Jan 2019 03:59:54 -0500 Message-Id: <1548838794-23757-1-git-send-email-catherine.hecx@gmail.com> Subject: [Qemu-devel] [PATCH] tcg: add early clober modifier in atomic16_cmpxchg on aarch64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , "Emilio G. Cota" Cc: qemu-devel@nongnu.org, Catherine Ho Without this patch, gcc might up the Input/Output registers and cause unpredictable error. Fixes: 1ec182c33379 ("target/arm: Convert to HAVE_CMPXCHG128") Signed-off-by: Catherine Ho --- include/qemu/atomic128.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/atomic128.h b/include/qemu/atomic128.h index a6af22ff10..ddd0d55d31 100644 --- a/include/qemu/atomic128.h +++ b/include/qemu/atomic128.h @@ -68,7 +68,7 @@ static inline Int128 atomic16_cmpxchg(Int128 *ptr, Int128 cmp, Int128 new) "cbnz %w[tmp], 0b\n" "1:" : [mem] "+m"(*ptr), [tmp] "=&r"(tmp), - [oldl] "=&r"(oldl), [oldh] "=r"(oldh) + [oldl] "=&r"(oldl), [oldh] "=&r"(oldh) : [cmpl] "r"(cmpl), [cmph] "r"(cmph), [newl] "r"(newl), [newh] "r"(newh) : "memory", "cc"); -- 2.17.1