Skip to content

Commit 4e71106

Browse files
sfrothwellmpe
authored andcommitted
powerpc: unrel_branch_check.sh: simplify objdump's asm output
We don't use the raw hex instruction dump, so elide it and adjust the following expressions. Also use \s instead of [[:space:]] everywhere. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200811140435.20957-4-sfr@canb.auug.org.au
1 parent 20ff8ec commit 4e71106

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎arch/powerpc/tools/unrel_branch_check.sh‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ awk '$2 == "<__end_interrupts>:" { print $1 }'
2626
)
2727

2828
BRANCHES=$(
29-
$objdump -R -D --start-address="$kstart" --stop-address="$end_intr" "$vmlinux" |
30-
grep -e "^c[0-9a-f]*:[[:space:]]*\([0-9a-f][0-9a-f][[:space:]]\)\{4\}[[:space:]]*b" |
29+
$objdump -R -D --no-show-raw-insn --start-address="$kstart" --stop-address="$end_intr" "$vmlinux" |
30+
grep -e "^c[0-9a-f]*:\s*b" |
3131
sed -e '/\<__start_initialization_multiplatform>/d' \
3232
-e '/b.\?.\?ctr/d' \
3333
-e '/b.\?.\?lr/d' \
34-
-e 's/\bbt.\?[[:space:]]*[[:digit:]][[:digit:]]*,/beq/' \
35-
-e 's/\bbf.\?[[:space:]]*[[:digit:]][[:digit:]]*,/bne/' \
36-
-e 's/[[:space:]]0x/ /' \
34+
-e 's/\bbt.\?\s*[[:digit:]][[:digit:]]*,/beq/' \
35+
-e 's/\bbf.\?\s*[[:digit:]][[:digit:]]*,/bne/' \
36+
-e 's/\s0x/ /' \
3737
-e 's/://' |
38-
awk '{ print $1 ":" $6 ":0x" $7 ":" $8 " "}'
38+
awk '{ print $1 ":" $2 ":0x" $3 ":" $4 " "}'
3939
)
4040

4141
for tuple in $BRANCHES; do

0 commit comments

Comments
 (0)