Skip to content

Commit

Permalink
Another attempt.
Browse files Browse the repository at this point in the history
  • Loading branch information
shoops committed Nov 18, 2024
1 parent 2a68867 commit e9d6c81
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/NativeJIT/inc/NativeJIT/CodeGen/Register.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ namespace NativeJIT
class RegisterBase
{
public:
static const unsigned c_maxSize = 8;
static const unsigned c_maxIntegerRegisterID = 16;
static const unsigned c_maxFloatRegisterID = 15;
static constexpr unsigned c_maxSize = 8;
static constexpr unsigned c_maxIntegerRegisterID = 16;
static constexpr unsigned c_maxFloatRegisterID = 15;

protected:
static const unsigned c_maxRegisterID = 16;
Expand Down
8 changes: 2 additions & 6 deletions src/NativeJIT/inc/NativeJIT/ExpressionTreeDecls.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,10 @@ namespace NativeJIT
// the free list for a register and a C++ type respectively.

template <bool ISFLOAT>
class FreeListForRegister
{
template <unsigned REGISTER_COUNT>
static auto Get(ExpressionTree& tree) -> FreeList<REGISTER_COUNT, ISFLOAT>;
};
class FreeListForRegister;

template <typename T>
using FreeListForType = class ExpressionTree::FreeListForRegister<RegisterStorage<T>::c_isFloat>;
using FreeListForType = class ExpressionTree::FreeListForRegister<RegisterStorage<T>::XXXXXXXXX>;

// The allocator and STL-compatible wrapper around it.
Allocators::IAllocator& m_allocator;
Expand Down
1 change: 1 addition & 0 deletions src/NativeJIT/inc/NativeJIT/TypePredicates.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ namespace NativeJIT

static constexpr unsigned c_size = sizeof(UnderlyingType);
static constexpr bool c_isFloat = std::is_floating_point<UnderlyingType>::value;
static constexpr bool XXXXXXXXX = std::is_floating_point<UnderlyingType>::value;

typedef Register<c_size, c_isFloat> RegisterType;
};
Expand Down

0 comments on commit e9d6c81

Please sign in to comment.