[PATCH] D43105: [RISCV] Enable __int128_t and uint128_t through clang flag

2018-02-22 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. Herald added a subscriber: shiva0217. As @efriedma noted in https://reviews.llvm.org/D43106, it would be good to have some test coverage for ABI lowering. I'd suggest updating test/Driver/riscv32-abi.c with something like: #ifdef __SIZEOF_INT128__ //

[PATCH] D43105: [RISCV] Enable __int128_t and uint128_t through clang flag

2018-02-20 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Please post a follow-up to add this to the 7.0 release notes. Repository: rC Clang https://reviews.llvm.org/D43105 ___ cfe-commits

[PATCH] D43105: [RISCV] Enable __int128_t and uint128_t through clang flag

2018-02-20 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 135112. mgrang added a comment. Updated patch to add -fno version of the flag -fforce-enable-int128. Repository: rC Clang https://reviews.llvm.org/D43105 Files: include/clang/Basic/TargetInfo.h include/clang/Basic/TargetOptions.h

[PATCH] D43105: [RISCV] Enable __int128_t and uint128_t through clang flag

2018-02-17 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. In https://reviews.llvm.org/D43105#1003709, @efriedma wrote: > So you want int128_t for compiler-rt itself, so you can use the soft-float > implementation, but you want to make int128_t opt-in to avoid the possibility > of someone getting a link error trying to link code

[PATCH] D43105: [RISCV] Enable __int128_t and uint128_t through clang flag

2018-02-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: include/clang/Driver/Options.td:843 +def fforce_enable_int128 : Flag<["-"], "fforce-enable-int128">, Group, + Flags<[CC1Option]>, HelpText<"Enable support for int128_t type">; We should have an inverse flag

[PATCH] D43105: [RISCV] Enable __int128_t and uint128_t through clang flag

2018-02-16 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 134745. mgrang edited the summary of this revision. Repository: rC Clang https://reviews.llvm.org/D43105 Files: include/clang/Basic/TargetInfo.h include/clang/Basic/TargetOptions.h include/clang/Driver/Options.td lib/Basic/Targets/Mips.h

[PATCH] D43105: [RISCV] Enable __int128_t and uint128_t through clang flag

2018-02-14 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: lib/Basic/Targets/RISCV.h:85 + bool hasInt128Type(const LangOptions ) const override { +return Opts.UseInt128; + } kito-cheng wrote: > efriedma wrote: > > Maybe make this a cross-platform flag, rather than

[PATCH] D43105: [RISCV] Enable __int128_t and uint128_t through clang flag

2018-02-11 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added inline comments. Comment at: lib/Basic/Targets/RISCV.h:85 + bool hasInt128Type(const LangOptions ) const override { +return Opts.UseInt128; + } efriedma wrote: > Maybe make this a cross-platform flag, rather than riscv-specific? +1, then

[PATCH] D43105: [RISCV] Enable __int128_t and uint128_t through clang flag

2018-02-11 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. Hi Eli: > but you want to make int128_t opt-in to avoid the possibility of someone > getting a link error trying to link code built with clang against libgcc.a? Yes, that's the problem we want to avoid, and we actually get the problem if we built libc (newlib) with

[PATCH] D43105: [RISCV] Enable __int128_t and uint128_t through clang flag

2018-02-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. So you want int128_t for compiler-rt itself, so you can use the soft-float implementation, but you want to make int128_t opt-in to avoid the possibility of someone getting a link error trying to link code built with clang against libgcc.a? That seems a little

[PATCH] D43105: [RISCV] Enable __int128_t and uint128_t through clang flag

2018-02-08 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. Hi Eli: We need that because compiler-rt implement 128 bits soft floating point with int128_t, and RISC-V need that but RV32 doesn't support int128_t, we know it's can be just return true to support that. but we don't want to bring any ABI contemptible issue

[PATCH] D43105: [RISCV] Enable __int128_t and uint128_t through clang flag

2018-02-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > This flag can then be used to build compiler-rt for RISCV32. Can you give a little more context for why this is necessary? As far as I know, compiler-rt generally supports building for targets which don't have __int128_t. (If all riscv targets are supposed to

[PATCH] D43105: [RISCV] Enable __int128_t and uint128_t through clang flag

2018-02-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Related compiler-rt patch: https://reviews.llvm.org/D43106 Repository: rC Clang https://reviews.llvm.org/D43105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D43105: [RISCV] Enable __int128_t and uint128_t through clang flag

2018-02-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: asb, kito-cheng, apazos. Herald added subscribers: cfe-commits, niosHD, sabuasal, jordy.potman.lists, simoncook, johnrusso, rbar, aheejin, jgravelle-google, sbc100, sdardis, dschuff, jfb. If the flag -fuse-int128 is passed, it will enable