Skip to content

Commit

Permalink
revert compiler rt symbols workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-conway committed Aug 13, 2024
1 parent 18a7534 commit fcdb15f
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 35 deletions.
1 change: 0 additions & 1 deletion Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
#include "WebAssemblyModuleRecord.h"
#include <wtf/BooleanLattice.h>
#include <wtf/CheckedArithmetic.h>
#include <wtf/ForkExtras.h>

namespace JSC { namespace DFG {

Expand Down
1 change: 0 additions & 1 deletion Source/JavaScriptCore/runtime/JSObjectInlines.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "MegamorphicCache.h"
#include "StructureInlines.h"
#include "TypedArrayType.h"
#include <wtf/ForkExtras.h>

namespace JSC {

Expand Down
8 changes: 4 additions & 4 deletions Source/WTF/wtf/Float16.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace WTF {
*/
constexpr float convertFloat16ToFloat32(uint16_t h)
{
#if (CPU(ARM64) || CPU(X86_64)) && defined(__FLT16_MANT_DIG__)
#if HAVE(FLOAT16)
return static_cast<float>(__bit_cast<_Float16>(h));
#else

Expand Down Expand Up @@ -178,7 +178,7 @@ constexpr double convertFloat16ToFloat64(uint16_t h)
*/
constexpr uint16_t convertFloat32ToFloat16(float f)
{
#if (CPU(ARM64) || CPU(X86_64)) && defined(__FLT16_MANT_DIG__)
#if HAVE(FLOAT16)
return __bit_cast<uint16_t>(static_cast<_Float16>(f));
#else
const float scale_to_inf = 0x1.0p+112f; // 0x77800000
Expand Down Expand Up @@ -206,7 +206,7 @@ constexpr uint16_t convertFloat32ToFloat16(float f)
// Adopted from V8's DoubleToFloat16, which adopted from https://gist.github.com/rygorous/2156668.
constexpr uint16_t convertFloat64ToFloat16(double value)
{
#if (CPU(ARM64) || CPU(X86_64)) && defined(__FLT16_MANT_DIG__)
#if HAVE(FLOAT16)
return __bit_cast<uint16_t>(static_cast<_Float16>(value));
#else
// uint64_t constants prefixed with kFP64 are bit patterns of doubles.
Expand Down Expand Up @@ -286,7 +286,7 @@ constexpr uint16_t convertFloat64ToFloat16(double value)
#endif
}

#if (CPU(ARM64) || CPU(X86_64)) && defined(__FLT16_MANT_DIG__)
#if HAVE(FLOAT16)
class Float16 {
public:
constexpr Float16() = default;
Expand Down
28 changes: 0 additions & 28 deletions Source/WTF/wtf/ForkExtras.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,3 @@ typedef struct jsstring_iterator {
#ifdef __cplusplus
}
#endif

#if CPU(X86_64)

#ifndef __extendhfsf2
#if defined(__FLT16_MANT_DIG__)
extern "C" float __extendhfsf2(_Float16 a);
#else
extern "C" float __extendhfsf2(uint16_t a);
#endif
#endif

#ifndef __truncdfhf2
#if defined(__FLT16_MANT_DIG__)
extern "C" _Float16 __truncdfhf2(double a);
#else
extern "C" uint16_t __truncdfhf2(double a);
#endif
#endif

#ifndef __truncsfhf2
#if defined(__FLT16_MANT_DIG__)
extern "C" _Float16 __truncsfhf2(float a);
#else
extern "C" uint16_t __truncsfhf2(float a);
#endif
#endif

#endif
1 change: 0 additions & 1 deletion Source/WTF/wtf/StdLibExtras.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include <wtf/GetPtr.h>
#include <wtf/TypeCasts.h>
#include <bit>
#include <wtf/ForkExtras.h>

#if defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806L
#define __bit_cast std::bit_cast
Expand Down

0 comments on commit fcdb15f

Please sign in to comment.