Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
6ea9991d
O
oceanbase
项目概览
Metz
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
6ea9991d
编写于
4月 18, 2022
作者:
W
Wu Xiaotian
提交者:
GitHub
4月 18, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add support for loongarch64 (#851)
上级
047868e3
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
340 addition
and
17 deletion
+340
-17
cmake/Env.cmake
cmake/Env.cmake
+3
-0
deps/easy/src/include/easy_atomic.h
deps/easy/src/include/easy_atomic.h
+6
-2
deps/easy/src/io/ev.c
deps/easy/src/io/ev.c
+1
-1
deps/easy/src/util/easy_time.c
deps/easy/src/util/easy_time.c
+2
-2
deps/oblib/src/lib/CMakeLists.txt
deps/oblib/src/lib/CMakeLists.txt
+3
-0
deps/oblib/src/lib/async/ev.c
deps/oblib/src/lib/async/ev.c
+2
-0
deps/oblib/src/lib/atomic/atomic128.h
deps/oblib/src/lib/atomic/atomic128.h
+1
-1
deps/oblib/src/lib/atomic/ob_atomic.h
deps/oblib/src/lib/atomic/ob_atomic.h
+1
-1
deps/oblib/src/lib/checksum/ob_crc64.cpp
deps/oblib/src/lib/checksum/ob_crc64.cpp
+4
-1
deps/oblib/src/lib/coro/co_utils.h
deps/oblib/src/lib/coro/co_utils.h
+1
-6
deps/oblib/src/lib/coro/context/asm/jump_loongarch64_sysv_elf_gas.S
.../src/lib/coro/context/asm/jump_loongarch64_sysv_elf_gas.S
+121
-0
deps/oblib/src/lib/coro/context/asm/make_loongarch64_sysv_elf_gas.S
.../src/lib/coro/context/asm/make_loongarch64_sysv_elf_gas.S
+72
-0
deps/oblib/src/lib/coro/context/asm/ontop_loongarch64_sysv_elf_gas.S
...src/lib/coro/context/asm/ontop_loongarch64_sysv_elf_gas.S
+118
-0
deps/oblib/src/lib/list/ob_atomic_list.h
deps/oblib/src/lib/list/ob_atomic_list.h
+1
-1
deps/oblib/src/lib/utility/utility.h
deps/oblib/src/lib/utility/utility.h
+2
-0
src/election/ob_election.h
src/election/ob_election.h
+1
-1
src/election/ob_election_group.h
src/election/ob_election_group.h
+1
-1
未找到文件。
cmake/Env.cmake
浏览文件 @
6ea9991d
...
...
@@ -119,6 +119,9 @@ elseif(${ARCHITECTURE} STREQUAL "aarch64")
set
(
MARCH_CFLAGS
"-march=armv8-a+crc"
)
set
(
MTUNE_CFLAGS
"-mtune=generic"
)
set
(
ARCH_LDFLAGS
"-latomic"
)
elseif
(
${
ARCHITECTURE
}
STREQUAL
"loongarch64"
)
set
(
MARCH_CFLAGS
"-march=la464"
)
set
(
MTUNE_CFLAGS
"-mabi=lp64d"
)
else
()
message
(
FATAL_ERROR
"UNSUPPORT BUILD ARCH:
${
ARCHITECTURE
}
"
)
endif
()
deps/easy/src/include/easy_atomic.h
浏览文件 @
6ea9991d
...
...
@@ -95,8 +95,8 @@ static __inline__ void easy_spin_lock(easy_atomic_t* lock)
__asm__
(
".byte 0xf3, 0x90"
);
#elif defined(__aarch64__)
__asm__
(
"yield"
);
// for ARM
#elif defined(__sw_64__)
//
sw currently not provide related opcode
#elif defined(__sw_64__)
|| defined(__loongarch64)
//
These platforms currently do not natively support such operation
#else
#error arch unsupported
#endif
...
...
@@ -158,6 +158,8 @@ static __inline__ int easy_spinrwlock_rdlock(easy_spinrwlock_t* lock)
asm
(
"pause"
);
#elif defined(__aarch64__)
asm
(
"yield"
);
// for ARM
#elif defined(__sw_64__) || defined(__loongarch64)
// These platforms currently do not natively support such operation
#else
#error arch unsupported
#endif
...
...
@@ -199,6 +201,8 @@ static __inline__ int easy_spinrwlock_wrlock(easy_spinrwlock_t* lock)
asm
(
"pause"
);
#elif defined(__aarch64__)
asm
(
"yield"
);
// for ARM
#elif defined(__sw_64__) || defined(__loongarch64)
// These platforms currently do not natively support such operation
#else
#error arch unsupported
#endif
...
...
deps/easy/src/io/ev.c
浏览文件 @
6ea9991d
...
...
@@ -531,7 +531,7 @@ EV_CPP(extern "C" {
#define ev_mb() __asm__ __volatile ("mfence" ::: "memory")
#elif defined(__aarch64__)
#define ev_mb() __asm__ __volatile ("dsb sy" ::: "memory") //for ARM
#elif defined(__sw_64__)
#elif defined(__sw_64__)
|| defined(__loongarch64)
#define ev_mb() __sync_synchronize()
#else
#error arch unsupported
...
...
deps/easy/src/util/easy_time.c
浏览文件 @
6ea9991d
...
...
@@ -139,7 +139,7 @@ static __inline__ uint64_t rdtscp()
__asm__
__volatile__
(
"rdtscp"
:
"=a"
(
rax
),
"=d"
(
rdx
)
::
"%rcx"
);
return
(
rdx
<<
32
)
+
rax
;
}
#elif defined(__sw_64__)
#elif defined(__sw_64__)
|| defined(__loongarch64)
static
__inline__
uint64_t
rdtsc
()
{
return
(
uint64_t
)
easy_time_now
();
...
...
@@ -163,7 +163,7 @@ static __inline__ uint64_t rdtsc()
#endif
#if defined(__x86_64__) || defined(__sw_64__)
#if defined(__x86_64__) || defined(__sw_64__)
|| defined(__loongarch64)
uint64_t
get_cpufreq_khz
()
{
char
line
[
256
];
...
...
deps/oblib/src/lib/CMakeLists.txt
浏览文件 @
6ea9991d
...
...
@@ -26,6 +26,9 @@ ob_lib_add_target(oblib_lib_coro_context
coro/context/asm/make_sw_64_sysv_elf_gas.S
coro/context/asm/jump_sw_64_sysv_elf_gas.S
coro/context/asm/ontop_sw_64_aapcs_elf_gas.S
coro/context/asm/jump_loongarch64_sysv_elf_gas.S
coro/context/asm/make_loongarch64_sysv_elf_gas.S
coro/context/asm/ontop_loongarch64_sysv_elf_gas.S
)
disable_pch
(
oblib_lib_coro_context
)
...
...
deps/oblib/src/lib/async/ev.c
浏览文件 @
6ea9991d
...
...
@@ -711,6 +711,8 @@ struct signalfd_siginfo
#define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
#elif defined __ia64__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("mf" : : : "memory")
#elif defined __loongarch__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("dbar 0" : : : "memory")
#elif defined __m68k__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("" : : : "memory")
#elif defined __m88k__
...
...
deps/oblib/src/lib/atomic/atomic128.h
浏览文件 @
6ea9991d
...
...
@@ -85,7 +85,7 @@ inline void load128(__uint128_t& target, types::uint128_t* source)
__ATOMIC_SEQ_CST)
#define LOAD128(dest, src) __atomic_load(((types::uint128_t*)(src)), ((types::uint128_t*)(&(dest))), __ATOMIC_SEQ_CST)
#elif defined(__sw_64__)
#elif defined(__sw_64__)
|| defined(__loongarch64)
inline
bool
cas128
(
volatile
types
::
uint128_t
*
target
,
types
::
uint128_t
*
cmp
,
types
::
uint128_t
with
)
{
int
ret
=
0
;
...
...
deps/oblib/src/lib/atomic/ob_atomic.h
浏览文件 @
6ea9991d
...
...
@@ -36,7 +36,7 @@ namespace common {
OB_ATOMIC_EVENT(atomic_pause); \
asm("yield\n"); \
}) // for ARM
#elif defined(__sw_64__)
#elif defined(__sw_64__)
|| defined(__loongarch64)
#define WEAK_BARRIER() __sync_synchronize()
#define PAUSE()
#else
...
...
deps/oblib/src/lib/checksum/ob_crc64.cpp
浏览文件 @
6ea9991d
...
...
@@ -422,6 +422,9 @@ for RHEL4 support (GCC 3 doesn't support this instruction) */
#define crc32_sse42_byte \
crc = __crc32cb(crc, (uint8_t)*buf); \
len--, buf++
#elif defined(__loongarch64)
#define crc32_sse42_byte nullptr
#define crc32_sse42_quadword nullptr
#elif defined(__sw_64__)
#define crc32_sse42_byte nullptr
...
...
@@ -2849,7 +2852,7 @@ uint64_t crc64_sse42_dispatch(uint64_t crc, const char* buf, int64_t len)
ob_crc64_sse42_func
=
&
fast_crc64_sse42_manually
;
_OB_LOG
(
INFO
,
"Use manual crc32 table lookup for crc64 calculate"
);
#endif
#elif defined(__sw_64__)
#elif defined(__sw_64__)
|| defined(__loongarch64)
ob_crc64_sse42_func
=
&
fast_crc64_sse42_manually
;
_OB_LOG
(
INFO
,
"Use manual crc32 table lookup for crc64 calculate"
);
#else
...
...
deps/oblib/src/lib/coro/co_utils.h
浏览文件 @
6ea9991d
...
...
@@ -73,7 +73,7 @@ OB_INLINE int64_t co_current_time()
return
now
;
}
#if defined(__x86_64__)
#if defined(__
loongarch64) || defined(__sw_64__) || defined(__
x86_64__)
OB_INLINE
uint64_t
co_rdtscp
(
void
)
{
return
co_current_time
()
*
1000
;
...
...
@@ -86,11 +86,6 @@ OB_INLINE uint64_t co_rdtscp(void)
asm
volatile
(
"mrs %0, cntvct_el0"
:
"=r"
(
virtual_timer_value
));
return
virtual_timer_value
;
}
#elif defined(__sw_64__)
OB_INLINE
uint64_t
co_rdtscp
(
void
)
{
return
co_current_time
()
*
1000
;
}
#else
#error arch unsupported
#endif
...
...
deps/oblib/src/lib/coro/context/asm/jump_loongarch64_sysv_elf_gas.S
0 → 100644
浏览文件 @
6ea9991d
/*******************************************************
*
*
*
-------------------------------------------------
*
*
| 0 |
1
| 2 |
3
| 4 |
5
| 6 |
7
|
*
*
-------------------------------------------------
*
*
| 0 |
8
| 16 |
24
|
*
*
-------------------------------------------------
*
*
| FS0 |
FS1
| FS2 |
FS3
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 8 |
9
| 10 |
11
| 12 |
13
| 14 |
15
|
*
*
-------------------------------------------------
*
*
| 32 |
40
| 48 |
56
|
*
*
-------------------------------------------------
*
*
| FS4 |
FS5
| FS6 |
FS7
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 16 |
17
| 18 |
19
| 20 |
21
| 22 |
23
|
*
*
-------------------------------------------------
*
*
| 64 |
72
| 80 |
88
|
*
*
-------------------------------------------------
*
*
| S0 |
S1
| S2 |
S3
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 24 |
25
| 26 |
27
| 28 |
29
| 30 |
31
|
*
*
-------------------------------------------------
*
*
| 96 |
100
| 104 |
108
| 112 |
116
| 120 |
124
|
*
*
-------------------------------------------------
*
*
| S4 |
S5
| S6 |
S7
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 32 |
33
| 34 |
35
| 36 |
37
| 38 |
39
|
*
*
-------------------------------------------------
*
*
| 128 |
132
| 136 |
140
| 144 |
148
| 152 |
156
|
*
*
-------------------------------------------------
*
*
| S8 |
FP
| RA |
PC
|
*
*
-------------------------------------------------
*
*
*
*
*****************************************************/
.
file
"
jump_loongarch64_sysv_elf_gas
.
S
"
.
text
.
globl
jump_fcontext
.
align
2
.
type
jump_fcontext
,@
function
jump_fcontext
:
#
reserve
space
on
stack
addi.d
$sp
,
$sp
,
-
160
#
save
fs0
-
fs7
fst.d
$fs0
,
$sp
,
0
fst.d
$fs1
,
$sp
,
8
fst.d
$fs2
,
$sp
,
16
fst.d
$fs3
,
$sp
,
24
fst.d
$fs4
,
$sp
,
32
fst.d
$fs5
,
$sp
,
40
fst.d
$fs6
,
$sp
,
48
fst.d
$fs7
,
$sp
,
56
#
save
s0
-
s8
,
fp
,
ra
st.d
$s0
,
$sp
,
64
st.d
$s1
,
$sp
,
72
st.d
$s2
,
$sp
,
80
st.d
$s3
,
$sp
,
88
st.d
$s4
,
$sp
,
96
st.d
$s5
,
$sp
,
104
st.d
$s6
,
$sp
,
112
st.d
$s7
,
$sp
,
120
st.d
$s8
,
$sp
,
128
st.d
$fp
,
$sp
,
136
st.d
$ra
,
$sp
,
144
#
save
RA
as
PC
st.d
$ra
,
$sp
,
152
#
store
SP
(
pointing
to
context
-
data
)
in
A2
move
$a2
,
$sp
#
restore
SP
(
pointing
to
context
-
data
)
from
A0
move
$sp
,
$a0
#
load
fs0
-
fs7
fld.d
$fs0
,
$sp
,
0
fld.d
$fs1
,
$sp
,
8
fld.d
$fs2
,
$sp
,
16
fld.d
$fs3
,
$sp
,
24
fld.d
$fs4
,
$sp
,
32
fld.d
$fs5
,
$sp
,
40
fld.d
$fs6
,
$sp
,
48
fld.d
$fs7
,
$sp
,
56
#
load
s0
-
s8
,
fp
,
ra
ld.d
$s0
,
$sp
,
64
ld.d
$s1
,
$sp
,
72
ld.d
$s2
,
$sp
,
80
ld.d
$s3
,
$sp
,
88
ld.d
$s4
,
$sp
,
96
ld.d
$s5
,
$sp
,
104
ld.d
$s6
,
$sp
,
112
ld.d
$s7
,
$sp
,
120
ld.d
$s8
,
$sp
,
128
ld.d
$fp
,
$sp
,
136
ld.d
$ra
,
$sp
,
144
#
return
transfer_t
from
jump
#
pass
transfer_t
as
first
arg
in
context
function
#
a0
==
FCTX
,
a1
==
DATA
move
$a0
,
$a2
#
load
PC
ld.d
$a2
,
$sp
,
152
#
restore
stack
addi.d
$sp
,
$sp
,
160
#
jump
to
context
jr
$a2
.
size
jump_fcontext
,
.
-
jump_fcontext
/*
Mark
that
we
don
't need executable stack. */
.
section
.
note.GNU
-
stack
,"",%
progbits
deps/oblib/src/lib/coro/context/asm/make_loongarch64_sysv_elf_gas.S
0 → 100644
浏览文件 @
6ea9991d
/*******************************************************
*
*
*
-------------------------------------------------
*
*
| 0 |
1
| 2 |
3
| 4 |
5
| 6 |
7
|
*
*
-------------------------------------------------
*
*
| 0 |
8
| 16 |
24
|
*
*
-------------------------------------------------
*
*
| FS0 |
FS1
| FS2 |
FS3
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 8 |
9
| 10 |
11
| 12 |
13
| 14 |
15
|
*
*
-------------------------------------------------
*
*
| 32 |
40
| 48 |
56
|
*
*
-------------------------------------------------
*
*
| FS4 |
FS5
| FS6 |
FS7
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 16 |
17
| 18 |
19
| 20 |
21
| 22 |
23
|
*
*
-------------------------------------------------
*
*
| 64 |
72
| 80 |
88
|
*
*
-------------------------------------------------
*
*
| S0 |
S1
| S2 |
S3
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 24 |
25
| 26 |
27
| 28 |
29
| 30 |
31
|
*
*
-------------------------------------------------
*
*
| 96 |
100
| 104 |
108
| 112 |
116
| 120 |
124
|
*
*
-------------------------------------------------
*
*
| S4 |
S5
| S6 |
S7
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 32 |
33
| 34 |
35
| 36 |
37
| 38 |
39
|
*
*
-------------------------------------------------
*
*
| 128 |
132
| 136 |
140
| 144 |
148
| 152 |
156
|
*
*
-------------------------------------------------
*
*
| S8 |
FP
| RA |
PC
|
*
*
-------------------------------------------------
*
*
*
*
*****************************************************/
.
file
"
make_loongarch64_sysv_elf_gas
.
S
"
.
text
.
globl
make_fcontext
.
align
2
.
type
make_fcontext
,@
function
make_fcontext
:
#
shift
address
in
A0
to
lower
16
byte
boundary
bstrins.d
$a0
,
$zero
,
3
,
0
#
reserve
space
for
context
-
data
on
context
-
stack
addi.d
$a0
,
$a0
,
-
160
#
third
arg
of
make_fcontext
()
==
address
of
context
-
function
st.d
$a2
,
$a0
,
152
#
save
address
of
finish
as
return
-
address
for
context
-
function
#
will
be
entered
after
context
-
function
returns
la.local
$a4
,
finish
st.d
$a4
,
$a0
,
144
#
return
pointer
to
context
-
data
jr
$ra
finish
:
#
exit
code
is
zero
li.d
$a0
,
0
#
call
_exit
(
0
)
b
%
plt
(
_exit
)
.
size
make_fcontext
,
.
-
make_fcontext
/*
Mark
that
we
don
't need executable stack. */
.
section
.
note.GNU
-
stack
,"",%
progbits
deps/oblib/src/lib/coro/context/asm/ontop_loongarch64_sysv_elf_gas.S
0 → 100644
浏览文件 @
6ea9991d
/*******************************************************
*
*
*
-------------------------------------------------
*
*
| 0 |
1
| 2 |
3
| 4 |
5
| 6 |
7
|
*
*
-------------------------------------------------
*
*
| 0 |
8
| 16 |
24
|
*
*
-------------------------------------------------
*
*
| FS0 |
FS1
| FS2 |
FS3
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 8 |
9
| 10 |
11
| 12 |
13
| 14 |
15
|
*
*
-------------------------------------------------
*
*
| 32 |
40
| 48 |
56
|
*
*
-------------------------------------------------
*
*
| FS4 |
FS5
| FS6 |
FS7
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 16 |
17
| 18 |
19
| 20 |
21
| 22 |
23
|
*
*
-------------------------------------------------
*
*
| 64 |
72
| 80 |
88
|
*
*
-------------------------------------------------
*
*
| S0 |
S1
| S2 |
S3
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 24 |
25
| 26 |
27
| 28 |
29
| 30 |
31
|
*
*
-------------------------------------------------
*
*
| 96 |
100
| 104 |
108
| 112 |
116
| 120 |
124
|
*
*
-------------------------------------------------
*
*
| S4 |
S5
| S6 |
S7
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 32 |
33
| 34 |
35
| 36 |
37
| 38 |
39
|
*
*
-------------------------------------------------
*
*
| 128 |
132
| 136 |
140
| 144 |
148
| 152 |
156
|
*
*
-------------------------------------------------
*
*
| S8 |
FP
| RA |
PC
|
*
*
-------------------------------------------------
*
*
*
*
*****************************************************/
.
file
"
ontop_loongarch64_sysv_elf_gas
.
S
"
.
text
.
globl
ontop_fcontext
.
align
2
.
type
ontop_fcontext
,@
function
ontop_fcontext
:
#
reserve
space
on
stack
addi.d
$sp
,
$sp
,
-
160
#
save
fs0
-
fs7
fst.d
$fs0
,
$sp
,
0
fst.d
$fs1
,
$sp
,
8
fst.d
$fs2
,
$sp
,
16
fst.d
$fs3
,
$sp
,
24
fst.d
$fs4
,
$sp
,
32
fst.d
$fs5
,
$sp
,
40
fst.d
$fs6
,
$sp
,
48
fst.d
$fs7
,
$sp
,
56
#
save
s0
-
s8
,
fp
,
ra
st.d
$s0
,
$sp
,
64
st.d
$s1
,
$sp
,
72
st.d
$s2
,
$sp
,
80
st.d
$s3
,
$sp
,
88
st.d
$s4
,
$sp
,
96
st.d
$s5
,
$sp
,
104
st.d
$s6
,
$sp
,
112
st.d
$s7
,
$sp
,
120
st.d
$s8
,
$sp
,
128
st.d
$fp
,
$sp
,
136
st.d
$ra
,
$sp
,
144
#
save
RA
as
PC
st.d
$ra
,
$sp
,
152
#
store
SP
(
pointing
to
context
-
data
)
in
A3
move
$a3
,
$sp
#
restore
SP
(
pointing
to
context
-
data
)
from
A0
move
$sp
,
$a0
#
load
fs0
-
fs11
fld.d
$fs0
,
$sp
,
0
fld.d
$fs1
,
$sp
,
8
fld.d
$fs2
,
$sp
,
16
fld.d
$fs3
,
$sp
,
24
fld.d
$fs4
,
$sp
,
32
fld.d
$fs5
,
$sp
,
40
fld.d
$fs6
,
$sp
,
48
fld.d
$fs7
,
$sp
,
56
#
load
s0
-
s11
,
fp
,
ra
ld.d
$s0
,
$sp
,
64
ld.d
$s1
,
$sp
,
72
ld.d
$s2
,
$sp
,
80
ld.d
$s3
,
$sp
,
88
ld.d
$s4
,
$sp
,
96
ld.d
$s5
,
$sp
,
104
ld.d
$s6
,
$sp
,
112
ld.d
$s7
,
$sp
,
120
ld.d
$s8
,
$sp
,
128
ld.d
$fp
,
$sp
,
136
ld.d
$ra
,
$sp
,
144
#
return
transfer_t
from
jump
#
pass
transfer_t
as
first
arg
in
context
function
#
a0
==
FCTX
,
a1
==
DATA
move
$a0
,
$a3
#
adjust
stack
addi.d
$sp
,
$sp
,
160
#
jump
to
context
jr
$a2
.
size
ontop_fcontext
,
.
-
ontop_fcontext
/*
Mark
that
we
don
't need executable stack. */
.
section
.
note.GNU
-
stack
,"",%
progbits
deps/oblib/src/lib/list/ob_atomic_list.h
浏览文件 @
6ea9991d
...
...
@@ -104,7 +104,7 @@ union ObHeadNode {
#define FREELIST_VERSION(x) ((static_cast<intptr_t>((x).data_)) >> 48)
#define SET_FREELIST_POINTER_VERSION(x, p, v) \
(x).data_ = (((reinterpret_cast<intptr_t>(p)) & 0x0000FFFFFFFFFFFFULL) | (((v)&0xFFFFULL) << 48))
#elif defined(__sw_64__)
#elif defined(__sw_64__)
|| defined(__loongarch64)
#define FREELIST_POINTER(x) \
(reinterpret_cast<void*>((((static_cast<intptr_t>((x).data_)) << 16) >> 16) | \
(((~(((static_cast<intptr_t>((x).data_)) << 16 >> 63) - 1)) >> 48) << 48))) // sign extend
...
...
deps/oblib/src/lib/utility/utility.h
浏览文件 @
6ea9991d
...
...
@@ -444,6 +444,8 @@ inline bool is_cpu_support_sse42()
return
0
!=
(
data
&
CPUID_STD_SSE4_2
);
#elif defined(__aarch64__)
return
0
;
#elif defined(__loongarch64)
return
0
;
#elif defined(__sw_64__)
return
0
;
#else
...
...
src/election/ob_election.h
浏览文件 @
6ea9991d
...
...
@@ -384,7 +384,7 @@ private:
typedef
common
::
RWLock
::
RLockGuard
RLockGuard
;
typedef
common
::
RWLock
::
WLockGuard
WLockGuard
;
mutable
common
::
RWLock
lock_
;
#elif defined(__sw_64__)
#elif defined(__sw_64__)
|| defined(__loongarch64)
typedef
common
::
SpinRLockGuard
RLockGuard
;
typedef
common
::
SpinWLockGuard
WLockGuard
;
mutable
common
::
SpinRWLock
lock_
;
...
...
src/election/ob_election_group.h
浏览文件 @
6ea9991d
...
...
@@ -307,7 +307,7 @@ private:
typedef
common
::
RWLock
::
RLockGuard
RLockGuard
;
typedef
common
::
RWLock
::
WLockGuard
WLockGuard
;
mutable
common
::
RWLock
lock_
;
#elif defined(__sw_64__)
#elif defined(__sw_64__)
|| defined(__loongarch64)
typedef
common
::
RWLock
::
RLockGuard
RLockGuard
;
typedef
common
::
RWLock
::
WLockGuard
WLockGuard
;
mutable
common
::
RWLock
lock_
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录