Skip to content

Commit 09abbcf

Browse files
Maciej W. Rozyckiralfbaechle
authored andcommitted
[MIPS] cpu-bugs64.c: GCC 3.3 constraint workaround
Add a workaround to address warnings generated on the "n" constraint by GCC 3.3 and below. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 6883599 commit 09abbcf

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎arch/mips/kernel/cpu-bugs64.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2003, 2004 Maciej W. Rozycki
2+
* Copyright (C) 2003, 2004, 2007 Maciej W. Rozycki
33
*
44
* This program is free software; you can redistribute it and/or
55
* modify it under the terms of the GNU General Public License
@@ -29,7 +29,7 @@ static inline void align_mod(const int align, const int mod)
2929
".endr\n\t"
3030
".set pop"
3131
:
32-
: "rn" (align), "rn" (mod));
32+
: GCC_IMM_ASM (align), GCC_IMM_ASM (mod));
3333
}
3434

3535
static inline void mult_sh_align_mod(long *v1, long *v2, long *w,

‎include/asm-mips/compiler.h‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2004 Maciej W. Rozycki
2+
* Copyright (C) 2004, 2007 Maciej W. Rozycki
33
*
44
* This file is subject to the terms and conditions of the GNU General Public
55
* License. See the file "COPYING" in the main directory of this archive
@@ -9,8 +9,10 @@
99
#define _ASM_COMPILER_H
1010

1111
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
12+
#define GCC_IMM_ASM "n"
1213
#define GCC_REG_ACCUM "$0"
1314
#else
15+
#define GCC_IMM_ASM "rn"
1416
#define GCC_REG_ACCUM "accum"
1517
#endif
1618

0 commit comments

Comments
 (0)