Skip to content

Commit

Permalink
[libc] Undo accidental changes to dsubl that were leftoever
Browse files Browse the repository at this point in the history
  • Loading branch information
jhuber6 committed Aug 12, 2024
1 parent dc2f39e commit ee5d572
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
2 changes: 0 additions & 2 deletions libc/src/math/generic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ add_entrypoint_object(
COMPILE_OPTIONS
-O3
DEPENDS
libc.src.__support.macros.properties.types
libc.src.__support.FPUtil.generic.add_sub
)

Expand Down Expand Up @@ -251,7 +250,6 @@ add_entrypoint_object(
HDRS
../dsubl.h
DEPENDS
libc.src.__support.macros.properties.types
libc.src.__support.FPUtil.generic.add_sub
COMPILE_OPTIONS
-O3
Expand Down
5 changes: 0 additions & 5 deletions libc/src/math/generic/daddl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@
#include "src/__support/FPUtil/generic/add_sub.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"

namespace LIBC_NAMESPACE_DECL {

LLVM_LIBC_FUNCTION(double, daddl, (long double x, long double y)) {
#ifdef LIBC_TYPES_LONG_DOUBLE_IS_FLOAT64
return static_cast<double>(x) + static_cast<double>(y);
#else
return fputil::generic::add<double>(x, y);
#endif
}

} // namespace LIBC_NAMESPACE_DECL
7 changes: 1 addition & 6 deletions libc/src/math/generic/dsubl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@
#include "src/__support/FPUtil/generic/add_sub.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"

namespace LIBC_NAMESPACE_DECL {

LLVM_LIBC_FUNCTION(double, dsubl, (long double x, long double y)) {
#ifdef LIBC_TYPES_LONG_DOUBLE_IS_FLOAT64
return static_cast<double>(x) - static_cast<double>(y);
#else
return fputil::generic::add<double>(x, y);
#endif
return fputil::generic::sub<double>(x, y);
}

} // namespace LIBC_NAMESPACE_DECL

0 comments on commit ee5d572

Please sign in to comment.