[PATCH] D65634: [RISCV] Default to ilp32d/lp64d in RISC-V Linux

Luís Marques via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 15 08:48:08 PDT 2019


luismarques added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:386
+  else
+    return Triple.getArch() == llvm::Triple::riscv32 ? "ilp32" : "lp64";
 }
----------------
When I compile a bare metal GNU toolchain (using <https://github.com/riscv/riscv-gnu-toolchain>, reports GCC 8.3.0) I seem to get lp64d by default. Should we not match that behaviour?

```

$ cat test.c
float foo() { return 42.0; }
$ riscv64-unknown-elf-gcc -O2 -S test.c
$ cat test.s
(...)
foo:
        lui     a5,%hi(.LC0)
        flw     fa0,%lo(.LC0)(a5)
(...)
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65634/new/

https://reviews.llvm.org/D65634





More information about the cfe-commits mailing list