mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
Use sigsetjmp/siglongjmp in opcodes
sigsetjmp/siglongjmp without saving the signal mask is faster than setjmp/longjmp on systems where the signal mask is saved. This patch uses sigsetjmp/siglongjmp without saving the signal mask if possible. PR binutils/16886 * config.in: Regenerated. * configure: Likewise. * configure.in: Check if sigsetjmp is available. * h8500-dis.c (private): Replace jmp_buf with OPCODES_SIGJMP_BUF. (fetch_data): Replace longjmp with OPCODES_SIGLONGJMP. (print_insn_h8500): Replace setjmp with OPCODES_SIGSETJMP. * i386-dis.c (dis_private): Replace jmp_buf with OPCODES_SIGJMP_BUF. (fetch_data): Replace longjmp with OPCODES_SIGLONGJMP. (print_insn): Replace setjmp with OPCODES_SIGSETJMP. * ns32k-dis.c (private): Replace jmp_buf with OPCODES_SIGJMP_BUF. (fetch_data): Replace longjmp with OPCODES_SIGLONGJMP. (print_insn_ns32k): Replace setjmp with OPCODES_SIGSETJMP. * sysdep.h (OPCODES_SIGJMP_BUF): New macro. (OPCODES_SIGSETJMP): Likewise. (OPCODES_SIGLONGJMP): Likewise. * vax-dis.c (private): Replace jmp_buf with OPCODES_SIGJMP_BUF. (fetch_data): Replace longjmp with OPCODES_SIGLONGJMP. (print_insn_vax): Replace setjmp with OPCODES_SIGSETJMP. * xtensa-dis.c (dis_private): Replace jmp_buf with OPCODES_SIGJMP_BUF. (fetch_data): Replace longjmp with OPCODES_SIGLONGJMP. (print_insn_xtensa): Replace setjmp with OPCODES_SIGSETJMP. * z8k-dis.c(instr_data_s): Replace jmp_buf with OPCODES_SIGJMP_BUF. (fetch_data): Replace longjmp with OPCODES_SIGLONGJMP. (print_insn_z8k): Replace setjmp with OPCODES_SIGSETJMP.
This commit is contained in:
@ -57,7 +57,7 @@ struct private
|
||||
bfd_byte *max_fetched;
|
||||
bfd_byte the_buffer[MAXLEN];
|
||||
bfd_vma insn_start;
|
||||
jmp_buf bailout;
|
||||
OPCODES_SIGJMP_BUF bailout;
|
||||
};
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
|
||||
if (status != 0)
|
||||
{
|
||||
(*info->memory_error_func) (status, start, info);
|
||||
longjmp (priv->bailout, 1);
|
||||
OPCODES_SIGLONGJMP (priv->bailout, 1);
|
||||
}
|
||||
else
|
||||
priv->max_fetched = addr;
|
||||
@ -745,7 +745,7 @@ print_insn_ns32k (bfd_vma memaddr, disassemble_info *info)
|
||||
info->private_data = & priv;
|
||||
priv.max_fetched = priv.the_buffer;
|
||||
priv.insn_start = memaddr;
|
||||
if (setjmp (priv.bailout) != 0)
|
||||
if (OPCODES_SIGSETJMP (priv.bailout) != 0)
|
||||
/* Error return. */
|
||||
return -1;
|
||||
|
||||
|
Reference in New Issue
Block a user