aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/core.h
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-11-21 23:37:09 +0100
committerKarel Kočí <cynerd@email.cz>2017-11-21 23:37:09 +0100
commit054225612d13e9a32b7900e423590367b5969b6e (patch)
treeb5ea0b5ea8cb6417f855803ec4fc71d0cb79bc99 /qtmips_machine/core.h
parentc4efaa81d4bf498c721db5cdbf932e7a3bcb0cae (diff)
downloadqtmips-054225612d13e9a32b7900e423590367b5969b6e.tar.gz
qtmips-054225612d13e9a32b7900e423590367b5969b6e.tar.bz2
qtmips-054225612d13e9a32b7900e423590367b5969b6e.zip
Implement some immediate arithmetic instructions
Diffstat (limited to 'qtmips_machine/core.h')
-rw-r--r--qtmips_machine/core.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/qtmips_machine/core.h b/qtmips_machine/core.h
index 5dd5726..9829741 100644
--- a/qtmips_machine/core.h
+++ b/qtmips_machine/core.h
@@ -28,7 +28,7 @@ protected:
Instruction inst;
bool mem2reg; // Write memory output to register (instead alu output)
bool memwrite; // If memory should write input
- bool alubimm; // If b value to alu is immediate value (rt used otherwise)
+ bool alusrc; // If second value to alu is immediate value (rt used otherwise)
bool regd; // If rd is used (otherwise rt is used for write target)
bool regwrite; // If output should be written back to register (which one depends on regd)
bool branch; // If this is branch instruction
@@ -37,13 +37,13 @@ protected:
std::uint32_t val_rt; // Value from register rt
};
struct dtExecute {
- bool mem2reg;
+ bool regwrite;
std::uint8_t rwrite; // Writeback register (multiplexed between rt and rd according to regd)
std::uint32_t alu_val; // Result of ALU execution
// TODO
};
struct dtMemory {
- bool mem2reg;
+ bool regwrite;
std::uint8_t rwrite;
std::uint32_t alu_val;
// TODO