Re: [PATCH 01/12] regcache: Add functions suitable for regset_supply/collect.

Yao Qi
2014-05-27T02:49:19Z

On 05/27/2014 12:36 AM, Andreas Arnez wrote:
> +/* Mapping between register numbers and offsets in a buffer, for use
> + in the '*regset' functions below. The first entry in a map refers
> + to offset 0, and each entry increases the offset by its size.

Except that 'regno' is REGCACHE_MAP_SKIP_BYTES. When 'regno' is
REGCACHE_MAP_SKIP_BYTES, 'count' is the increased offset by bytes, IIUC.

> +/* Transfer a set of registers (as described by REGSET) between
> + REGCACHE and BUF. If REGNUM == -1, transfer all registers
> + belonging to the regset, otherwise just the register numbered
> + REGNUM. The REGSET's 'descr' field must point to an array of
> + 'struct regcache_map_entry'.

IWBN to update the comments to 'descr' field, and go a step further,
rename field 'descr'.

> +
> + These functions are suitable for the 'regset_supply' and
> + 'regset_collect' fields in a regset structure.
> + */

"*/" should go to the previous line.

--
Yao (é½å°§)