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

From: Daniel Sanders
Date: Tue Feb 03 2015 - 08:38:17 EST


From: Toma Tabacu <toma.tabacu@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: Daniel Sanders <daniel.sanders@xxxxxxxxxx>
Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
Cc: Paul Burton <paul.burton@xxxxxxxxxx>
Cc: Paul Bolle <pebolle@xxxxxxxxxx>
Cc: "Steven J. Hill" <Steven.Hill@xxxxxxxxxx>
Cc: Manuel Lauss <manuel.lauss@xxxxxxxxx>
Cc: Jim Quinlan <jim2101024@xxxxxxxxx>
Cc: linux-mips@xxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/