disas/nios2: Fix style in print_insn_nios2()

We are going to modify this function, fix its style first.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210807110939.95853-2-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
Philippe Mathieu-Daudé 2021-08-07 13:09:38 +02:00 committed by Laurent Vivier
parent 764ecf77d0
commit ed899ac77d
1 changed files with 26 additions and 27 deletions

View File

@ -3486,27 +3486,26 @@ print_insn_nios2 (bfd_vma address, disassemble_info *info,
int status; int status;
status = (*info->read_memory_func)(address, buffer, INSNLEN, info); status = (*info->read_memory_func)(address, buffer, INSNLEN, info);
if (status == 0) if (status == 0) {
{
unsigned long insn; unsigned long insn;
if (endianness == BFD_ENDIAN_BIG) if (endianness == BFD_ENDIAN_BIG) {
insn = (unsigned long) bfd_getb32(buffer); insn = (unsigned long) bfd_getb32(buffer);
else } else {
insn = (unsigned long) bfd_getl32(buffer); insn = (unsigned long) bfd_getl32(buffer);
}
return nios2_disassemble(address, insn, info); return nios2_disassemble(address, insn, info);
} }
/* We might have a 16-bit R2 instruction at the end of memory. Try that. */ /* We might have a 16-bit R2 instruction at the end of memory. Try that. */
if (info->mach == bfd_mach_nios2r2) if (info->mach == bfd_mach_nios2r2) {
{
status = (*info->read_memory_func)(address, buffer, 2, info); status = (*info->read_memory_func)(address, buffer, 2, info);
if (status == 0) if (status == 0) {
{
unsigned long insn; unsigned long insn;
if (endianness == BFD_ENDIAN_BIG) if (endianness == BFD_ENDIAN_BIG) {
insn = (unsigned long) bfd_getb16(buffer); insn = (unsigned long) bfd_getb16(buffer);
else } else {
insn = (unsigned long) bfd_getl16(buffer); insn = (unsigned long) bfd_getl16(buffer);
}
return nios2_disassemble(address, insn, info); return nios2_disassemble(address, insn, info);
} }
} }