From 1437aaf0e56b6edf5807c3f9915fe614b945c16f Mon Sep 17 00:00:00 2001 From: Fanda Vacek Date: Fri, 25 Jan 2019 21:26:52 +0100 Subject: Correct build for LLVM. --- qtmips_cli/qtmips_cli.pro | 2 +- qtmips_gui/qtmips_gui.pro | 2 +- qtmips_machine/core.cpp | 20 ++++++++++---------- qtmips_machine/tests/tests.pro | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/qtmips_cli/qtmips_cli.pro b/qtmips_cli/qtmips_cli.pro index b615991..54f1676 100644 --- a/qtmips_cli/qtmips_cli.pro +++ b/qtmips_cli/qtmips_cli.pro @@ -13,7 +13,7 @@ DOLAR=$ unix: LIBS += \ -Wl,-rpath,\'$${DOLAR}$${DOLAR}ORIGIN/../lib\' \ - --enable-new-dtags \ + # --enable-new-dtags \ INCLUDEPATH += $$PWD/../qtmips_machine DEPENDPATH += $$PWD/../qtmips_machine diff --git a/qtmips_gui/qtmips_gui.pro b/qtmips_gui/qtmips_gui.pro index c941fa5..b15eca1 100644 --- a/qtmips_gui/qtmips_gui.pro +++ b/qtmips_gui/qtmips_gui.pro @@ -11,7 +11,7 @@ DOLAR=$ unix: LIBS += \ -Wl,-rpath,\'$${DOLAR}$${DOLAR}ORIGIN/../lib\' \ - --enable-new-dtags \ + # --enable-new-dtags \ INCLUDEPATH += $$PWD/../qtmips_machine DEPENDPATH += $$PWD/../qtmips_machine diff --git a/qtmips_machine/core.cpp b/qtmips_machine/core.cpp index 35f64af..30d01bb 100644 --- a/qtmips_machine/core.cpp +++ b/qtmips_machine/core.cpp @@ -177,21 +177,21 @@ struct Core::dtDecode Core::decode(const struct dtFetch &dt) { return { .inst = dt.inst, - .memread = flags & IMF_MEMREAD, - .memwrite = flags & IMF_MEMWRITE, - .alusrc = flags & IMF_ALUSRC, + .memread = !!(flags & IMF_MEMREAD), + .memwrite = !!(flags & IMF_MEMWRITE), + .alusrc = !!(flags & IMF_ALUSRC), .regd = regd, .regd31 = regd31, .regwrite = regwrite, - .alu_req_rs = flags & IMF_ALU_REQ_RS, - .alu_req_rt = flags & IMF_ALU_REQ_RT, + .alu_req_rs = !!(flags & IMF_ALU_REQ_RS), + .alu_req_rt = !!(flags & IMF_ALU_REQ_RT), .bjr_req_rs = bjr_req_rs, .bjr_req_rt = bjr_req_rt, - .branch = flags & IMF_BRANCH, - .jump = flags & IMF_JUMP, - .bj_not = flags & IMF_BJ_NOT, - .bgt_blez = flags & IMF_BGTZ_BLEZ, - .nb_skip_ds = flags & IMF_NB_SKIP_DS, + .branch = !!(flags & IMF_BRANCH), + .jump = !!(flags & IMF_JUMP), + .bj_not = !!(flags & IMF_BJ_NOT), + .bgt_blez = !!(flags & IMF_BGTZ_BLEZ), + .nb_skip_ds = !!(flags & IMF_NB_SKIP_DS), .forward_m_d_rs = false, .forward_m_d_rt = false, .aluop = alu_op, diff --git a/qtmips_machine/tests/tests.pro b/qtmips_machine/tests/tests.pro index 63792b0..ec7a129 100644 --- a/qtmips_machine/tests/tests.pro +++ b/qtmips_machine/tests/tests.pro @@ -14,7 +14,7 @@ DOLAR=$ unix: LIBS += \ -Wl,-rpath,\'$${DOLAR}$${DOLAR}ORIGIN/../lib\' \ - --enable-new-dtags \ + # --enable-new-dtags \ INCLUDEPATH += $$PWD/.. DEPENDPATH += $$PWD/.. -- cgit v1.2.3