diff options
| author | Julian Blake Kongslie | 2022-06-26 21:48:45 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-06-26 22:06:21 -0700 |
| commit | e7c2eeb6c82d5341019cbb00cfefc55c8a27f232 (patch) | |
| tree | d8293bce0cb5323133f849390e60419c16636b18 /fib/fib.h | |
| parent | Significant changes, and a working "ISA" that just computes fib(n). (diff) | |
| download | issim-e7c2eeb6c82d5341019cbb00cfefc55c8a27f232.tar.xz | |
Move a bunch of code from headers to separate compilation units.
Diffstat (limited to 'fib/fib.h')
| -rw-r--r-- | fib/fib.h | 34 |
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 | |||
| 8 | namespace 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 | } | ||
