From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 4A48238485AD for ; Tue, 10 May 2022 01:49:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4A48238485AD Received: by mail-pl1-x62b.google.com with SMTP id n8so15498523plh.1 for ; Mon, 09 May 2022 18:49:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6aZosO4e5X7A3w6V7yKTIcU/K+0Mx6CsyYzYpRStFPc=; b=KtjwCIFSJ0da1hQ5vH8KxE8bPlOPh11xnAgT70sEmzIl131b6jyIuY41mSMoVHdpIh 2n4zRyinOBlGCdDhff/N4fJM8PXwHEIslh3hkXnoeyJgcpD3CakkiC8c80i/2cpNj87Q oVEbIcHPWz9Dw22Ol3E68dIoXq9+Cp9rxw7izNNu7zT8G+lowf4td27Gydoj8yIbZW9V mHTO6O7/bBsNQhKjAZdyZGMm9+xNhLxk11qjxjBJX5MKWG0Xcou1Z9a5SlWGEIHaV/iw RExBqE2jo0ZNsEtK7pmp1zn0QDTtGRm51Uj9yIYN73A9vN2ZhkDL5VxdCvBD+i+eldBi +rnA== X-Gm-Message-State: AOAM533j40crteKYyA9SZ5lYytf/tL+9yMhdpumwIgT+Htggk6o1oDKe mIm5CpSxi8MDFY2yt6btZgj+C5yXcSU= X-Google-Smtp-Source: ABdhPJzh4yEh3lb7dyU4W+gtW5sk8g3zh0yd0qk9JgKDOHWl4RTVL+61Yuy8j6Uvi3JWgn9ZMGv2gQ== X-Received: by 2002:a17:902:ab8c:b0:15e:fd9f:3f39 with SMTP id f12-20020a170902ab8c00b0015efd9f3f39mr12278600plr.103.1652147343985; Mon, 09 May 2022 18:49:03 -0700 (PDT) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id b29-20020aa7951d000000b0050dc762819asm9290639pfp.116.2022.05.09.18.49.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 18:49:03 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 5DEB3114301B; Tue, 10 May 2022 11:19:00 +0930 (ACST) Date: Tue, 10 May 2022 11:19:00 +0930 From: Alan Modra To: binutils@sourceware.org Subject: opcodes: remove use of PTR Message-ID: References: <99b5380e-8072-dd67-497d-94f72eee43c3@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3027.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, UNWANTED_LANGUAGE_BODY autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2022 01:49:06 -0000 The non-cgen parts of opcodes. I've split out cgen changes to a later patch, since it needs to go upstream to the cgen project. * cr16-dis.c (print_arg): Replace PTR with void *. * crx-dis.c (print_arg): Likewise. * rl78-dis.c (print_insn_rl78_common): Don't use PTR cast. * rx-dis.c (print_insn_rx): Likewise. * visium-dis.c (print_insn_visium): Likewise. * z8k-dis.c (print_insn_z8k): Likewise. diff --git a/opcodes/cr16-dis.c b/opcodes/cr16-dis.c index 8536cf7036d..6bcba0a0bee 100644 --- a/opcodes/cr16-dis.c +++ b/opcodes/cr16-dis.c @@ -529,7 +529,7 @@ print_arg (argument *a, bfd_vma memaddr, struct disassemble_info *info) int sign_flag = 0; int relative = 0; bfd_vma number; - PTR stream = info->stream; + void *stream = info->stream; fprintf_ftype func = info->fprintf_func; switch (a->type) diff --git a/opcodes/crx-dis.c b/opcodes/crx-dis.c index a932d23d613..e27a9386daa 100644 --- a/opcodes/crx-dis.c +++ b/opcodes/crx-dis.c @@ -487,7 +487,7 @@ print_arg (argument *a, bfd_vma memaddr, struct disassemble_info *info) bfd_vma number; int op_index = 0; char string[200]; - PTR stream = info->stream; + void *stream = info->stream; fprintf_ftype func = info->fprintf_func; switch (a->type) diff --git a/opcodes/rl78-dis.c b/opcodes/rl78-dis.c index 2d7ffb26eba..65e43397a05 100644 --- a/opcodes/rl78-dis.c +++ b/opcodes/rl78-dis.c @@ -110,7 +110,7 @@ print_insn_rl78_common (bfd_vma addr, disassemble_info * dis, RL78_Dis_Isa isa) #endif struct private priv; - dis->private_data = (PTR) &priv; + dis->private_data = &priv; rl78_data.pc = addr; rl78_data.dis = dis; diff --git a/opcodes/rx-dis.c b/opcodes/rx-dis.c index 74ae870a5ec..2ecedaf0361 100644 --- a/opcodes/rx-dis.c +++ b/opcodes/rx-dis.c @@ -221,7 +221,7 @@ print_insn_rx (bfd_vma addr, disassemble_info * dis) const char * s; struct private priv; - dis->private_data = (PTR) &priv; + dis->private_data = &priv; rx_data.pc = addr; rx_data.dis = dis; diff --git a/opcodes/visium-dis.c b/opcodes/visium-dis.c index 6bc45123f05..8537f5fc340 100644 --- a/opcodes/visium-dis.c +++ b/opcodes/visium-dis.c @@ -766,7 +766,7 @@ print_insn_visium (bfd_vma addr, disassemble_info *info) /* Stuff copied from m68k-dis.c. */ struct private priv; bfd_byte *buffer = priv.the_buffer; - info->private_data = (PTR) & priv; + info->private_data = &priv; priv.max_fetched = priv.the_buffer; priv.insn_start = addr; if (setjmp (priv.bailout) != 0) diff --git a/opcodes/z8k-dis.c b/opcodes/z8k-dis.c index 3629ed311ce..c4463e99c66 100644 --- a/opcodes/z8k-dis.c +++ b/opcodes/z8k-dis.c @@ -147,7 +147,7 @@ print_insn_z8k (bfd_vma addr, disassemble_info *info, int is_segmented) { instr_data_s instr_data; - info->private_data = (PTR) &instr_data; + info->private_data = &instr_data; instr_data.max_fetched = 0; instr_data.insn_start = addr; if (OPCODES_SIGSETJMP (instr_data.bailout) != 0) -- Alan Modra Australia Development Lab, IBM