According to table 3.1 of http://www.x86-64.org/documentation/abi.pdf, the i64 and f64 types should have 8 byte alignment.
The attached patch changes this for targets that are not darwin. OK to commit? Cheers, -- Rafael Avila de Espindola Google Ireland Ltd. Gordon House Barrow Street Dublin 4 Ireland Registered in Dublin, Ireland Registration Number: 368047
Index: lib/Target/X86/X86Subtarget.h =================================================================== --- lib/Target/X86/X86Subtarget.h (revision 41327) +++ lib/Target/X86/X86Subtarget.h (working copy) @@ -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@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits