Re: [PATCH] Make arm_record_test work on big-endian machines

Yao Qi
2018-03-12T17:09:12Z

Simon Marchi <simon.marchi@ericsson.com> writes:

> What do you think about the patch below? Functionally, it should be identical
> to what you suggested, but I think it's clear to fix extract_arm_insn instead.
>

Patch looks good to me. Thanks.

> +
> + insn_record->arm_insn
> + = (uint32_t) extract_unsigned_integer (&buf[0], 2, endian);
> +
> + if (insn_size == 4)
> + {
> + insn_record->arm_insn <<= 16;
> + insn_record->arm_insn
> + |= (uint32_t) extract_unsigned_integer (&buf[2], 2, endian);

Better to add some comments here.

--
Yao (齐尧)