mirror of
https://github.com/intel/llvm.git
synced 2026-02-03 10:39:35 +08:00
[crt] Enable sparc and mips targets
This patch enables sparc and mips in compiler-rt CRT, meaning that now every platform supported by compiler-rt builtins (that runs on Linux, i.e. not WebAssembly) will be suported by compiler-rt CRT Reviewed By: phosek, MaskRay Differential Revision: https://reviews.llvm.org/D147819
This commit is contained in:
committed by
Fangrui Song
parent
2ba88443b3
commit
2c12e9b7b2
@@ -24,6 +24,8 @@ set(HEXAGON hexagon)
|
||||
set(X86 i386)
|
||||
set(X86_64 x86_64)
|
||||
set(LOONGARCH64 loongarch64)
|
||||
set(MIPS32 mips mipsel)
|
||||
set(MIPS64 mips64 mips64el)
|
||||
set(PPC32 powerpc powerpcspe)
|
||||
set(PPC64 powerpc64 powerpc64le)
|
||||
set(RISCV32 riscv32)
|
||||
@@ -31,7 +33,8 @@ set(RISCV64 riscv64)
|
||||
set(VE ve)
|
||||
|
||||
set(ALL_CRT_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${PPC32}
|
||||
${PPC64} ${RISCV32} ${RISCV64} ${VE} ${HEXAGON} ${LOONGARCH64})
|
||||
${PPC64} ${RISCV32} ${RISCV64} ${VE} ${HEXAGON} ${LOONGARCH64}
|
||||
${MIPS32} ${MIPS64} ${SPARC} ${SPARCV9})
|
||||
|
||||
include(CompilerRTUtils)
|
||||
|
||||
|
||||
@@ -60,6 +60,10 @@ __asm__(".pushsection .init,\"ax\",%progbits\n\t"
|
||||
__asm__(".pushsection .init,\"ax\",%progbits\n\t"
|
||||
"bl __do_init\n\t"
|
||||
".popsection");
|
||||
#elif defined(__mips__)
|
||||
__asm__(".pushsection .init,\"ax\",@progbits\n\t"
|
||||
"jal __do_init\n\t"
|
||||
".popsection");
|
||||
#elif defined(__powerpc__) || defined(__powerpc64__)
|
||||
__asm__(".pushsection .init,\"ax\",@progbits\n\t"
|
||||
"bl __do_init\n\t"
|
||||
@@ -109,6 +113,10 @@ __asm__(".pushsection .fini,\"ax\",@progbits\n\t"
|
||||
__asm__(".pushsection .fini,\"ax\",%progbits\n\t"
|
||||
"bl __do_fini\n\t"
|
||||
".popsection");
|
||||
#elif defined(__mips__)
|
||||
__asm__(".pushsection .fini,\"ax\",@progbits\n\t"
|
||||
"jal __do_fini\n\t"
|
||||
".popsection");
|
||||
#elif defined(__powerpc__) || defined(__powerpc64__)
|
||||
__asm__(".pushsection .fini,\"ax\",@progbits\n\t"
|
||||
"bl __do_fini\n\t"
|
||||
|
||||
Reference in New Issue
Block a user