[libc-commits] [PATCH] D148797: [libc] Start to refactor riscv platform abstraction to support both 32 and 64 bits versions

Mikhail Ramalho via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Apr 24 13:42:47 PDT 2023


mikhail.ramalho added a comment.

In D148797#4292915 <https://reviews.llvm.org/D148797#4292915>, @michaelrj wrote:

> Overall LGTM, though are we sure that having the riscv 64 bit and 32 bit targets is the correct path? On other platforms so far we've separated the 32 bit and 64 bit targets.

My guess is that the code will just work... I believe the only change between the two targets is setjmp/longjmp, where the 64 bits version uses fld, ld, sd, fsd, and the 32 bits will need flw, lw, sw, fsw.

In D148797#4292916 <https://reviews.llvm.org/D148797#4292916>, @sivachandra wrote:

> This is fine. But, can you share the status of what works and what does not on riscv32 and also your riscv32 environment?

Sure, in the commit message, you mean?

Right now, basic libc should compile, i.e., fullbuild=off and no libm.

For testing, I'm using:

  root at qemuriscv32:~# uname -a
  Linux qemuriscv32 6.1.20-yocto-standard #1 SMP PREEMPT Sat Mar 18 02:48:04 UTC 2023 riscv32 GNU/Linux
  
  root at qemuriscv32:~# clang -v
  clang version 16.0.1 (https://github.com/llvm/llvm-project cd89023f797900e4492da58b7bed36f702120011)
  Target: riscv32-poky-linux
  Thread model: posix
  InstalledDir: /usr/bin
  Found candidate GCC installation: /usr/bin/../lib/gcc/riscv32-poky-linux/12.2.0
  Found candidate GCC installation: /usr/bin/../lib/riscv32-poky-linux/12.2.0
  Selected GCC installation: /usr/bin/../lib/riscv32-poky-linux/12.2.0

For development, I'm using ToT clang.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148797



More information about the libc-commits mailing list