Skip to content

Commit

Permalink
ARM: 8962/1: kexec: drop invalid assembly argument
Browse files Browse the repository at this point in the history
The tst menomic has only a single #<const> argument in Thumb mode. There
is an ARM variant which allows to write #<const> as #<byte>, #<rot>
which probably is where the current syntax comes from.

It seems that binutils does not care about the additional parameter.
Clang however complains in Thumb2 mode:
arch/arm/kernel/relocate_kernel.S:28:12: error: too many operands for
instruction
 tst r3,nathanchance#1,0
           ^

Drop the unnecessary parameter. This fixes building this file in Thumb2
mode with the Clang integrated assembler.

Link: ClangBuiltLinux/linux#770

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
  • Loading branch information
agners authored and Russell King committed Mar 12, 2020
1 parent 3c14fe7 commit 91274f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/arm/kernel/relocate_kernel.S
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,26 @@ ENTRY(relocate_new_kernel)
ldr r3, [r0],#4

/* Is it a destination page. Put destination address to r4 */
tst r3,#1,0
tst r3,#1
beq 1f
bic r4,r3,#1
b 0b
1:
/* Is it an indirection page */
tst r3,#2,0
tst r3,#2
beq 1f
bic r0,r3,#2
b 0b
1:

/* are we done ? */
tst r3,#4,0
tst r3,#4
beq 1f
b 2f

1:
/* is it source ? */
tst r3,#8,0
tst r3,#8
beq 0b
bic r3,r3,#8
mov r6,#1024
Expand Down

0 comments on commit 91274f9

Please sign in to comment.