[PATCH, ppc] Simplify VLE handling in print_insn_powerpc()

Alan Modra amodra@gmail.com
Mon May 7 23:47:00 GMT 2018


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



More information about the Binutils mailing list