This is an archive of the discontinued LLVM Phabricator instance.

[libc] Extend the linux thread implementation for riscv64.
ClosedPublic

Authored by sivachandra on Mar 9 2023, 12:49 AM.

Details

Summary

Also, added riscv64 startup code for static linking which is used
by the integration tests. Functions from the C standard threads
library have been enabled.

Diff Detail

Event Timeline

sivachandra created this revision.Mar 9 2023, 12:49 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 9 2023, 12:49 AM
sivachandra requested review of this revision.Mar 9 2023, 12:49 AM
mikhail.ramalho accepted this revision.Mar 9 2023, 4:47 AM

LGTM.

Unrelated topic: I started to get some rounding mode errors this morning, are you seeing them too @sivachandra or is it just on my side?

[ RUN      ] LlvmLibcRoundingModeTest.SetAndGet
/home/mgadelha/llvm-project/libc/test/src/fenv/rounding_mode_test.cpp:30: FAILURE
      Expected: s
      Which is: -1
To be equal to: 0
      Which is: 0
/home/mgadelha/llvm-project/libc/test/src/fenv/rounding_mode_test.cpp:32: FAILURE
      Expected: rm
      Which is: 2
To be equal to: FE_UPWARD
      Which is: 8
/home/mgadelha/llvm-project/libc/test/src/fenv/rounding_mode_test.cpp:40: FAILURE
      Expected: s
      Which is: -1
To be equal to: 0
      Which is: 0
/home/mgadelha/llvm-project/libc/test/src/fenv/rounding_mode_test.cpp:42: FAILURE
      Expected: rm
      Which is: 1
To be equal to: FE_TOWARDZERO
      Which is: 4
[  FAILED  ] LlvmLibcRoundingModeTest.SetAndGet
Ran 1 tests.  PASS: 0  FAIL: 1
/home/mgadelha/llvm-project/libc/test/src/fenv/getenv_and_setenv_test.cpp:71: FAILURE
      Expected: rm
      Which is: 0
To be equal to: FE_TONEAREST
      Which is: 2
[  FAILED  ] LlvmLibcFenvTest.Set_FE_DFL_ENV
Ran 2 tests.  PASS: 1  FAIL: 1
This revision is now accepted and ready to land.Mar 9 2023, 4:47 AM

Unrelated topic: I started to get some rounding mode errors this morning, are you seeing them too @sivachandra or is it just on my side?

I am seeing a clean run in the full build as well as overlay build. Also, I will review your setjmp patch today. Thanks for your reviews and contributions. If everything goes well, I should be able to fire up a riscv builder connected to the LLVM buildbot by end of day today.