[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnumach FP Struct (Beating a dead horse)

From: Barry deFreese
Subject: Re: Gnumach FP Struct (Beating a dead horse)
Date: Fri, 22 Dec 2006 23:45:18 -0500
User-agent: Thunderbird (Windows/20061207)

Samuel Thibault wrote:
Barry deFreese, le Thu 21 Dec 2006 09:54:05 -0500, a écrit :
OK, that makes sense, sorry. It just takes a while to get through my thick skull sometimes. So about my question about adding a struct for the fxsr stuff. I don't really want to add a union of 4 structs right, I need two unions of two structs? So I'd have something like this:

union i387_save_struct {
   struct i386_fp_save;
   struct i386_fpxsr_save;


union i387_regs_struct {
   struct i386_fp_regs;
   struct i386_fpxsr_regs;

Make sense?

Makes sense, but won't work. Remember that the size of a union is the
size of its biggest member. When you'll put both unions one after the
other in the i386_fpsave_state structure, i386_fp_regs will _not_
be just after i386_fp_save, just because sizeof(i386_fpxsr_save) >
sizeof(i386_fp_save). The union has hence to be before the split into

Also, about structure, look at the Intel docs: only the XMM register
saving area doesn't have holes.


OK, one more time. And if this is correct, I have two questions. 1) What do I do with the xmm space, ignore it? 2) Where is the best place to check for fxsr? Should it be done in fpu.c after we determine fpu_type = FP_387?

Thanks as always and thanks especially to Samuel and Olaf for their time and patience!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]