commit 34933f3caa44064521ad571fa5381f1ddb01640e
parent 0feed5fef9e151f73fb0c657b8f80231d851ff81
Author: Ryan Jeffrey <ryan@ryanmj.xyz>
Date: Fri, 16 Dec 2022 10:40:31 -0800
minor fixes
Diffstat:
3 files changed, 34 insertions(+), 10 deletions(-)
diff --git a/src/commit.rs b/src/commit.rs
@@ -0,0 +1,23 @@
+// Instruction commit. The final step in the three stage RISC II pipeline.
+// See `decode.rs` for the first step and `execute.rs` for the second step
+// of the pipeline.
+// See `decode.rs` for the first step, and `commit.rs` for the third step.
+// (C) Ryan Jeffrey <ryan@ryanmj.xyz>, 2022
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or (at
+// your option) any later version.
+
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+use instruction::*;
+
+// Public functions.
+
+pub fn commit() {}
diff --git a/src/data_path.rs b/src/data_path.rs
@@ -354,23 +354,23 @@ impl DataPath {
// Match opcode's prefix.
match opcode >> 4 {
0 => match opcode & 0xf {
- 1 => {
+ 0x1 => {
// Calli TODO.
}
- 2 => {
+ 0x2 => {
// GetPSW
}
- 3 => {
+ 0x3 => {
// GetLPC
}
- 4 => {
+ 0x4 => {
// PutPSW
dst_is_psw = true;
}
- 8 => {
+ 0x8 => {
// Callx
}
- 9 => {
+ 0x9 => {
// Callr
long = true;
immediate = true;
@@ -389,7 +389,7 @@ impl DataPath {
],
};
}
- 12 => {
+ 0xc => {
// Jmpx
result = InstructionCycle {
0: [
@@ -405,15 +405,15 @@ impl DataPath {
],
};
}
- 13 => {
+ 0xd => {
// Jmpr
long = true;
immediate = true;
}
- 14 => {
+ 0xe => {
// Ret
}
- 15 => {
+ 0xf => {
// Reti
}
_ => {}
diff --git a/src/encode.rs b/src/encode.rs
@@ -0,0 +1 @@
+