代码拉取完成,页面将自动刷新
From 31746e50a69db0dff7b5c2f1bff2a2723d4fe229 Mon Sep 17 00:00:00 2001
From: doupengda <doupengda@loongson.cn>
Date: Fri, 10 May 2024 06:47:57 +0000
Subject: [PATCH] mstflint 4.24.0 add support for loongarch64
---
common/compatibility.h | 6 ++++--
mtcr_ul/packets_common.h | 4 +++-
tools_layouts/adb_to_c_utils.h | 4 +++-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/common/compatibility.h b/common/compatibility.h
index e5991c2..ba1a9be 100644
--- a/common/compatibility.h
+++ b/common/compatibility.h
@@ -41,7 +41,7 @@
#include <stdio.h>
-#if defined(__ia64__) || defined(__x86_64__) || defined(__PPC64__) || defined(__arm__)
+#if defined(__ia64__) || defined(__x86_64__) || defined(__PPC64__) || defined(__arm__) || defined(__loongarch64)
#define U64L "l"
#else
#define U64L "ll"
@@ -69,6 +69,8 @@
#define ARCH_arm6l
#elif defined(__riscv)
#define ARCH_riscv
+#elif defined(__loongarch64)
+#define ARCH_loongarch
#else
#error Unknown CPU architecture using the linux OS
#endif
@@ -116,7 +118,7 @@
#define U48H_FMT "0x%012llx"
#define U64D_FMT_GEN "llu"
#endif
-#elif defined(ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(ARCH_arm64) || defined(ARCH_riscv)
+#elif defined(ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(ARCH_arm64) || defined(ARCH_riscv) || defined(ARCH_loongarch)
#define U64D_FMT "%lu"
#define U64H_FMT "0x%016lx"
#define U48H_FMT "0x%012lx"
diff --git a/mtcr_ul/packets_common.h b/mtcr_ul/packets_common.h
index 2ab255f..42ed5e9 100644
--- a/mtcr_ul/packets_common.h
+++ b/mtcr_ul/packets_common.h
@@ -152,6 +152,8 @@
#define ARCH_arm6l
#elif defined(__riscv)
#define ARCH_riscv
+#elif defined(__loongarch64)
+#define ARCH_loongarch
#else
#error Unknown CPU architecture using the linux OS
#endif
@@ -166,7 +168,7 @@
//#if defined (ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(__MINGW64__)
/*
#if !defined(UEFI_BUILD) && (defined (ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(__MINGW64__)
- || defined(ARCH_riscv)) # define U64H_FMT "0x%016lx" # define U64D_FMT "%lu" # define U32H_FMT "0x%08x" # define
+ || defined(ARCH_riscv) || defined(ARCH_loongarch)) # define U64H_FMT "0x%016lx" # define U64D_FMT "%lu" # define U32H_FMT "0x%08x" # define
U16H_FMT "0x%04x" # define U8H_FMT "0x%02x" # define U32D_FMT "%u" # define STR_FMT "%s" #elif defined(ARCH_x86)
|| defined(ARCH_ppc) || defined(__MINGW32__) || defined(UEFI_BUILD) || defined(ARCH_arm6l) defined(ARCH_m68k) ||
defined(ARCH_hppa) # define U64H_FMT "0x%016llx" # define U64D_FMT "%llu" # define U32H_FMT "0x%08x" # define
diff --git a/tools_layouts/adb_to_c_utils.h b/tools_layouts/adb_to_c_utils.h
index 720ed1c..966f14f 100644
--- a/tools_layouts/adb_to_c_utils.h
+++ b/tools_layouts/adb_to_c_utils.h
@@ -146,6 +146,8 @@ extern "C"
#define ARCH_arm6l
#elif defined(__riscv)
#define ARCH_riscv
+#elif defined(__loongarch64)
+#define ARCH_loongarch
#else
#error Unknown CPU architecture using the linux OS
#endif
@@ -188,7 +190,7 @@ extern "C"
#define U64H_FMT "0x%016llx"
#define U48H_FMT "0x%012llx"
#endif
-#elif defined(ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(ARCH_arm64) || defined(ARCH_riscv)
+#elif defined(ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(ARCH_arm64) || defined(ARCH_riscv) || defined(ARCH_loongarch)
#define U64D_FMT "%lu"
#define U64H_FMT "0x%016lx"
#define U48H_FMT "0x%012lx"
--
2.41.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。