This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH, ppc] Simplify VLE handling in print_insn_powerpc()
- From: Alan Modra <amodra at gmail dot com>
- To: Peter Bergner <bergner at vnet dot ibm dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Tue, 8 May 2018 09:17:01 +0930
- Subject: Re: [PATCH, ppc] Simplify VLE handling in print_insn_powerpc()
- References: <63100274-9bf8-544c-a58e-44f4562f7b27@vnet.ibm.com>
On Mon, May 07, 2018 at 02:29:54PM -0500, Peter Bergner wrote:
> Here is another cleanup for some VLE code I noticed while scanning the code.
> This consolidates two duplicate calls to memory_error_func. In the case where
> our initial 4-byte read and later VLE 2-byte read both fail, I've changed it so
> that we return the error status of the 4-byte read instead of the 2-byte read.
> This seems more "correct" to me, since the second 2-byte read is really just
> speculative/hopefull. If you don't agree with that, I can always replace
> vle_status with status. The code is still simpler either way.
I don't think it matters either way, but the code is simpler without
vle_status so I'd prefer that you do return the second 2-byte read
status. OK with that change
> - insn_is_short = PPC_OP_SE_VLE(opcode->mask);
> + if (opcode != NULL && PPC_OP_SE_VLE(opcode->mask))
and since you're editing the code, please fix the formatting here.
--
Alan Modra
Australia Development Lab, IBM