summaryrefslogtreecommitdiff
path: root/other/Kermit/include/arch.hpp
diff options
context:
space:
mode:
authorRoot THC2026-02-24 12:42:47 +0000
committerRoot THC2026-02-24 12:42:47 +0000
commitc9cbeced5b3f2bdd7407e29c0811e65954132540 (patch)
treeaefc355416b561111819de159ccbd86c3004cf88 /other/Kermit/include/arch.hpp
parent073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff)
initial
Diffstat (limited to 'other/Kermit/include/arch.hpp')
-rw-r--r--other/Kermit/include/arch.hpp32
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
6template <class Ad_t, bool BE, unsigned short A>
7class Architecture
8{
9private:
10 le_replace (unsigned char *, AddressType);
11 be_replace (unsigned char *, AddressType);
12
13public:
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
28Architecture<unsigned int, false, 4> x86;
29// ...
30
31#define x86 this_arch;
32#endif