[llvm] r197646 - Add stack alignment information for Sparc.

Sean Silva 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
> Log:
> Add stack alignment information for Sparc.
>
> This matches the data in clang which was added by Jakob Stoklund Olesen in
> r179596.
>
> Thanks for erikjv on irc for pointing me to the relevant documents:
> http://sparc.com/standards/64.psabi.1.35.ps.Z
> page 25: Every stack frame must be 16-byte aligned.
>
> http://sparc.com/standards/psABI3rd.pdf
> 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
> stack
> realignment. This will be tested in clang shortly.
>
> Modified:
>     llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp
>
> Modified: llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp?rev=197646&r1=197645&r2=197646&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp Wed Dec 18 20:21:16
> 2013
> @@ -41,6 +41,11 @@ static std::string computeDataLayout(con
>    else
>      Ret += "-f128:64-n32";
>
> +  if (ST.is64Bit())
> +    Ret += "-S128";
> +  else
> +    Ret += "-S64";
> +
>    return Ret;
>  }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131219/db5625f0/attachment.html>


More information about the llvm-commits mailing list