This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt, RISCV] Support builtins for RISC-V
ClosedPublic

Authored by kito-cheng on Feb 6 2018, 6:04 AM.

Diff Detail

Event Timeline

kito-cheng created this revision.Feb 6 2018, 6:04 AM
Herald added subscribers: Restricted Project, llvm-commits, hintonda and 9 others. · View Herald TranscriptFeb 6 2018, 6:04 AM
kito-cheng updated this revision to Diff 132982.Feb 6 2018, 6:08 AM

clean up some useless check code.

apazos added a comment.Feb 7 2018, 1:45 PM

Thanks Kito, with this change plus lib/Basic/Targets/RISCV.h change in clang to return true for hasInt128Type() and disabling fPIC we can build compiler rt for RISCV. We will test it next. But we need to decide if we want to go this route or implement int128_t with int64_t.

Kito, do you plan to add a test case for the new added function?

Hi Ana:

Sure, I am working on add test case for that, I'll update this in next days.

kito-cheng updated this revision to Diff 135873.EditedFeb 26 2018, 1:44 AM

Changes:

  • Add testcase.
  • Remove muldi3 support for RV64 in lib/builtins/riscv/mul3.S, because compiler-rt already provide a general version for muldi3.
  • Rename lib/builtins/riscv/mul3.S to lib/builtins/riscv/mulsi3.S for matching compiler-rt's naming convention.
mgrang accepted this revision.Feb 28 2018, 10:53 AM

LGTM.

This revision is now accepted and ready to land.Feb 28 2018, 10:53 AM
This revision was automatically updated to reflect the committed changes.