121 Star 0 Fork 23

src-openEuler/firebird

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-add-loongarch64-support-for-Firebird.patch 1.97 KB
一键复制 编辑 原始数据 按行查看 历史
From 548dff9c24a92c8da822b593e6302ff7044bc1d5 Mon Sep 17 00:00:00 2001
From: yangxianzhao <[email protected]>
Date: Thu, 18 Jan 2024 16:09:43 +0800
Subject: [PATCH] add loongarch support
---
src/common/classes/DbImplementation.cpp | 1 +
src/common/common.h | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/common/classes/DbImplementation.cpp b/src/common/classes/DbImplementation.cpp
index 95b1e33..4f2def6 100644
--- a/src/common/classes/DbImplementation.cpp
+++ b/src/common/classes/DbImplementation.cpp
@@ -39,6 +39,7 @@ static const UCHAR CpuPowerPc64 = 4;
static const UCHAR CpuMipsel = 5;
static const UCHAR CpuMips = 6;
static const UCHAR CpuArm = 7;
+static const UCHAR CpuLoongarch64 = 19;
static const UCHAR CpuIa64 = 8;
static const UCHAR CpuS390 = 9;
static const UCHAR CpuS390x = 10;
diff --git a/src/common/common.h b/src/common/common.h
index 9fbe954..1a0ef22 100644
--- a/src/common/common.h
+++ b/src/common/common.h
@@ -148,6 +148,10 @@
#define RISC_ALIGNMENT
#endif /* sparc */
+#ifdef _LOONGARCH_ARCH
+#define FB_CPU CpuLoongarch64
+#endif /* loongarch64 */
+
#ifdef MIPSEL
#define FB_CPU CpuMipsel
#endif /* mipsel */
@@ -918,7 +922,7 @@ void GDS_breakpoint(int);
// ASF: Currently, all little-endian are FB_SWAP_DOUBLE and big-endian aren't.
// AP: Define it for your hardware correctly in case your CPU do not follow mentioned rule.
// The follwoing lines are kept for reference only.
-//#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(AMD64) || defined(ARM) || defined(MIPSEL) || defined(DARWIN64) || defined(IA64)
+//#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(AMD64) || defined(ARM) || defined(_LOONGARCH_ARCH) || defined(MIPSEL) || defined(DARWIN64) || defined(IA64)
//#define FB_SWAP_DOUBLE 1
//#elif defined(sparc) || defined(PowerPC) || defined(PPC) || defined(__ppc__) || defined(HPUX) || defined(MIPS) || defined(__ppc64__)
//#define FB_SWAP_DOUBLE 0
--
2.31.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/firebird.git
[email protected]:src-openeuler/firebird.git
src-openeuler
firebird
firebird
master

搜索帮助