Re: [PATCH 2/5] ARM: use unified assembler in headers

From: Stefan Agner
Date: Sat Feb 09 2019 - 18:04:04 EST


On 07.02.2019 17:10, Nicolas Pitre wrote:
> On Thu, 7 Feb 2019, Stefan Agner wrote:
>
>> Use unified assembler syntax (UAL) in headers. Divided syntax is
>> considered depricated. This will also allow to build the kernel
>> using LLVM's integrated assembler.
>>
>> Signed-off-by: Stefan Agner <stefan@xxxxxxxx>
>> ---
>> arch/arm/include/asm/assembler.h | 8 ++++----
>> arch/arm/include/asm/vfpmacros.h | 8 ++++----
>> arch/arm/lib/bitops.h | 8 ++++----
>> 3 files changed, 12 insertions(+), 12 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
>> index 28a48e0d4cca..60465b55683c 100644
>> --- a/arch/arm/include/asm/assembler.h
>> +++ b/arch/arm/include/asm/assembler.h
>> @@ -376,7 +376,7 @@ THUMB( orr \reg , \reg , #PSR_T_BIT )
>> .macro usraccoff, instr, reg, ptr, inc, off, cond, abort, t=TUSER()
>> 9999:
>> .if \inc == 1
>> - \instr\cond\()b\()\t\().w \reg, [\ptr, #\off]
>> + \instr\()b\cond\()\t\().w \reg, [\ptr, #\off]
>
> Similar comment here: you added a \() between \instr and b as needed,
> but the one between \cond and \t (which was already redundant before)
> may go.

Thanks, Nicolas, fixed this.

Also noticed that the else branch has such a null token in excess.

Furthermore, the "t" token actually needs to be before the condition
token too. It should look something like this in the end:

.if \inc == 1
\instr\()b\t\cond\().w \reg, [\ptr, #\off]
.elseif \inc == 4
\instr\t\cond\().w \reg, [\ptr, #\off]
.else
...

--
Stefan