linux-mips
[Top] [All Lists]

Alignment of FP Context Storage

To: <linux-mips@linux-mips.org>
Subject: Alignment of FP Context Storage
From: "Kevin D. Kissell" <kevink@mips.com>
Date: Mon, 18 Nov 2002 14:24:06 +0100
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
I'm cleaning up some old Linux kernel sandboxes, and
came across a patch which I had long ago made in a
local copy of include/asm-mips/processor.h but which
does not seem to have been propagated more widely.
I had added "__attribute__((aligned(8))))" to the
declarations of the mips_fpu_hard_struct and
mips_fpu_soft_struct data structures, presumably
because there was a need to ensure 64-bit alignment
of the elements so that LDC1 instructions would work.
We don't generally have a problem here, presumably
because either the previous data declarations naturally
align things to 64-bits, or because we've ensured things 
at a higher level of makfile compiler directives.  Are we 
in fact guarnateed to be safe without the source code 
directive, or should those __attribute__ directives be 
added as insurance?

            Kevin K.

<Prev in Thread] Current Thread [Next in Thread>