llvmpipe: add LoongArch support in ORCJIT

LoongArch is an architecture too new to have MCJIT support.

Add its support to ORCJIT code.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30197>
This commit is contained in:
Icenowy Zheng 2024-07-06 00:12:18 +08:00 committed by Marge Bot
parent 979c364018
commit e16a74c023

View file

@ -58,7 +58,7 @@
/* conflict with ObjectLinkingLayer.h */
#include "util/u_memory.h"
#if DETECT_ARCH_RISCV64 == 1 || DETECT_ARCH_RISCV32 == 1 || (defined(_WIN32) && LLVM_VERSION_MAJOR >= 15)
#if DETECT_ARCH_RISCV64 == 1 || DETECT_ARCH_RISCV32 == 1 || DETECT_ARCH_LOONGARCH64 == 1 || (defined(_WIN32) && LLVM_VERSION_MAJOR >= 15)
/* use ObjectLinkingLayer (JITLINK backend) */
#define USE_JITLINK
#endif
@ -423,6 +423,14 @@ llvm::orc::JITTargetMachineBuilder LPJit::create_jtdb() {
#else
#error "GALLIVM: unknown target riscv float abi"
#endif
#endif
#if DETECT_ARCH_LOONGARCH64 == 1
#if defined(__loongarch_lp64) && defined(__loongarch_double_float)
options.MCOptions.ABIName = "lp64d";
#else
#error "GALLIVM: unknown target loongarch float abi"
#endif
#endif
JTMB.setOptions(options);