linux-mips
[Top] [All Lists]

[PATCH 5/5] MIPS: LLVMLinux: Silence unicode warnings when preprocessing

To: unlisted-recipients:; (no To-header on input)
Subject: [PATCH 5/5] MIPS: LLVMLinux: Silence unicode warnings when preprocessing assembly.
From: Daniel Sanders <daniel.sanders@imgtec.com>
Date: Tue, 3 Feb 2015 13:37:19 +0000
Cc: Toma Tabacu <toma.tabacu@imgtec.com>, Daniel Sanders <daniel.sanders@imgtec.com>, Ralf Baechle <ralf@linux-mips.org>, Paul Burton <paul.burton@imgtec.com>, Paul Bolle <pebolle@tiscali.nl>, "Steven J. Hill" <Steven.Hill@imgtec.com>, Manuel Lauss <manuel.lauss@gmail.com>, Jim Quinlan <jim2101024@gmail.com>, <linux-mips@linux-mips.org>, <linux-kernel@vger.kernel.org>
In-reply-to: <1422970639-7922-1-git-send-email-daniel.sanders@imgtec.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1422970639-7922-1-git-send-email-daniel.sanders@imgtec.com>
Sender: linux-mips-bounce@linux-mips.org
From: Toma Tabacu <toma.tabacu@imgtec.com>

Differentiate the 'u' GAS .macro argument from the '\u' C preprocessor unicode
escape sequence by renaming it to '_u'.

When the 'u' argument is evaluated, we end up writing '\u', which causes
clang to emit -Wunicode warnings.

This silences a couple of -Wunicode warnings reported by clang.
The changed code can be preprocessed without warnings by both gcc and clang.

Signed-off-by: Toma Tabacu <toma.tabacu@imgtec.com>
Signed-off-by: Daniel Sanders <daniel.sanders@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Paul Bolle <pebolle@tiscali.nl>
Cc: "Steven J. Hill" <Steven.Hill@imgtec.com>
Cc: Manuel Lauss <manuel.lauss@gmail.com>
Cc: Jim Quinlan <jim2101024@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
---
 arch/mips/include/asm/asmmacro.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/mips/include/asm/asmmacro.h b/arch/mips/include/asm/asmmacro.h
index 6caf876..c657932 100644
--- a/arch/mips/include/asm/asmmacro.h
+++ b/arch/mips/include/asm/asmmacro.h
@@ -200,12 +200,12 @@
        .word   0x41600021 | (\reg << 16)
        .endm
 
-       .macro  MFTR    rt=0, rd=0, u=0, sel=0
-        .word  0x41000000 | (\rt << 16) | (\rd << 11) | (\u << 5) | (\sel)
+       .macro  MFTR    rt=0, rd=0, _u=0, sel=0
+        .word  0x41000000 | (\rt << 16) | (\rd << 11) | (\_u << 5) | (\sel)
        .endm
 
-       .macro  MTTR    rt=0, rd=0, u=0, sel=0
-        .word  0x41800000 | (\rt << 16) | (\rd << 11) | (\u << 5) | (\sel)
+       .macro  MTTR    rt=0, rd=0, _u=0, sel=0
+        .word  0x41800000 | (\rt << 16) | (\rd << 11) | (\_u << 5) | (\sel)
        .endm
 
 #ifdef TOOLCHAIN_SUPPORTS_MSA
-- 
2.1.4


<Prev in Thread] Current Thread [Next in Thread>