hexagon: parenthesize registers in asm predicates
Subsystems (5)
[email protected]
maintainerPATCH 9/17 hexagon: parenthesize registers in asm predicates
From: Nick Desaulniers <[email protected]>
Subject: hexagon: parenthesize registers in asm predicates
Hexagon requires that register predicates in assembly be parenthesized.
Signed-off-by Nick Desaulniers <[email protected]>
Suggested-by Sid Manning <[email protected]>
Acked-by Brian Cain <[email protected]>
Cc Lee Jones <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Tuowen Zhao <[email protected]>
Cc Mika Westerberg <[email protected]>
Cc Luis Chamberlain <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Alexios Zavras <[email protected]>
Cc Allison Randal <[email protected]>
Cc Will Deacon <[email protected]>
Cc Richard Fontana <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Boqun Feng <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
arch/hexagon/include/asm/atomic.h | 8 ++++---- arch/hexagon/include/asm/bitops.h | 8 ++++---- arch/hexagon/include/asm/cmpxchg.h | 2 +- arch/hexagon/include/asm/futex.h | 6 +++--- arch/hexagon/include/asm/spinlock.h | 20 ++++++++++---------- arch/hexagon/kernel/vm_entry.S | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-)
arch/hexagon/include/asm/atomic.h renamed from arch/hexagon/include/asm/atomic.h~hexagon-parenthesize-registers-in-asm-predicates +4 -4
@@ -91,7 +91,7 @@ static inline void atomic_##op(int i, at"1: %0 = memw_locked(%1);\n" \ " %0 = "#op "(%0,%2);\n" \ " memw_locked(%1,P3)=%0;\n" \ - " if !P3 jump 1b;\n" \ + " if (!P3) jump 1b;\n" \ : "=&r" (output) \ : "r" (&v->counter), "r" (i) \ : "memory", "p3" \
@@ -107,7 +107,7 @@ static inline int atomic_##op##_return(i"1: %0 = memw_locked(%1);\n" \ " %0 = "#op "(%0,%2);\n" \ " memw_locked(%1,P3)=%0;\n" \ - " if !P3 jump 1b;\n" \ + " if (!P3) jump 1b;\n" \ : "=&r" (output) \ : "r" (&v->counter), "r" (i) \ : "memory", "p3" \
@@ -124,7 +124,7 @@ static inline int atomic_fetch_##op(int"1: %0 = memw_locked(%2);\n" \ " %1 = "#op "(%0,%3);\n" \ " memw_locked(%2,P3)=%1;\n" \ - " if !P3 jump 1b;\n" \ + " if (!P3) jump 1b;\n" \ : "=&r" (output), "=&r" (val) \ : "r" (&v->counter), "r" (i) \ : "memory", "p3" \
@@ -173,7 +173,7 @@ static inline int atomic_fetch_add_unles" }" " memw_locked(%2, p3) = %1;" " {" -" if !p3 jump 1b;" +" if (!p3) jump 1b;" " }" "2:" : "=&r" (__oldval), "=&r" (tmp)
arch/hexagon/include/asm/bitops.h renamed from arch/hexagon/include/asm/bitops.h~hexagon-parenthesize-registers-in-asm-predicates +4 -4
@@ -38,7 +38,7 @@ static inline int test_and_clear_bit(int"1: R12 = memw_locked(R10);\n" " { P0 = tstbit(R12,R11); R12 = clrbit(R12,R11); }\n" " memw_locked(R10,P1) = R12;\n" -" {if !P1 jump 1b; %0 = mux(P0,#1,#0);}\n" +" {if (!P1) jump 1b; %0 = mux(P0,#1,#0);}\n" : "=&r" (oldval) : "r" (addr), "r" (nr) : "r10", "r11", "r12", "p0", "p1", "memory"
@@ -62,7 +62,7 @@ static inline int test_and_set_bit(int n"1: R12 = memw_locked(R10);\n" " { P0 = tstbit(R12,R11); R12 = setbit(R12,R11); }\n" " memw_locked(R10,P1) = R12;\n" -" {if !P1 jump 1b; %0 = mux(P0,#1,#0);}\n" +" {if (!P1) jump 1b; %0 = mux(P0,#1,#0);}\n" : "=&r" (oldval) : "r" (addr), "r" (nr) : "r10", "r11", "r12", "p0", "p1", "memory"
@@ -88,7 +88,7 @@ static inline int test_and_change_bit(in"1: R12 = memw_locked(R10);\n" " { P0 = tstbit(R12,R11); R12 = togglebit(R12,R11); }\n" " memw_locked(R10,P1) = R12;\n" -" {if !P1 jump 1b; %0 = mux(P0,#1,#0);}\n" +" {if (!P1) jump 1b; %0 = mux(P0,#1,#0);}\n" : "=&r" (oldval) : "r" (addr), "r" (nr) : "r10", "r11", "r12", "p0", "p1", "memory"
@@ -223,7 +223,7 @@ static inline int ffs(int x)int r; asm("{ P0 = cmp.eq(%1,#0); %0 = ct0(%1);}\n" -"{ if P0 %0 = #0; if !P0 %0 = add(%0,#1);}\n" +"{ if (P0) %0 = #0; if (!P0) %0 = add(%0,#1);}\n" :"=&r" (r) :"r" (x) :"p0" );
arch/hexagon/include/asm/cmpxchg.h renamed from arch/hexagon/include/asm/cmpxchg.h~hexagon-parenthesize-registers-in-asm-predicates +1 -1
@@ -30,7 +30,7 @@ static inline unsigned long __xchg(unsig __asm__ __volatile__ ("1: %0 = memw_locked(%1);\n" /* load into retval */ " memw_locked(%1,P0) = %2;\n" /* store into memory */ -" if !P0 jump 1b;\n" +" if (!P0) jump 1b;\n" :"=&r" (retval) :"r" (ptr),"r" (x) : "memory", "p0"
arch/hexagon/include/asm/futex.h renamed from arch/hexagon/include/asm/futex.h~hexagon-parenthesize-registers-in-asm-predicates +3 -3
@@ -16,7 +16,7 @@/* For example: %1 = %4 */ \ insn \"2: memw_locked(%3,p2) = %1;\n" \ -" if !p2 jump 1b;\n" \ +" if (!p2) jump 1b;\n" \" %1 = #0;\n" \"3:\n" \".section .fixup,\"ax\"\n" \
@@ -84,10 +84,10 @@ futex_atomic_cmpxchg_inatomic(u32 *uval,"1: %1 = memw_locked(%3)\n" " {\n" " p2 = cmp.eq(%1,%4)\n" -" if !p2.new jump:NT 3f\n" +" if (!p2.new) jump:NT 3f\n" " }\n" "2: memw_locked(%3,p2) = %5\n" -" if !p2 jump 1b\n" +" if (!p2) jump 1b\n" "3:\n" ".section .fixup,\"ax\"\n" "4: %0 = #%6\n"
arch/hexagon/include/asm/spinlock.h renamed from arch/hexagon/include/asm/spinlock.h~hexagon-parenthesize-registers-in-asm-predicates +10 -10
@@ -30,9 +30,9 @@ static inline void arch_read_lock(arch_r __asm__ __volatile__("1: R6 = memw_locked(%0);\n" " { P3 = cmp.ge(R6,#0); R6 = add(R6,#1);}\n" -" { if !P3 jump 1b; }\n" +" { if (!P3) jump 1b; }\n" " memw_locked(%0,P3) = R6;\n" -" { if !P3 jump 1b; }\n" +" { if (!P3) jump 1b; }\n" : :"r" (&lock->lock) : "memory", "r6", "p3"
@@ -46,7 +46,7 @@ static inline void arch_read_unlock(arch "1: R6 = memw_locked(%0);\n" " R6 = add(R6,#-1);\n" " memw_locked(%0,P3) = R6\n" - " if !P3 jump 1b;\n" + " if (!P3) jump 1b;\n" : : "r" (&lock->lock) : "memory", "r6", "p3"
@@ -61,7 +61,7 @@ static inline int arch_read_trylock(arch __asm__ __volatile__(" R6 = memw_locked(%1);\n" " { %0 = #0; P3 = cmp.ge(R6,#0); R6 = add(R6,#1);}\n" -" { if !P3 jump 1f; }\n" +" { if (!P3) jump 1f; }\n" " memw_locked(%1,P3) = R6;\n" " { %0 = P3 }\n" "1:\n"
@@ -78,9 +78,9 @@ static inline void arch_write_lock(arch_ __asm__ __volatile__("1: R6 = memw_locked(%0)\n" " { P3 = cmp.eq(R6,#0); R6 = #-1;}\n" -" { if !P3 jump 1b; }\n" +" { if (!P3) jump 1b; }\n" " memw_locked(%0,P3) = R6;\n" -" { if !P3 jump 1b; }\n" +" { if (!P3) jump 1b; }\n" : :"r" (&lock->lock) : "memory", "r6", "p3"
@@ -94,7 +94,7 @@ static inline int arch_write_trylock(arc __asm__ __volatile__(" R6 = memw_locked(%1)\n" " { %0 = #0; P3 = cmp.eq(R6,#0); R6 = #-1;}\n" -" { if !P3 jump 1f; }\n" +" { if (!P3) jump 1f; }\n" " memw_locked(%1,P3) = R6;\n" " %0 = P3;\n" "1:\n"
@@ -117,9 +117,9 @@ static inline void arch_spin_lock(arch_s __asm__ __volatile__("1: R6 = memw_locked(%0);\n" " P3 = cmp.eq(R6,#0);\n" -" { if !P3 jump 1b; R6 = #1; }\n" +" { if (!P3) jump 1b; R6 = #1; }\n" " memw_locked(%0,P3) = R6;\n" -" { if !P3 jump 1b; }\n" +" { if (!P3) jump 1b; }\n" : :"r" (&lock->lock) : "memory", "r6", "p3"
@@ -139,7 +139,7 @@ static inline unsigned int arch_spin_try __asm__ __volatile__(" R6 = memw_locked(%1);\n" " P3 = cmp.eq(R6,#0);\n" -" { if !P3 jump 1f; R6 = #1; %0 = #0; }\n" +" { if (!P3) jump 1f; R6 = #1; %0 = #0; }\n" " memw_locked(%1,P3) = R6;\n" " %0 = P3;\n" "1:\n"
arch/hexagon/kernel/vm_entry.S renamed from arch/hexagon/kernel/vm_entry.S~hexagon-parenthesize-registers-in-asm-predicates +1 -1
@@ -369,7 +369,7 @@ ret_from_fork: R26.L = #LO(do_work_pending); R0 = #VM_INT_DISABLE; } - if P0 jump check_work_pending + if (P0) jump check_work_pending { R0 = R25; callr R24
_