[llvm-commits] [llvm] r41642 - /llvm/trunk/lib/Target/X86/X86Subtarget.h
Evan Cheng
evan.cheng at apple.com
Tue Sep 4 09:31:42 PDT 2007
Hi Rafael,
Thanks for catching this!
As far as I know Darwin follows the ABI exactly. I'll fix that. BTW,
is it possible for you to add a test case?
Thanks,
Evan
On Aug 31, 2007, at 5:23 AM, Rafael Espindola wrote:
> Author: rafael
> Date: Fri Aug 31 07:23:58 2007
> New Revision: 41642
>
> URL: http://llvm.org/viewvc/llvm-project?rev=41642&view=rev
> Log:
> Align i64 and f64 at 8 byte on x86-64.
> This is mandated table 3.1 at
> http://www.x86-64.org/documentation/abi.pdf
>
>
> Modified:
> llvm/trunk/lib/Target/X86/X86Subtarget.h
>
> Modified: llvm/trunk/lib/Target/X86/X86Subtarget.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/
> X86Subtarget.h?rev=41642&r1=41641&r2=41642&view=diff
>
> ======================================================================
> ========
> --- llvm/trunk/lib/Target/X86/X86Subtarget.h (original)
> +++ llvm/trunk/lib/Target/X86/X86Subtarget.h Fri Aug 31 07:23:58 2007
> @@ -145,12 +145,18 @@
>
> std::string getDataLayout() const {
> const char *p;
> - if (is64Bit())
> - p = "e-p:64:64-f64:32:64-i64:32:64-f80:128:128";
> - else if (isTargetDarwin())
> - p = "e-p:32:32-f64:32:64-i64:32:64-f80:128:128";
> - else
> - p = "e-p:32:32-f64:32:64-i64:32:64-f80:32:32";
> + if (is64Bit()) {
> + if (isTargetDarwin())
> + p = "e-p:64:64-f64:32:64-i64:32:64-f80:128:128";
> + else
> + p = "e-p:64:64-f64:64:64-i64:64:64-f80:128:128";
> + }
> + else {
> + if (isTargetDarwin())
> + p = "e-p:32:32-f64:32:64-i64:32:64-f80:128:128";
> + else
> + p = "e-p:32:32-f64:32:64-i64:32:64-f80:32:32";
> + }
> return std::string(p);
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list