1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

Revert "Userland: static vs non-static constexpr variables"

This reverts commit 800ea8ea96.

Booting the system no longer worked after these changes.
This commit is contained in:
Linus Groh 2021-05-21 10:30:21 +01:00
parent 68f76b9e37
commit d60ebbbba6
38 changed files with 184 additions and 192 deletions

View file

@ -56,11 +56,11 @@ union FloatExtractor;
// This assumes long double is 80 bits, which is true with GCC on Intel platforms
template<>
union FloatExtractor<long double> {
static constexpr int mantissa_bits = 64;
static constexpr unsigned long long mantissa_max = ~0u;
static constexpr int exponent_bias = 16383;
static constexpr int exponent_bits = 15;
static constexpr unsigned exponent_max = 32767;
static const int mantissa_bits = 64;
static const unsigned long long mantissa_max = ~0u;
static const int exponent_bias = 16383;
static const int exponent_bits = 15;
static const unsigned exponent_max = 32767;
struct {
unsigned long long mantissa;
unsigned exponent : 15;
@ -72,11 +72,11 @@ union FloatExtractor<long double> {
template<>
union FloatExtractor<double> {
static constexpr int mantissa_bits = 52;
static constexpr unsigned long long mantissa_max = (1ull << 52) - 1;
static constexpr int exponent_bias = 1023;
static constexpr int exponent_bits = 11;
static constexpr unsigned exponent_max = 2047;
static const int mantissa_bits = 52;
static const unsigned long long mantissa_max = (1ull << 52) - 1;
static const int exponent_bias = 1023;
static const int exponent_bits = 11;
static const unsigned exponent_max = 2047;
struct {
unsigned long long mantissa : 52;
unsigned exponent : 11;
@ -87,11 +87,11 @@ union FloatExtractor<double> {
template<>
union FloatExtractor<float> {
static constexpr int mantissa_bits = 23;
static constexpr unsigned mantissa_max = (1 << 23) - 1;
static constexpr int exponent_bias = 127;
static constexpr int exponent_bits = 8;
static constexpr unsigned exponent_max = 255;
static const int mantissa_bits = 23;
static const unsigned mantissa_max = (1 << 23) - 1;
static const int exponent_bias = 127;
static const int exponent_bits = 8;
static const unsigned exponent_max = 255;
struct {
unsigned long long mantissa : 23;
unsigned exponent : 8;