summaryrefslogtreecommitdiff
path: root/fib/fib.h
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-06-26 21:48:45 -0700
committerJulian Blake Kongslie2022-06-26 22:06:21 -0700
commite7c2eeb6c82d5341019cbb00cfefc55c8a27f232 (patch)
treed8293bce0cb5323133f849390e60419c16636b18 /fib/fib.h
parentSignificant changes, and a working "ISA" that just computes fib(n). (diff)
downloadissim-e7c2eeb6c82d5341019cbb00cfefc55c8a27f232.tar.xz
Move a bunch of code from headers to separate compilation units.
Diffstat (limited to '')
-rw-r--r--fib/fib.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/fib/fib.h b/fib/fib.h
new file mode 100644
index 0000000..6719d06
--- /dev/null
+++ b/fib/fib.h
@@ -0,0 +1,34 @@
1#pragma once
2
3#include <memory>
4#include <utility>
5
6#include "aisa/aisa.h"
7
8namespace fib {
9
10 namespace Reg {
11
12 enum {
13 ENV_TOP,
14 ENV_FIB,
15
16 AREG,
17 ATMP,
18
19 PC,
20
21 A,
22 B,
23 Q,
24 };
25
26 const char *disasm(aisa::regnum_t x);
27
28 }
29
30 template<unsigned int WORD=1> struct Fib : public aisa::ISA {
31 std::pair<std::unique_ptr<const aisa::Task>, aisa::regval_t> initial_task() const override;
32 };
33
34}