diff options
| author | Julian Blake Kongslie | 2022-10-17 17:55:21 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-10-17 17:55:21 -0700 |
| commit | 94330e8cb98249162594e6febbe8f92cca87e775 (patch) | |
| tree | f4fec3250ae272ab83612585e380532fdc146088 | |
| parent | Clean up address handling and change autoinc to preincrement (diff) | |
| download | biggolf-94330e8cb98249162594e6febbe8f92cca87e775.tar.xz | |
Fix rotate left to not drop the highest bit
| -rw-r--r-- | isa/decode.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/isa/decode.cpp b/isa/decode.cpp index 03e2225..dde5b74 100644 --- a/isa/decode.cpp +++ b/isa/decode.cpp | |||
| @@ -168,9 +168,9 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit | |||
| 168 | } | 168 | } |
| 169 | if (ral && !rar) { | 169 | if (ral && !rar) { |
| 170 | unsigned int x = (ctx.link.value() << 12) | ctx.acc.value(); | 170 | unsigned int x = (ctx.link.value() << 12) | ctx.acc.value(); |
| 171 | x = ((x << 1) & 07777) | (x >> 12); | 171 | x = ((x << 1) & 017777) | (x >> 12); |
| 172 | if (bsw) | 172 | if (bsw) |
| 173 | x = ((x << 1) & 07777) | (x >> 12); | 173 | x = ((x << 1) & 017777) | (x >> 12); |
| 174 | ctx.link = x >> 12; | 174 | ctx.link = x >> 12; |
| 175 | ctx.acc = x & 07777; | 175 | ctx.acc = x & 07777; |
| 176 | } | 176 | } |
