未验证 提交 a3e0857f 编写于 作者: W Wu Xiaotian 提交者: GitHub

LoongArch support (#929)

* LoongArch: These files are only compiled on the LoongArch platform

* Revert "Support loongarch64"

This reverts commit 79d5b68e.

* LoongArch: link libatomic

* LoongArch: add "-mcmodel=large" to CFLAGS
上级 ae1d5417
......@@ -137,8 +137,9 @@ elseif(${ARCHITECTURE} STREQUAL "aarch64")
set(MTUNE_CFLAGS "-mtune=generic" )
set(ARCH_LDFLAGS "-l:libatomic.a")
elseif(${ARCHITECTURE} STREQUAL "loongarch64")
set(MARCH_CFLAGS "-march=la464" )
set(MTUNE_CFLAGS "-mabi=lp64d" )
set(MARCH_CFLAGS "-march=la464" "-mcmodel=large")
set(MTUNE_CFLAGS "-mabi=lp64d")
set(ARCH_LDFLAGS "-latomic")
elseif(${ARCHITECTURE} STREQUAL "sw_64")
set(ARCH_LDFLAGS "-latomic -llzma")
else()
......
......@@ -26,19 +26,12 @@ 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)
if(${ARCHITECTURE} STREQUAL "loongarch64")
ob_lib_add_target(oblib_lib_coro_context_loongarch64
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_loongarch64)
endif()
ob_set_subtarget(oblib_lib coro
coro/co_base_sched.cpp
coro/co_context.cpp
......
......@@ -38,6 +38,7 @@
* *
* *****************************************************/
#if defined(__loongarch64)
.file "jump_loongarch64_sysv_elf_gas.S"
.text
.globl jump_fcontext
......@@ -119,3 +120,4 @@ jump_fcontext:
/* Mark that we don't need executable stack. */
.section .note.GNU-stack,"",%progbits
#endif
......@@ -38,6 +38,7 @@
* *
* *****************************************************/
#if defined(__loongarch64)
.file "make_loongarch64_sysv_elf_gas.S"
.text
.globl make_fcontext
......@@ -70,3 +71,4 @@ finish:
.size make_fcontext, .-make_fcontext
/* Mark that we don't need executable stack. */
.section .note.GNU-stack,"",%progbits
#endif
......@@ -38,6 +38,7 @@
* *
* *****************************************************/
#if defined(__loongarch64)
.file "ontop_loongarch64_sysv_elf_gas.S"
.text
.globl ontop_fcontext
......@@ -116,3 +117,4 @@ ontop_fcontext:
/* Mark that we don't need executable stack. */
.section .note.GNU-stack,"",%progbits
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册