diff options
| author | Julian Blake Kongslie | 2022-10-22 22:53:26 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-10-22 22:53:26 -0700 |
| commit | 763beb022c799598ef4eaa9750ad259497bd2e84 (patch) | |
| tree | 3e436e523f3270aa8040d192b993c5bf85298186 /isa/isa.h | |
| parent | Fix rotate left to not drop the highest bit (diff) | |
| download | biggolf-763beb022c799598ef4eaa9750ad259497bd2e84.tar.xz | |
Merge TT_INPUT and TT_OUTPUT into TT_BITS
Diffstat (limited to 'isa/isa.h')
| -rw-r--r-- | isa/isa.h | 13 |
1 files changed, 11 insertions, 2 deletions
| @@ -8,14 +8,23 @@ enum ctlreg { | |||
| 8 | DATA_INSTRUCTION_FIELD_SAVED, // (df_saved << 3) | if_saved | 8 | DATA_INSTRUCTION_FIELD_SAVED, // (df_saved << 3) | if_saved |
| 9 | HALTED, | 9 | HALTED, |
| 10 | INT_ENABLE, // (int_enable_delay << 1) | int_enable | 10 | INT_ENABLE, // (int_enable_delay << 1) | int_enable |
| 11 | TT_INPUT, // (tti_flag << 8) | tti_buffer | 11 | TT_BITS, // see below TT[IO]_* consts |
| 12 | TT_INPUT_INT_ENABLE, | 12 | TT_INPUT_INT_ENABLE, |
| 13 | TT_OUTPUT, // {tto_flag_old, tto_flag, tto_tx, tto_data} | ||
| 14 | TT_OUTPUT_INT_ENABLE, | 13 | TT_OUTPUT_INT_ENABLE, |
| 15 | 14 | ||
| 16 | NUM_CTLREGS, | 15 | NUM_CTLREGS, |
| 17 | }; | 16 | }; |
| 18 | 17 | ||
| 18 | // TT_BITS | ||
| 19 | static constexpr unsigned int TTI_FLAG = 1 << 0; | ||
| 20 | static constexpr unsigned int TTO_TX = 1 << 1; | ||
| 21 | static constexpr unsigned int TTO_FLAG = 1 << 2; | ||
| 22 | static constexpr unsigned int TTO_FLAG_OLD = 1 << 3; | ||
| 23 | static constexpr unsigned int TTI_DATA_SHIFT = 8; | ||
| 24 | static constexpr unsigned int TTO_DATA_SHIFT = 16; | ||
| 25 | static constexpr unsigned int TTI_DATA = 0xff << TTI_DATA_SHIFT; | ||
| 26 | static constexpr unsigned int TTO_DATA = 0xff << TTO_DATA_SHIFT; | ||
| 27 | |||
| 19 | struct instruction_context { | 28 | struct instruction_context { |
| 20 | // Known statically at decode time | 29 | // Known statically at decode time |
| 21 | bool need_indirect_load = false; // final_address = mem[init_address] | 30 | bool need_indirect_load = false; // final_address = mem[init_address] |
