From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4875 invoked by alias); 25 Jul 2014 17:02:06 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 4588 invoked by uid 89); 25 Jul 2014 17:02:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp16.uk.ibm.com Received: from e06smtp16.uk.ibm.com (HELO e06smtp16.uk.ibm.com) (195.75.94.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 25 Jul 2014 17:02:02 +0000 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 25 Jul 2014 18:01:59 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp16.uk.ibm.com (192.168.101.146) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 25 Jul 2014 18:01:57 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id B76A017D8045 for ; Fri, 25 Jul 2014 18:03:37 +0100 (BST) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s6PH1vhV35848336 for ; Fri, 25 Jul 2014 17:01:57 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s6PH1trc023244 for ; Fri, 25 Jul 2014 11:01:56 -0600 Received: from br87z6lw.boeblingen.de.ibm.com (dyn-9-152-212-196.boeblingen.de.ibm.com [9.152.212.196]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s6PH1r7E023174; Fri, 25 Jul 2014 11:01:55 -0600 From: Andreas Arnez To: binutils@sourceware.org Cc: Martin Schwidefsky , Andreas Krebbel Subject: [PATCH 5/6] S/390: Drop function pointer dereferences in disassembler Date: Fri, 25 Jul 2014 17:02:00 -0000 Message-Id: <1406307713-7926-6-git-send-email-arnez@linux.vnet.ibm.com> In-Reply-To: <1406307713-7926-1-git-send-email-arnez@linux.vnet.ibm.com> References: <1406307713-7926-1-git-send-email-arnez@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14072517-3548-0000-0000-000000B3DD15 X-SW-Source: 2014-07/txt/msg00206.txt.bz2 Convert occurrences of "(*foo->bar) ()" to "foo->bar ()". opcodes/ * s390-dis.c (s390_print_insn_with_opcode): Drop function pointer dereferences without effect. (print_insn_s390): Likewise. --- opcodes/s390-dis.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/opcodes/s390-dis.c b/opcodes/s390-dis.c index 029f9f1..891970f 100644 --- a/opcodes/s390-dis.c +++ b/opcodes/s390-dis.c @@ -159,9 +159,9 @@ s390_print_insn_with_opcode (bfd_vma memaddr, char separator; if (opcode->operands[0] != 0) - (*info->fprintf_func) (info->stream, "%s\t", opcode->name); + info->fprintf_func (info->stream, "%s\t", opcode->name); else - (*info->fprintf_func) (info->stream, "%s", opcode->name); + info->fprintf_func (info->stream, "%s", opcode->name); /* Extract the operands. */ separator = 0; @@ -180,22 +180,22 @@ s390_print_insn_with_opcode (bfd_vma memaddr, } if (separator) - (*info->fprintf_func) (info->stream, "%c", separator); + info->fprintf_func (info->stream, "%c", separator); if (operand->flags & S390_OPERAND_GPR) - (*info->fprintf_func) (info->stream, "%%r%u", val.u); + info->fprintf_func (info->stream, "%%r%u", val.u); else if (operand->flags & S390_OPERAND_FPR) - (*info->fprintf_func) (info->stream, "%%f%u", val.u); + info->fprintf_func (info->stream, "%%f%u", val.u); else if (operand->flags & S390_OPERAND_AR) - (*info->fprintf_func) (info->stream, "%%a%u", val.u); + info->fprintf_func (info->stream, "%%a%u", val.u); else if (operand->flags & S390_OPERAND_CR) - (*info->fprintf_func) (info->stream, "%%c%u", val.u); + info->fprintf_func (info->stream, "%%c%u", val.u); else if (operand->flags & S390_OPERAND_PCREL) - (*info->print_address_func) (memaddr + val.i + val.i, info); + info->print_address_func (memaddr + val.i + val.i, info); else if (operand->flags & S390_OPERAND_SIGNED) - (*info->fprintf_func) (info->stream, "%i", val.i); + info->fprintf_func (info->stream, "%i", val.i); else - (*info->fprintf_func) (info->stream, "%u", val.u); + info->fprintf_func (info->stream, "%u", val.u); if (operand->flags & S390_OPERAND_DISP) { @@ -203,7 +203,7 @@ s390_print_insn_with_opcode (bfd_vma memaddr, } else if (operand->flags & S390_OPERAND_BASE) { - (*info->fprintf_func) (info->stream, ")"); + info->fprintf_func (info->stream, ")"); separator = ','; } else @@ -241,15 +241,15 @@ print_insn_s390 (bfd_vma memaddr, struct disassemble_info *info) /* Every S390 instruction is max 6 bytes long. */ memset (buffer, 0, 6); - status = (*info->read_memory_func) (memaddr, buffer, 6, info); + status = info->read_memory_func (memaddr, buffer, 6, info); if (status != 0) { for (bufsize = 0; bufsize < 6; bufsize++) - if ((*info->read_memory_func) (memaddr, buffer, bufsize + 1, info) != 0) + if (info->read_memory_func (memaddr, buffer, bufsize + 1, info) != 0) break; if (bufsize <= 0) { - (*info->memory_error_func) (status, memaddr, info); + info->memory_error_func (status, memaddr, info); return -1; } opsize = s390_insn_length (buffer); @@ -293,20 +293,20 @@ print_insn_s390 (bfd_vma memaddr, struct disassemble_info *info) value = (value << 8) + (unsigned int) buffer[1]; value = (value << 8) + (unsigned int) buffer[2]; value = (value << 8) + (unsigned int) buffer[3]; - (*info->fprintf_func) (info->stream, ".long\t0x%08x", value); + info->fprintf_func (info->stream, ".long\t0x%08x", value); return 4; } else if (bufsize >= 2) { value = (unsigned int) buffer[0]; value = (value << 8) + (unsigned int) buffer[1]; - (*info->fprintf_func) (info->stream, ".short\t0x%04x", value); + info->fprintf_func (info->stream, ".short\t0x%04x", value); return 2; } else { value = (unsigned int) buffer[0]; - (*info->fprintf_func) (info->stream, ".byte\t0x%02x", value); + info->fprintf_func (info->stream, ".byte\t0x%02x", value); return 1; } } -- 1.8.4.2