Date: Wed, 10 Jul 2019 20:47:34 +0000 (UTC) From: adr <adr@SDF.ORG> To: Ian Lepore <ian@freebsd.org> Cc: freebsd-arm@freebsd.org Subject: Re: FreeBSD arm EABI5 documentation? Message-ID: <alpine.NEB.2.21.1907102043040.9461@sdf.lonestar.org> In-Reply-To: <1788e13e706b9fdaf610e4ddd671a5ed715f9dfe.camel@freebsd.org> References: <alpine.NEB.2.21.1907101508370.22895@sdf.lonestar.org> <f2967859f68f1d40f260661791126956f48f4d12.camel@freebsd.org> <alpine.NEB.2.21.1907101735020.3201@sdf.lonestar.org> <da6a8f7e596da9bf9015f76798a5575908ad1be4.camel@freebsd.org> <alpine.NEB.2.21.1907101904570.15468@sdf.lonestar.org> <1788e13e706b9fdaf610e4ddd671a5ed715f9dfe.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 10 Jul 2019, Ian Lepore wrote: > That's... odd. The arm spec requires the stack to be 8-byte aligned at > any public interface. It's hard to imagine how anything could work > properly if it were not, given that the toolchains will assume that 64- > bit values are aligned at 64-bit boundaries and will thus generate > instructions that require that alignment (require it even if strict > alignment checking for most instructions is disabled in the control > register). If you could enter a function with the stack only 4-byte > aligned, how would the compiler know it's safe to use something like an > LDREXD instruction on a local variable allocated on the stack? I have no idea. The only thing I can assure you is that in the code I'm talking about (a forth implementation using SDL2) I've never aligned the C stack when passing arguments to external functions. Until now!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.NEB.2.21.1907102043040.9461>