The only difference between eqsf2 and gtsf2 is whether they return
1 or -1 on NaN. Rather than duplicating all the code, use a macro to
define the function twice and use an argument to decide whether to
negate the return value.
Details
Details
- Reviewers
echristo saugustine mcgrathr - Commits
- rZORG48279361d8cb: [builtins] Deduplicate __eqsf2 and __gtsf2 via macro
rG48279361d8cb: [builtins] Deduplicate __eqsf2 and __gtsf2 via macro
rG48140db79732: [builtins] Deduplicate __eqsf2 and __gtsf2 via macro
rCRT361207: [builtins] Deduplicate __eqsf2 and __gtsf2 via macro
rL361207: [builtins] Deduplicate __eqsf2 and __gtsf2 via macro
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Hi Petr (@phosek),
this change broke 2 of our internal bots that test on older OS/Compilers: MacOS 10.13/Xcode 9.1 and MacOS 10.12/Xcode 8.3.3.
Can you make sense of the following build error?
FAILED: projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.soft_static_armv7m_macho_embedded.dir/arm/comparesf2.S.o /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/builtins -I/Users/buildslave/jenkins/workspace/stash-master-sanitizer-10.13-incremental/clang/src/projects/compiler-rt/lib/builtins -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2 -Iinclude -I/Users/buildslave/jenkins/workspace/stash-master-sanitizer-10.13-incremental/clang/src/include -O2 -g -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk -Oz -Wall -fomit-frame-pointer -ffreestanding -arch armv7m -static -mfloat-abi=soft -MD -MT projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.soft_static_armv7m_macho_embedded.dir/arm/comparesf2.S.o -MF projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.soft_static_armv7m_macho_embedded.dir/arm/comparesf2.S.o.d -o projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.soft_static_armv7m_macho_embedded.dir/arm/comparesf2.S.o -c /Users/buildslave/jenkins/workspace/stash-master-sanitizer-10.13-incremental/clang/src/projects/compiler-rt/lib/builtins/arm/comparesf2.S <instantiation>:4:46: error: unexpected token in directive .thumb ; .subsections_via_symbols ; .globl _ __eqsf2 ; ; .thumb_func ; _ __eqsf2: ^ /Users/buildslave/jenkins/workspace/stash-master-sanitizer-10.13-incremental/clang/src/projects/compiler-rt/lib/builtins/arm/comparesf2.S:88:1: note: while in macro instantiation COMPARESF2_FUNCTION __eqsf2, __eqsf2_handle_nan ^ <instantiation>:4:81: error: unexpected token in argument list .thumb ; .subsections_via_symbols ; .globl _ __eqsf2 ; ; .thumb_func ; _ __eqsf2: ^ /Users/buildslave/jenkins/workspace/stash-master-sanitizer-10.13-incremental/clang/src/projects/compiler-rt/lib/builtins/arm/comparesf2.S:88:1: note: while in macro instantiation COMPARESF2_FUNCTION __eqsf2, __eqsf2_handle_nan ^ <instantiation>:4:46: error: unexpected token in directive .thumb ; .subsections_via_symbols ; .globl _ __gtsf2 ; ; .thumb_func ; _ __gtsf2: ^ /var/folders/dk/vj0dyfmd1kb6tzqbcbmzz58m0000gn/T/comparesf2-16b20c.s:75:1: note: while in macro instantiation COMPARESF2_FUNCTION __gtsf2, __gtsf2_handle_nan ^ <instantiation>:4:81: error: unexpected token in argument list .thumb ; .subsections_via_symbols ; .globl _ __gtsf2 ; ; .thumb_func ; _ __gtsf2: ^ /var/folders/dk/vj0dyfmd1kb6tzqbcbmzz58m0000gn/T/comparesf2-16b20c.s:75:1: note: while in macro instantiation COMPARESF2_FUNCTION __gtsf2, __gtsf2_handle_nan ^