diff options
| author | Root THC | 2026-02-24 12:42:47 +0000 |
|---|---|---|
| committer | Root THC | 2026-02-24 12:42:47 +0000 |
| commit | c9cbeced5b3f2bdd7407e29c0811e65954132540 (patch) | |
| tree | aefc355416b561111819de159ccbd86c3004cf88 /other/Kermit/include/arch.hpp | |
| parent | 073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff) | |
initial
Diffstat (limited to 'other/Kermit/include/arch.hpp')
| -rw-r--r-- | other/Kermit/include/arch.hpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/other/Kermit/include/arch.hpp b/other/Kermit/include/arch.hpp new file mode 100644 index 0000000..3ac1a90 --- /dev/null +++ b/other/Kermit/include/arch.hpp | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* | ||
| 2 | * maybe used for porting ... | ||
| 3 | * (ignore this file.) | ||
| 4 | */ | ||
| 5 | #ifdef __ALWAYS_UNDEFINED | ||
| 6 | template <class Ad_t, bool BE, unsigned short A> | ||
| 7 | class Architecture | ||
| 8 | { | ||
| 9 | private: | ||
| 10 | le_replace (unsigned char *, AddressType); | ||
| 11 | be_replace (unsigned char *, AddressType); | ||
| 12 | |||
| 13 | public: | ||
| 14 | typedef Ad_t AddressType; /* type capable for holding a memory address as integer */ | ||
| 15 | bool BigEndian; /* true if machine uses big endian */ | ||
| 16 | unsigned short Align; /* data alignment - needed? (sanity checks) */ | ||
| 17 | |||
| 18 | Architecture () | ||
| 19 | { | ||
| 20 | BigEndian = BE; | ||
| 21 | Align = A; | ||
| 22 | } | ||
| 23 | |||
| 24 | replaceAddress (unsigned char *, AddressType); | ||
| 25 | }; | ||
| 26 | |||
| 27 | |||
| 28 | Architecture<unsigned int, false, 4> x86; | ||
| 29 | // ... | ||
| 30 | |||
| 31 | #define x86 this_arch; | ||
| 32 | #endif | ||
