This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/3] Minor refactorings in arm-tdep.c instruction decoding


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

> I am currently working on extracting the instruction decoding from the
> displaced stepping support in arm-tdep.c, in order to share the functionality
> with the upcoming fast tracepoint support.  I did a few refactors that helped
> me correlate the code with the ARM Architecture Reference Manual.  I think the
> change helps readability in general, and especially when you have the manual
> open on the side.
>
> The idea is to follow the the order of the manual, use the same names and do
> the same "checks" (avoid using unnecessary shortcuts that make the code more
> cryptic).

It is good to match the code to the manual.  The instruction encoding
can't change, but the order or the category of instruction _may_ change in
the manual in the future.  I am not the manual writer, but writers may
want to refactor the doc in the future too :)

Although your change is code refactor, better to run tests.

-- 
Yao (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]