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: 3/6 [3rd try]: Add AVX support (i386 changes)


On Wed, Apr 7, 2010 at 7:55 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Wed, Apr 7, 2010 at 3:13 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>>>
>>> XSAVE is different from FXSAVE in some subtle ways, although
>>> XSAVE memory layout is an extension to FXSAVE memory layout.
>>> XSAVE has used or initialized states for SSE and AVX registers.
>>> Most of the codes in i387_collect_xsave deal with used/initialized states.
>>>
>>> Please identify the duplication of code in i387_collect_xsave. I will take
>>> a look.
>>
>> There is in if (gcore) { } else { } there, that has quite a bit of
>> duplicated code. ?I may be missing something, but the fact that
>> i387_collect_xsave() does different things whether it is generating a
>> core file or not seems to be undesirable and wrong to me.
>>
>
> I will take a look.
>

That is xstate_bv optimization. xstate_bv controls how vector registers
are restored via xsave. If we will eventually call xsave, we set up xstate_bv
such that xsave will do minimum work to properly restore vector registers.
If it is for gcore, we don't need to optimize xstate_bv. Of course, we can
always optimize xstate_bv even for gcore. I can do that if it is desired.

Thanks.

-- 
H.J.


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