This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PATCH: Add regcache_raw_supply_part/regcache_raw_collect_part
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: hjl dot tools at gmail dot com
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 3 Feb 2010 10:14:04 +0100 (CET)
- Subject: Re: PATCH: Add regcache_raw_supply_part/regcache_raw_collect_part
- References: <20100203033131.GA21501@lucon.org>
> Date: Tue, 2 Feb 2010 19:31:31 -0800
> From: "H.J. Lu" <hongjiu.lu@intel.com>
>
> Hi,
>
> Intel AVX saves a 256bit YMM register in lower 128bit and upper 128bit
> separately. This patch adds regcache_raw_supply_part and
> regcache_raw_collect_part. They will be used in AVX gdb patches . OK
> to install?
I think introducing these functions would be a mistake. If you're not
careful, you'll end up with a register cache where part of some
registers is filled with garbage.
I think it is better for the code that fills the register cache, to
collect the pieces and build the full 256-bit value, and then use
regcache_raw_supply() to fill the register cache.