[clang] [llvm] [WebAssembly] Add `-i128:128` to the `datalayout` string. (PR #119204)

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 08:12:06 PST 2024


================
@@ -183,11 +183,12 @@ class LLVM_LIBRARY_VISIBILITY WebAssembly32TargetInfo
                                    const TargetOptions &Opts)
       : WebAssemblyTargetInfo(T, Opts) {
     if (T.isOSEmscripten())
-      resetDataLayout("e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-f128:64-n32:64-"
-                      "S128-ni:1:10:20");
-    else
       resetDataLayout(
-          "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20");
+          "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-i128:128-f128:64-n32:64-"
+          "S128-ni:1:10:20");
+    else
+      resetDataLayout("e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-i128:128-n32:64-"
+                      "S128-ni:1:10:20");
----------------
sunfishcode wrote:

The datalayout string exists for the benefit of IR consumers that don't otherwise have knowledge of all the targets, not for users to experiment with different ABIs. I don't say this to defend the design, only to explain what it is.

https://github.com/llvm/llvm-project/pull/119204


More information about the llvm-commits mailing list