Remove BootFiles. Setup code needs improving

This commit is contained in:
2023-04-16 21:39:47 +02:00
parent e4657337f9
commit e6042808ee
8 changed files with 13 additions and 102 deletions

View File

@@ -3,34 +3,7 @@
#include "../stdint.h"
namespace JabyEngine {
struct NextRoutine {
static constexpr uintptr_t OverlayBit = (1 << ((sizeof(uintptr_t)*8) - 2));
typedef NextRoutine (*MainRoutine)();
uintptr_t value;
constexpr static NextRoutine null() {
return {.value = 0};
}
static NextRoutine from(MainRoutine function) {
return {.value = reinterpret_cast<uintptr_t>(function)};
}
constexpr bool is_overlay() const {
return (this->value & OverlayBit);
}
constexpr bool is_absolute() const {
return !NextRoutine::is_overlay();
}
constexpr bool is_null() const {
return this->value == 0;
}
};
typedef NextRoutine::MainRoutine MainRoutine;
typedef void (*MainRoutine)();
}
#endif //!__JABYENGINE__HPP__