public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bill Pringlemeir <bpringle@sympatico.ca>
To: "J . A . Magallon" <jamagallon@able.es>
Cc: linux-kernel@vger.kernel.org
Subject: Re: APIC, AMD-K6/2 -mcpu=586...
Date: 18 May 2001 14:47:26 -0400	[thread overview]
Message-ID: <m2eltm335t.fsf@sympatico.ca> (raw)
In-Reply-To: <m2u22ibww6.fsf@sympatico.ca> <m2d796twqe.fsf@sympatico.ca> <20010518203446.A1066@werewolf.able.es>
In-Reply-To: "J . A . Magallon"'s message of "Fri, 18 May 2001 20:34:46 +0200"


>>>> On 05.18 Bill Pringlemeir wrote:

 >> Why don't the build scripts run a dummy file to determine where
 >> the floating point registers should be placed?
 >> 
 >> ...  const int value = offsetof(struct task_struct,
 >> thread.i387.fxsave) & 15; ...

>>>>> "JAM" == J A Magallon <jamagallon@able.es> writes:

 JAM> That is not the problem. The problem is that the registers have
 JAM> to lay in a defined way, transcribed to a C struct, and that
 JAM> pgcc lays badly that struct.

Yes, I understand that.  I was showing a way to find the value of padding
needed to align the register store in the structure.  Perhaps I should have
shown a mod to asm/processor.h,

...
        /* floating point info */
#if PAD_SIZE  /* not needed if gcc accepts zero size arrays? */
        unsigned char fpAlign[PAD_SIZE];
#endif
	union i387_union	i387;
...

Before compiling the `real source', the dummy file would be compiled
with PAD_SIZE set to zero.  Then objdump (or some other tool) can find
out what the value is.  Then when the task_struct is compiled in the
kernel, PAD_SIZE is set to the appropriate value to align the
structure.

I was describing a way to make things independent of the compiler layout
of the structs.  However, this complicates the build process, and people
might not like the padding due to cache alignment details.

I am pretty sure what I am saying works... It might not be right though.

regards,
Bill Pringlemeir.



  reply	other threads:[~2001-05-18 18:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-18 13:38 APIC, AMD-K6/2 -mcpu=586 Bill Pringlemeir
2001-05-18 17:04 ` Bill Pringlemeir
2001-05-18 18:34   ` J . A . Magallon
2001-05-18 18:47     ` Bill Pringlemeir [this message]
2001-05-18 19:20       ` Bill Pringlemeir

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2eltm335t.fsf@sympatico.ca \
    --to=bpringle@sympatico.ca \
    --cc=jamagallon@able.es \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox