aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/alu.cpp
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-05 16:39:31 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-05 16:39:31 +0100
commita5506270bc42a950d94a05878d8adfc15cefb464 (patch)
tree9a54528b6a0f8f64572e56de4eafe5576f10a4e9 /qtmips_machine/alu.cpp
parent6528cdb58abcbe432dd387d565c9a1157f90795a (diff)
downloadqtmips-a5506270bc42a950d94a05878d8adfc15cefb464.tar.gz
qtmips-a5506270bc42a950d94a05878d8adfc15cefb464.tar.bz2
qtmips-a5506270bc42a950d94a05878d8adfc15cefb464.zip
Fix fall trough warning of gcc 7+
Diffstat (limited to 'qtmips_machine/alu.cpp')
-rw-r--r--qtmips_machine/alu.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qtmips_machine/alu.cpp b/qtmips_machine/alu.cpp
index 2d5783d..0d40bf0 100644
--- a/qtmips_machine/alu.cpp
+++ b/qtmips_machine/alu.cpp
@@ -1,5 +1,6 @@
#include "alu.h"
#include "qtmipsexception.h"
+#include "utils.h"
using namespace machine;
@@ -42,13 +43,13 @@ std::uint32_t machine::alu_operate(enum AluOp operation, std::uint32_t s, std::u
case ALU_OP_ADD:
if (s > (0xFFFFFFFF - t))
throw QTMIPS_EXCEPTION(Overflow, "ADD operation overflow/underflow", QString::number(s) + QString(" + ") + QString::number(t));
- // Intentional falltrough
+ FALLTROUGH
case ALU_OP_ADDU:
return s + t;
case ALU_OP_SUB:
if (s < t)
throw QTMIPS_EXCEPTION(Overflow, "SUB operation overflow/underflow", QString::number(s) + QString(" - ") + QString::number(t));
- // Intentional falltrough
+ FALLTROUGH
case ALU_OP_SUBU:
return s - t;
case ALU_OP_AND: