lkml.org 
[lkml]   [2001]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: cpu_has_fxsr or cpu_has_xmm?
>>>>> "DL" == Doug Ledford <dledford@redhat.com> writes:
>> > --- linux.vanilla/arch/i386/kernel/i387.c Thu Feb 22 09:05:35 2001
>> > +++ linux.ac/arch/i386/kernel/i387.c Sun Feb 4 10:58:36 2001
>> > @@ -179,7 +179,7 @@
>> >
>> > unsigned short get_fpu_mxcsr( struct task_struct *tsk )
>> > {
>> > - if ( cpu_has_fxsr ) {
>> > + if ( cpu_has_xmm ) {
>> > return tsk->thread.i387.fxsave.mxcsr;
>> > } else {
>> > return 0x1f80;
>> >

DL> As to the correctness, the mxcsr register really only exists
DL> if you have xmm, so the xmm is the correct test. However,...

DL> ... User space programmers should be checking for xmm
DL> capability themselves before ever paying attention to mxcsr
DL> anyway, so it's not an end of the world error.

If that is the case, wouldn't it be simpler to always return
tsk->thread.i387.fxsave.mxcsr from this function, and initialize
that field to 0x1f80 (whatever that magic number means) when
the structure is built?


------------------------------------------------------------
--== Sent via Deja.com ==--
http://www.deja.com/


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.024 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site