Skip to content

Commit c5cfb62

Browse files
Marc Zyngiertorvalds
authored andcommitted
scripts/decodecode: set ARCH when running natively on arm/arm64
When running decodecode natively on arm64, ARCH is likely not to be set, and we end-up with .4byte instead of .inst when generating the disassembly. Similar effects would occur if running natively on a 32bit ARM platform, although that's even less popular. A simple workaround is to populate ARCH when it is not set and that we're running on an arm/arm64 system. Link: http://lkml.kernel.org/r/20181210174659.31054-2-marc.zyngier@arm.com Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent e0b2475 commit c5cfb62

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎scripts/decodecode‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ case $width in
6060
4) type=4byte ;;
6161
esac
6262

63+
if [ -z "$ARCH" ]; then
64+
case `uname -m` in
65+
aarch64*) ARCH=arm64 ;;
66+
arm*) ARCH=arm ;;
67+
esac
68+
fi
69+
6370
disas() {
6471
${CROSS_COMPILE}as $AFLAGS -o $1.o $1.s > /dev/null 2>&1
6572

0 commit comments

Comments
 (0)