comp.lang.ada
 help / color / mirror / Atom feed
From: jan.de.kruyf@gmail.com
Subject: Standard'Maximum_Alignment
Date: Fri, 29 May 2015 02:33:30 -0700 (PDT)
Date: 2015-05-29T02:33:30-07:00	[thread overview]
Message-ID: <5fdc645a-660c-434c-afec-e8d3955782cf@googlegroups.com> (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.

             reply	other threads:[~2015-05-29  9:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29  9:33 jan.de.kruyf [this message]
2015-05-29 12:22 ` Standard'Maximum_Alignment Simon Wright
2015-05-29 13:25   ` Standard'Maximum_Alignment jan.de.kruyf
replies disabled

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