[llvm] r197646 - Add stack alignment information for Sparc.
silvas at purdue.edu
Thu Dec 19 11:14:17 PST 2013
Ideally all the relevant manuals for these sorts of changes should be
linked from <http://llvm.org/docs/CompilerWriterInfo.html>. Could you make
sure everything is up to date there?
-- Sean Silva
On Wed, Dec 18, 2013 at 7:21 PM, Rafael Espindola <
rafael.espindola at gmail.com> wrote:
> Author: rafael
> Date: Wed Dec 18 20:21:16 2013
> New Revision: 197646
> URL: http://llvm.org/viewvc/llvm-project?rev=197646&view=rev
> Add stack alignment information for Sparc.
> This matches the data in clang which was added by Jakob Stoklund Olesen in
> Thanks for erikjv on irc for pointing me to the relevant documents:
> page 25: Every stack frame must be 16-byte aligned.
> page 3-10: Although the architecture requires only word alignment,
> software convention and the operating system require every stack frame to
> be doubleword aligned.
> I tried to add a test, but it looks like sparc doesn't implement dynamic
> realignment. This will be tested in clang shortly.
> Modified: llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp
> --- llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp Wed Dec 18 20:21:16
> @@ -41,6 +41,11 @@ static std::string computeDataLayout(con
> Ret += "-f128:64-n32";
> + if (ST.is64Bit())
> + Ret += "-S128";
> + else
> + Ret += "-S64";
> return Ret;
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits