diff options
Diffstat (limited to '')
| -rw-r--r-- | isa/decode.cpp | 6 | ||||
| -rw-r--r-- | isa/isa.h | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/isa/decode.cpp b/isa/decode.cpp index c11679c..1496364 100644 --- a/isa/decode.cpp +++ b/isa/decode.cpp | |||
| @@ -185,7 +185,7 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit | |||
| 185 | inst.read_ctlreg = TT_BITS; | 185 | inst.read_ctlreg = TT_BITS; |
| 186 | inst.write_ctlreg = TT_BITS; | 186 | inst.write_ctlreg = TT_BITS; |
| 187 | inst.ef = [](auto &ctx) { | 187 | inst.ef = [](auto &ctx) { |
| 188 | ctx.ctlval.value() |= TTO_FLAG | TTO_FLAG_OLD; | 188 | ctx.ctlval.value() |= TTO_FLAG; |
| 189 | }; | 189 | }; |
| 190 | break; | 190 | break; |
| 191 | case 1: | 191 | case 1: |
| @@ -202,7 +202,7 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit | |||
| 202 | inst.read_ctlreg = TT_BITS; | 202 | inst.read_ctlreg = TT_BITS; |
| 203 | inst.write_ctlreg = TT_BITS; | 203 | inst.write_ctlreg = TT_BITS; |
| 204 | inst.ef = [](auto &ctx) { | 204 | inst.ef = [](auto &ctx) { |
| 205 | ctx.ctlval.value() &= ~TTO_FLAG & ~TTO_FLAG_OLD; | 205 | ctx.ctlval.value() &= ~TTO_FLAG; |
| 206 | }; | 206 | }; |
| 207 | break; | 207 | break; |
| 208 | case 4: | 208 | case 4: |
| @@ -235,7 +235,7 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit | |||
| 235 | inst.ef = [](auto &ctx) { | 235 | inst.ef = [](auto &ctx) { |
| 236 | auto &x = ctx.ctlval.value(); | 236 | auto &x = ctx.ctlval.value(); |
| 237 | auto chr = ctx.acc.value(); | 237 | auto chr = ctx.acc.value(); |
| 238 | x &= ~TTO_FLAG & ~TTO_FLAG_OLD & ~TTO_DATA; | 238 | x &= ~TTO_FLAG & ~TTO_DATA; |
| 239 | x |= (chr << TTO_DATA_SHIFT) & TTO_DATA; | 239 | x |= (chr << TTO_DATA_SHIFT) & TTO_DATA; |
| 240 | x |= TTO_TX; | 240 | x |= TTO_TX; |
| 241 | }; | 241 | }; |
| @@ -30,7 +30,6 @@ const std::map<std::string, ctlreg> ctlreg_map = { | |||
| 30 | static constexpr std::uint_fast32_t TTI_FLAG = 1 << 0; | 30 | static constexpr std::uint_fast32_t TTI_FLAG = 1 << 0; |
| 31 | static constexpr std::uint_fast32_t TTO_TX = 1 << 1; | 31 | static constexpr std::uint_fast32_t TTO_TX = 1 << 1; |
| 32 | static constexpr std::uint_fast32_t TTO_FLAG = 1 << 2; | 32 | static constexpr std::uint_fast32_t TTO_FLAG = 1 << 2; |
| 33 | static constexpr std::uint_fast32_t TTO_FLAG_OLD = 1 << 3; | ||
| 34 | static constexpr unsigned int TTI_DATA_SHIFT = 8; | 33 | static constexpr unsigned int TTI_DATA_SHIFT = 8; |
| 35 | static constexpr unsigned int TTO_DATA_SHIFT = 16; | 34 | static constexpr unsigned int TTO_DATA_SHIFT = 16; |
| 36 | static constexpr std::uint_fast32_t TTI_DATA = 0xff << TTI_DATA_SHIFT; | 35 | static constexpr std::uint_fast32_t TTI_DATA = 0xff << TTI_DATA_SHIFT; |
