comp.lang.ada
 help / color / mirror / Atom feed
* Standard'Maximum_Alignment
@ 2015-05-29  9:33 jan.de.kruyf
  2015-05-29 12:22 ` Standard'Maximum_Alignment Simon Wright
  0 siblings, 1 reply; 3+ messages in thread
From: jan.de.kruyf @ 2015-05-29  9:33 UTC (permalink / raw)


Hallo,

Does anybody know about the history of this thing.


I get an error when I compile with the standard switches for making linux kernel modules.
------------------
gnat1: error: -mpreferred-stack-boundary=3 is not between 4 and 12
------------------

I think it clashes with 
-------
for Memory'Alignment use Standard'Maximum_Alignment;
--------
in s-memory.adb

according to this email Standard'Maximum_Alignment should be 16 which works out to a preferred-stack-boundary=4

https://gcc.gnu.org/ml/gcc-patches/2005-03/msg01456.html
--

gcc:
-mpreferred-stack-boundary=num
Attempt to keep the stack boundary aligned to a 2 raised to num byte boundary. If `-mpreferred-stack-boundary' is not specified, the default is 4 (16 bytes or 128 bits).
--

Am I right in  my assumption that kernel uses the value of 3 since none of the fancy cpu extensions are used in kernel code?

And gnat of course knows nothing about kernelcode. with or without the kernelcode switch it asks for memory with '__gnat_malloc'

Thanks,

j.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-29 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-29  9:33 Standard'Maximum_Alignment jan.de.kruyf
2015-05-29 12:22 ` Standard'Maximum_Alignment Simon Wright
2015-05-29 13:25   ` Standard'Maximum_Alignment jan.de.kruyf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox