* Alignment of FP Context Storage
@ 2002-11-18 13:24 Kevin D. Kissell
2002-11-18 13:24 ` Kevin D. Kissell
2002-11-18 13:33 ` Ralf Baechle
0 siblings, 2 replies; 3+ messages in thread
From: Kevin D. Kissell @ 2002-11-18 13:24 UTC (permalink / raw)
To: linux-mips
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Alignment of FP Context Storage
2002-11-18 13:24 Alignment of FP Context Storage Kevin D. Kissell
@ 2002-11-18 13:24 ` Kevin D. Kissell
2002-11-18 13:33 ` Ralf Baechle
1 sibling, 0 replies; 3+ messages in thread
From: Kevin D. Kissell @ 2002-11-18 13:24 UTC (permalink / raw)
To: linux-mips
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Alignment of FP Context Storage
2002-11-18 13:24 Alignment of FP Context Storage Kevin D. Kissell
2002-11-18 13:24 ` Kevin D. Kissell
@ 2002-11-18 13:33 ` Ralf Baechle
1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2002-11-18 13:33 UTC (permalink / raw)
To: Kevin D. Kissell; +Cc: linux-mips
On Mon, Nov 18, 2002 at 02:24:06PM +0100, Kevin D. Kissell wrote:
> 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?
The definition of mips_cpu_hard_struct uses doubles which is ensuring
mips_fpu_hard_struct will have 64-bit alignment. This is actually part
of thread_struct which itself has 8kB alignment on 32-bit and 16kB
alignment on 64-bit.
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-11-18 13:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-18 13:24 Alignment of FP Context Storage Kevin D. Kissell
2002-11-18 13:24 ` Kevin D. Kissell
2002-11-18 13:33 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox