[gdb/testsuite] Fix gdb.reverse/insn-reverse-x86.c for -m32
authorTom de Vries <tdevries@suse.de>
Fri, 4 Dec 2020 12:36:47 +0000 (13:36 +0100)
committerTom de Vries <tdevries@suse.de>
Fri, 4 Dec 2020 12:36:47 +0000 (13:36 +0100)
commita1499830feea0dc134e8b08d7cc5b6a52e370294
treecaaf3dd7059a43ac12797a9b7a3b4ccdf884f5b4
parent9c027c2f6c5cdb3db0b8c72c06b691c5ba502279
[gdb/testsuite] Fix gdb.reverse/insn-reverse-x86.c for -m32

When running test-case gdb.reverse/insn-reverse.exp with target board
unix/-m32, we get:
...
spawn -ignore SIGHUP gcc -fno-stack-protector -fdiagnostics-color=never \
  -c -g -m32 -o insn-reverse0.o insn-reverse.c^M
insn-reverse-x86.c: Assembler messages:^M
insn-reverse-x86.c:88: Error: bad register name `%r8w'^M
....

Fix this by guarding x86_64 assembly in insn-reverse-x86.c with #ifdef
__x86_64__.

Tested on x86_64-linux, with native and unix/-m32.

gdb/testsuite/ChangeLog:

2020-12-04  Tom de Vries  <tdevries@suse.de>

* gdb.reverse/insn-reverse-x86.c: Guard x86_64 assembly with #ifdef
__x86_64__.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.reverse/insn-reverse-x86.c