[PATCH 3/3] arm-tdep.c: Refactor arm_decode_media
Yao Qi
qiyaoltc@gmail.com
Thu Feb 11 11:58:00 GMT 2016
Simon Marchi <simon.marchi@ericsson.com> writes:
> - switch (bits (insn, 20, 24))
> + uint8_t op1 = bits (insn, 20, 24);
> + uint8_t rd = bits (insn, 12, 15);
> + uint8_t op2 = bits (insn, 5, 7);
> + uint8_t rn = bits (insn, 0, 3);
> +
> + switch (op1)
op1 is only used once, I prefer using bits (insn, 20, 24) rather than
defining a new variable.
Other variables, like rd and rn, can be defined where they are used.
--
Yao (齐尧)
More information about the Gdb-patches
mailing list