From 79d969b2ab42b1347e9d2d1233a4a2fa7b7c4119 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 10 Jan 2005 09:54:50 +0000 Subject: [PATCH] binutils/: * configure.in: Don't define SKIP_ZEROES. * configure: Regenerate. * objdump.c (disassemble_data): Set skip_zeroes and skip_zeroes_at_end in disasm_info to defaults. (DEFAULT_SKIP_ZEROES): Rename from SKIP_ZEROES and always define. (DEFAULT_SKIP_ZEROES_AT_END): Rename from SKIP_ZEROES_AT_END and always define. (disassemble_bytes): Use skip_zeroes and skip_zeroes_at_end from objdump_disasm_info. include/: * dis-asm.h (struct disassemble_info): Add skip_zeroes and skip_zeroes_at_end. opcodes/: * disassemble.c (disassemble_init_for_target) : Set skip_zeroes to 16. : Set skip_zeroes to 32. --- include/ChangeLog | 5 +++++ include/dis-asm.h | 12 ++++++++++++ opcodes/ChangeLog | 6 ++++++ opcodes/disassemble.c | 11 ++++++++++- 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/include/ChangeLog b/include/ChangeLog index 198570979d..c4fab4bbf4 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2005-01-10 Andreas Schwab + + * dis-asm.h (struct disassemble_info): Add skip_zeroes and + skip_zeroes_at_end. + 2004-12-11 Ben Elliston * fibheap.h (struct fibnode): Only use unsigned long bitfields diff --git a/include/dis-asm.h b/include/dis-asm.h index aa8e2b5084..be54263a75 100644 --- a/include/dis-asm.h +++ b/include/dis-asm.h @@ -159,6 +159,18 @@ typedef struct disassemble_info { Normally one, but some DSPs have byte sizes of 16 or 32 bits. */ unsigned int octets_per_byte; + /* The number of zeroes we want to see at the end of a section before we + start skipping them. */ + unsigned int skip_zeroes; + + /* The number of zeroes to skip at the end of a section. If the number + of zeroes at the end is between SKIP_ZEROES_AT_END and SKIP_ZEROES, + they will be disassembled. If there are fewer than + SKIP_ZEROES_AT_END, they will be skipped. This is a heuristic + attempt to avoid disassembling zeroes inserted by section + alignment. */ + unsigned int skip_zeroes_at_end; + /* Results from instruction decoders. Not all decoders yet support this information. This info is set each time an instruction is decoded, and is only valid for the last such instruction. diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 23821df87f..2effaf3065 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,9 @@ +2005-01-10 Andreas Schwab + + * disassemble.c (disassemble_init_for_target) : Set skip_zeroes to 16. + : Set skip_zeroes to 32. + 2004-12-23 Tomer Levi * crx-opc.c: Mark 'bcop' instruction as RELAXABLE. diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c index 19de8f6f84..7fda7d39b8 100644 --- a/opcodes/disassemble.c +++ b/opcodes/disassemble.c @@ -1,5 +1,5 @@ /* Select disassembly routine for specified architecture. - Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -424,6 +424,15 @@ disassemble_init_for_target (struct disassemble_info * info) info->symbol_is_valid = arm_symbol_is_valid; break; #endif +#ifdef ARCH_ia64 + case bfd_arch_ia64: + info->skip_zeroes = 16; + break; +#endif +#ifdef ARCH_tic4x + case bfd_arch_tic4x: + info->skip_zeroes = 32; +#endif default: break; } -- 2.11.0