Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LoongArch64] amend the tests' building on LA64. #73840

Merged
merged 2 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/tests/Common/Platform/platformdefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
#define _CRT_SECURE_NO_WARNINGS 1
#endif

#if defined(TARGET_X86) || defined(TARGET_AMD64)
#define TARGET_XARCH
#endif

#if defined(TARGET_ARM) || defined(TARGET_ARM64)
#define TARGET_ARMARCH
#endif

// Ensure that both UNICODE and _UNICODE are set.
#ifndef _UNICODE
Expand Down
1 change: 1 addition & 0 deletions src/tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
<TargetBits>32</TargetBits>
<TargetBits Condition="'$(TargetArchitecture)'=='x64'">64</TargetBits>
<TargetBits Condition="'$(TargetArchitecture)'=='arm64'">64</TargetBits>
<TargetBits Condition="'$(TargetArchitecture)'=='loongarch64'">64</TargetBits>
</PropertyGroup>

<PropertyGroup>
Expand Down
13 changes: 0 additions & 13 deletions src/tests/Interop/PInvoke/Generics/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
project (GenericsNative)
include ("${CLR_INTEROP_TEST_ROOT}/Interop.cmake")
if(CLR_CMAKE_TARGET_ARCH_I386)
add_definitions(-DTARGET_X86)
add_definitions(-DTARGET_XARCH)
elseif(CLR_CMAKE_TARGET_ARCH_AMD64)
add_definitions(-DTARGET_AMD64)
add_definitions(-DTARGET_XARCH)
elseif(CLR_CMAKE_TARGET_ARCH_ARM)
add_definitions(-DTARGET_ARM)
add_definitions(-DTARGET_ARMARCH)
elseif(CLR_CMAKE_TARGET_ARCH_ARM64)
add_definitions(-DTARGET_ARM64)
add_definitions(-DTARGET_ARMARCH)
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# The ABI for passing parameters with 32-byte alignment has changed in GCC 4.6
add_compile_options(-Wno-psabi)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <emmintrin.h>

typedef __m128i Vector128B;
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
#if defined(_MSC_VER)
#if defined(TARGET_ARM64)
#include <arm64_neon.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <emmintrin.h>

typedef __m128i Vector128C;
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
#if defined(_MSC_VER)
#if defined(TARGET_ARM64)
#include <arm64_neon.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <emmintrin.h>

typedef __m128d Vector128D;
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
#if defined(_MSC_VER)
#if defined(TARGET_ARM64)
#include <arm64_neon.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <xmmintrin.h>

typedef __m128 Vector128F;
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
#if defined(_MSC_VER)
#if defined(TARGET_ARM64)
#include <arm64_neon.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <emmintrin.h>

typedef __m128i Vector128L;
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
#if defined(_MSC_VER)
#if defined(TARGET_ARM64)
#include <arm64_neon.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <emmintrin.h>

typedef __m128i Vector128U;
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
#if defined(_MSC_VER)
#if defined(TARGET_ARM64)
#include <arm64_neon.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#if defined(TARGET_XARCH)
#include <immintrin.h>
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
// Intentionally empty
#else
#error Unsupported target architecture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#if defined(TARGET_XARCH)
#include <immintrin.h>
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
// Intentionally empty
#else
#error Unsupported target architecture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#if defined(TARGET_XARCH)
#include <immintrin.h>
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
// Intentionally empty
#else
#error Unsupported target architecture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#if defined(TARGET_XARCH)
#include <immintrin.h>
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
// Intentionally empty
#else
#error Unsupported target architecture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#if defined(TARGET_XARCH)
#include <immintrin.h>
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
// Intentionally empty
#else
#error Unsupported target architecture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#if defined(TARGET_XARCH)
#include <immintrin.h>
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
// Intentionally empty
#else
#error Unsupported target architecture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <mmintrin.h>

typedef __m64 Vector64B;
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
#if defined(_MSC_VER)
#if defined(TARGET_ARM64)
#include <arm64_neon.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <mmintrin.h>

typedef __m64 Vector64C;
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
#if defined(_MSC_VER)
#if defined(TARGET_ARM64)
#include <arm64_neon.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <mmintrin.h>

typedef __m64 Vector64D;
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
#if defined(_MSC_VER)
#if defined(TARGET_ARM64)
#include <arm64_neon.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <mmintrin.h>

typedef __m64 Vector64F;
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
#if defined(_MSC_VER)
#if defined(TARGET_ARM64)
#include <arm64_neon.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <mmintrin.h>

typedef __m64 Vector64L;
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
#if defined(_MSC_VER)
#if defined(TARGET_ARM64)
#include <arm64_neon.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <mmintrin.h>

typedef __m64 Vector64U;
#elif defined(TARGET_ARMARCH)
#elif defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
#if defined(_MSC_VER)
#if defined(TARGET_ARM64)
#include <arm64_neon.h>
Expand Down
13 changes: 0 additions & 13 deletions src/tests/Interop/PInvoke/Int128/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
project (Int128Native)
include ("${CLR_INTEROP_TEST_ROOT}/Interop.cmake")
if(CLR_CMAKE_TARGET_ARCH_I386)
add_definitions(-DTARGET_X86)
add_definitions(-DTARGET_XARCH)
elseif(CLR_CMAKE_TARGET_ARCH_AMD64)
add_definitions(-DTARGET_AMD64)
add_definitions(-DTARGET_XARCH)
elseif(CLR_CMAKE_TARGET_ARCH_ARM)
add_definitions(-DTARGET_ARM)
add_definitions(-DTARGET_ARMARCH)
elseif(CLR_CMAKE_TARGET_ARCH_ARM64)
add_definitions(-DTARGET_ARM64)
add_definitions(-DTARGET_ARMARCH)
endif()
set(SOURCES
Int128Native.cpp
UInt128Native.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ struct OUTER3
static_assert_no_msg(sizeof(OUTER3) == 28);
#endif
#else // WINDOWS
#if defined(__x86_64__) || defined(__aarch64__)
#if defined(__x86_64__) || defined(__aarch64__) || defined(__loongarch64)
union OUTER3
{
struct InnerSequential arr[2];
Expand Down