diff --git a/src/mapleall/maple_be/src/ad/mad.cpp b/src/mapleall/maple_be/src/ad/mad.cpp index 238f6316525ca059ffaea8ede19adbcc785a4e6b..4ebb0076bb9bd0ede1bcc588614ffa0434f0ded9 100644 --- a/src/mapleall/maple_be/src/ad/mad.cpp +++ b/src/mapleall/maple_be/src/ad/mad.cpp @@ -14,7 +14,11 @@ */ #include "mad.h" #include +#if TARGAARCH64 #include "aarch64_operand.h" +#elif TARGRISCV64 +#include "riscv64_operand.h" +#endif #include "schedule.h" #include "insn.h" diff --git a/src/mapleall/maple_be/src/cg/args.cpp b/src/mapleall/maple_be/src/cg/args.cpp index e52886155d0eeebf7ee4dc8767e1f72a7d0bfd05..e1fef0fbb9a8aa8d8460a195b0b9804ce16e6c3c 100644 --- a/src/mapleall/maple_be/src/cg/args.cpp +++ b/src/mapleall/maple_be/src/cg/args.cpp @@ -15,6 +15,8 @@ #include "args.h" #if TARGAARCH64 #include "aarch64_args.h" +#elif TARGRISCV64 +#include "riscv64_args.h" #endif #if TARGARM32 #include "arm32_args.h" diff --git a/src/mapleall/maple_be/src/cg/cfgo.cpp b/src/mapleall/maple_be/src/cg/cfgo.cpp index 4dad1f4b99f5ff316010ad879ab716ce3864308b..b30958f480d6082f5a22459296ab5c057ea36c92 100644 --- a/src/mapleall/maple_be/src/cg/cfgo.cpp +++ b/src/mapleall/maple_be/src/cg/cfgo.cpp @@ -15,7 +15,11 @@ #include "cfgo.h" #include "cgbb.h" #include "cg.h" +#if TARGAARCH64 #include "aarch64_insn.h" +#elif TARGRISCV64 +#include "riscv64_insn.h" +#endif #include "mpl_logging.h" /* diff --git a/src/mapleall/maple_be/src/cg/cg_cfg.cpp b/src/mapleall/maple_be/src/cg/cg_cfg.cpp index d795028c5c5bf01d687d2cf84fbe79426abf8058..6191e38ddc84ac7657222facf444ff12e6a169d4 100644 --- a/src/mapleall/maple_be/src/cg/cg_cfg.cpp +++ b/src/mapleall/maple_be/src/cg/cg_cfg.cpp @@ -15,6 +15,8 @@ #include "cg_cfg.h" #if TARGAARCH64 #include "aarch64_insn.h" +#elif TARGRISCV64 +#include "riscv64_insn.h" #endif #if TARGARM32 #include "arm32_insn.h" diff --git a/src/mapleall/maple_be/src/cg/cg_phasemanager.cpp b/src/mapleall/maple_be/src/cg/cg_phasemanager.cpp index 00250713909f2a3bc85002d32edb8bc9b2085683..5b50618873ef5667b22669cb356f782a150cae34 100644 --- a/src/mapleall/maple_be/src/cg/cg_phasemanager.cpp +++ b/src/mapleall/maple_be/src/cg/cg_phasemanager.cpp @@ -24,7 +24,11 @@ #include "global.h" #include "strldr.h" #include "peep.h" +#if TARGAARCH64 #include "aarch64_fixshortbranch.h" +#elif TARGRISCV64 +#include "riscv64_fixshortbranch.h" +#endif #include "live.h" #include "loop.h" #include "mpl_timer.h" diff --git a/src/mapleall/maple_be/src/cg/ebo.cpp b/src/mapleall/maple_be/src/cg/ebo.cpp index db4fc9b68b41d87d41d4623e591f00148a64ad20..45384e278bee0c7d3b6035f3d8404b47afaf351e 100644 --- a/src/mapleall/maple_be/src/cg/ebo.cpp +++ b/src/mapleall/maple_be/src/cg/ebo.cpp @@ -14,6 +14,8 @@ */ #if TARGAARCH64 #include "aarch64_ebo.h" +#elif TARGRISCV64 +#include "riscv64_ebo.h" #endif #if TARGARM32 #include "arm32_ebo.h" diff --git a/src/mapleall/maple_be/src/cg/global.cpp b/src/mapleall/maple_be/src/cg/global.cpp index 1493b075096c4cd1bfba671af418e3a507016c67..a2f09a71cfef6c8b225c4e566fd5d4a5e4f0c1b8 100644 --- a/src/mapleall/maple_be/src/cg/global.cpp +++ b/src/mapleall/maple_be/src/cg/global.cpp @@ -14,6 +14,8 @@ */ #if TARGAARCH64 #include "aarch64_global.h" +#elif TARGRISCV64 +#include "riscv64_global.h" #endif #if TARGARM32 #include "arm32_global.h" diff --git a/src/mapleall/maple_be/src/cg/ico.cpp b/src/mapleall/maple_be/src/cg/ico.cpp index 9b92a45b6ab5a714814a2f4a919d7b44da91c9b3..adaa4cd37db78a7cb2f264604de1bc4851268136 100644 --- a/src/mapleall/maple_be/src/cg/ico.cpp +++ b/src/mapleall/maple_be/src/cg/ico.cpp @@ -18,6 +18,10 @@ #include "aarch64_ico.h" #include "aarch64_isa.h" #include "aarch64_insn.h" +#elif TARGRISCV64 +#include "riscv64_ico.h" +#include "riscv64_isa.h" +#include "riscv64_insn.h" #elif TARGARM32 #include "arm32_ico.h" #include "arm32_isa.h" diff --git a/src/mapleall/maple_be/src/cg/live.cpp b/src/mapleall/maple_be/src/cg/live.cpp index f1da998956ef2e69f1229fac8bea0c9af9e7806a..364c59e195a3cbca37e3a9b747a9be6fc5161f93 100644 --- a/src/mapleall/maple_be/src/cg/live.cpp +++ b/src/mapleall/maple_be/src/cg/live.cpp @@ -16,6 +16,8 @@ #include #if TARGAARCH64 #include "aarch64_live.h" +#elif TARGRISCV64 +#include "riscv64_live.h" #endif #if TARGARM32 #include "arm32_live.h" diff --git a/src/mapleall/maple_be/src/cg/offset_adjust.cpp b/src/mapleall/maple_be/src/cg/offset_adjust.cpp index e0763773c47fadcea5271690d48d57fd68c11943..3d6e6d284c720e64f85519fdef880c1fe4056fbd 100644 --- a/src/mapleall/maple_be/src/cg/offset_adjust.cpp +++ b/src/mapleall/maple_be/src/cg/offset_adjust.cpp @@ -15,6 +15,8 @@ #include "offset_adjust.h" #if TARGAARCH64 #include "aarch64_offset_adjust.h" +#elif TARGRISCV64 +#include "riscv64_offset_adjust.h" #endif #if TARGARM32 #include "arm32_offset_adjust.h" diff --git a/src/mapleall/maple_be/src/cg/peep.cpp b/src/mapleall/maple_be/src/cg/peep.cpp index 991900287ba9fffd4dd82dad86b5748761877a82..4f3d8fde6d8e2d5d39ab51a194ba04495ee027de 100644 --- a/src/mapleall/maple_be/src/cg/peep.cpp +++ b/src/mapleall/maple_be/src/cg/peep.cpp @@ -18,6 +18,8 @@ #include "common_utils.h" #if TARGAARCH64 #include "aarch64_peep.h" +#elif TARGRISCV64 +#include "riscv64_peep.h" #endif #if TARGARM32 #include "arm32_peep.h" diff --git a/src/mapleall/maple_be/src/cg/pressure.cpp b/src/mapleall/maple_be/src/cg/pressure.cpp index 8fe05f3ba1311abba2e81b910725b9eaf2f69bdb..65369ba5707882185658aad3d6f7271b80210807 100644 --- a/src/mapleall/maple_be/src/cg/pressure.cpp +++ b/src/mapleall/maple_be/src/cg/pressure.cpp @@ -13,7 +13,11 @@ * See the Mulan PSL v2 for more details. */ #include "pressure.h" +#if TARGAARCH64 #include "aarch64_schedule.h" +#elif TARGRISCV64 +#include "riscv64_schedule.h" +#endif #include "deps.h" namespace maplebe { diff --git a/src/mapleall/maple_be/src/cg/proepilog.cpp b/src/mapleall/maple_be/src/cg/proepilog.cpp index b6184685631ce09542e82ea926f2bf8df33212d3..18d86af56c26129b36a87d5670bb303e95c50337 100644 --- a/src/mapleall/maple_be/src/cg/proepilog.cpp +++ b/src/mapleall/maple_be/src/cg/proepilog.cpp @@ -15,6 +15,8 @@ #include "proepilog.h" #if TARGAARCH64 #include "aarch64_proepilog.h" +#elif TARGRISCV64 +#include "riscv64_proepilog.h" #endif #if TARGARM32 #include "arm32_proepilog.h" diff --git a/src/mapleall/maple_be/src/cg/reaching.cpp b/src/mapleall/maple_be/src/cg/reaching.cpp index 7babdea784b09de3965aa2dc6dd9f825d43a20bb..92d6352213d9872e9e2b3cd2eadd0d5388b9b61f 100644 --- a/src/mapleall/maple_be/src/cg/reaching.cpp +++ b/src/mapleall/maple_be/src/cg/reaching.cpp @@ -14,6 +14,8 @@ */ #if TARGAARCH64 #include "aarch64_reaching.h" +#elif TARGRISCV64 +#include "riscv64_reaching.h" #endif #if TARGARM32 #include "arm32_reaching.h" diff --git a/src/mplfe/common/src/mplfe_compiler.cpp b/src/mplfe/common/src/mplfe_compiler.cpp index 9813ec8ccb0e527c46a6b77fe0dd9acc2eaa9493..c5b2f67732aaa4cb126099e27fff2daf6d17d797 100644 --- a/src/mplfe/common/src/mplfe_compiler.cpp +++ b/src/mplfe/common/src/mplfe_compiler.cpp @@ -197,7 +197,7 @@ void MPLFECompiler::ExportMpltFile() { void MPLFECompiler::ExportMplFile() { FETimer timer; timer.StartAndDump("Output mpl"); - module.OutputAsciiMpl("", false); + module.OutputAsciiMpl("", "mpl"); timer.StopAndDumpTimeMS("Output mpl"); }