[libc-commits] [libc] [libc][stdfix] Implement fixed point `countlsfx` functions in llvm-libc (PR #125356)
via libc-commits
libc-commits at lists.llvm.org
Mon Feb 3 12:25:31 PST 2025
================
@@ -64,6 +65,8 @@ foreach(feature IN LISTS ALL_COMPILER_FEATURES)
set(link_options "")
if(${feature} STREQUAL "fixed_point")
list(APPEND compile_options "-ffixed-point")
+ elseif(${feature} STREQUAL "padding_on_unsigned_fixed_point")
+ list(APPEND compile_options "-ffixed-point -Xclang=-fpadding-on-unsigned-fixed-point")
----------------
PiJoules wrote:
Yeah the original intent I had was having a parallel set of tests with this -Xclang flag to ensure more correctness. `-Xclang=-fpadding-on-unsigned-fixed-point` changes the layout for the unsigned fixed point types but the function should be able to work correctly independent of ABI changes. It's hidden since users generally shouldn't really care about the layout. GCC AFAICT doesn't have an equivalent flag.
If it's recommended that internal llvm flags shouldn't be used, then I'm fine with not having tests with this flag. Otherwise, it I think should also be gated on clang being the compiler, `-ffixed-point` being suppported, and this should only be limited to tests.
https://github.com/llvm/llvm-project/pull/125356
More information about the libc-commits
mailing list