aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/alu.cpp
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-12-17 13:31:25 +0100
committerKarel Kočí <cynerd@email.cz>2017-12-17 13:31:25 +0100
commite0c757926743ee21f1a60b4b6948ca3eb895c373 (patch)
treed2acad9475849d5abed15cdd4b6bf3b8d9030f06 /qtmips_machine/alu.cpp
parent7fa050ddefca5373b09bdbcbb3aa0902eacd5d2f (diff)
downloadqtmips-e0c757926743ee21f1a60b4b6948ca3eb895c373.tar.gz
qtmips-e0c757926743ee21f1a60b4b6948ca3eb895c373.tar.bz2
qtmips-e0c757926743ee21f1a60b4b6948ca3eb895c373.zip
Put qtmips_machine to machine namespace
Diffstat (limited to 'qtmips_machine/alu.cpp')
-rw-r--r--qtmips_machine/alu.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/qtmips_machine/alu.cpp b/qtmips_machine/alu.cpp
index d6e7254..f8b919b 100644
--- a/qtmips_machine/alu.cpp
+++ b/qtmips_machine/alu.cpp
@@ -1,7 +1,9 @@
#include "alu.h"
#include "qtmipsexception.h"
-std::uint32_t alu_operate(enum AluOp operation, std::uint32_t s, std::uint32_t t, std::uint8_t sa, Registers *regs) {
+using namespace machine;
+
+std::uint32_t machine::alu_operate(enum AluOp operation, std::uint32_t s, std::uint32_t t, std::uint8_t sa, Registers *regs) {
switch(operation) {
case ALU_OP_SLL:
return t << sa;
@@ -67,7 +69,7 @@ std::uint32_t alu_operate(enum AluOp operation, std::uint32_t s, std::uint32_t t
}
}
-QString alu_str(enum AluOp operation, std::uint32_t s, std::uint32_t t, std::uint8_t sa) {
+QString machine::alu_str(enum AluOp operation, std::uint32_t s, std::uint32_t t, std::uint8_t sa) {
// TODO
return QString("");
}