Add LoongArch64 Support

Patch submitted by user Xinmudotmoe on github

Change-Id: I58fd035b4ec4856f20d63747ababd49fa9764348
Tento commit je obsažen v:
David Yat Sin
2023-10-10 18:32:06 +00:00
rodič 7955fb01ec
revize 1a7de9588e
3 změnil soubory, kde provedl 3 přidání a 2 odebrání
+1 -1
Zobrazit soubor
@@ -207,7 +207,7 @@ add_dependencies( ${CORE_RUNTIME_TARGET} amd_trap_handler_v2 )
add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/core/runtime/blit_shaders )
add_dependencies( ${CORE_RUNTIME_TARGET} amd_blit_shaders_v2)
if ( NOT DEFINED IMAGE_SUPPORT AND CMAKE_SYSTEM_PROCESSOR MATCHES "i?86|x86_64|amd64|AMD64" )
if ( NOT DEFINED IMAGE_SUPPORT AND CMAKE_SYSTEM_PROCESSOR MATCHES "i?86|x86_64|amd64|AMD64|loongarch64" )
set ( IMAGE_SUPPORT ON )
endif()
set ( IMAGE_SUPPORT ${IMAGE_SUPPORT} CACHE BOOL "Build with image support (default: ON for x86, OFF elsewise)." )
+1
Zobrazit soubor
@@ -77,6 +77,7 @@ namespace image {
#include "mm_malloc.h"
#if defined(__i386__) || defined(__x86_64__)
#include <x86intrin.h>
#elif defined(__loongarch64)
#else
#error \
"Processor not identified. " \
+1 -1
Zobrazit soubor
@@ -80,7 +80,7 @@
// Try to detect CPU endianness
#if !defined(LITTLEENDIAN_CPU) && !defined(BIGENDIAN_CPU)
#if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || \
defined(_M_X64)
defined(_M_X64) || defined(__loongarch64)
#define LITTLEENDIAN_CPU
#endif
#endif