Skip to content

Commit

Permalink
Misc: Fix ARM32 build (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Aug 14, 2024
1 parent 460acce commit 2e24519
Show file tree
Hide file tree
Showing 9 changed files with 558 additions and 85 deletions.
4 changes: 2 additions & 2 deletions CMakeModules/DuckStationUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ function(detect_architecture)
AND CMAKE_SIZEOF_VOID_P EQUAL 4))
message(STATUS "Building ARM32 binaries.")
set(CPU_ARCH_ARM32 TRUE PARENT_SCOPE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -marm -march=armv7-a" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -marm -march=armv7-a" PARENT_SCOPE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -marm -march=armv7-a -mfpu=neon-vfpv4" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -marm -march=armv7-a -mfpu=neon-vfpv4" PARENT_SCOPE)
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "riscv64")
message(STATUS "Building RISC-V 64 binaries.")
set(CPU_ARCH_RISCV64 TRUE PARENT_SCOPE)
Expand Down
2 changes: 1 addition & 1 deletion src/common-tests/gsvector_yuvtorgb_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ TEST(GSVector, YUVToRGB)

#if 0
// Performance test
u32 g_gsvector_yuvtorgb_temp[64];
alignas(VECTOR_ALIGNMENT) u32 g_gsvector_yuvtorgb_temp[64];

TEST(GSVector, YUVToRGB_Scalar)
{
Expand Down
4 changes: 2 additions & 2 deletions src/common/align.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ ALWAYS_INLINE static void* AlignedMalloc(size_t size, size_t alignment)
#else
// Unaligned sizes are slow on macOS.
#ifdef __APPLE__
if (IsPow2(alignment))
size = (size + alignment - 1) & ~(alignment - 1);
if (IsPow2(alignment))
size = (size + alignment - 1) & ~(alignment - 1);
#endif
void* ret = nullptr;
return (posix_memalign(&ret, alignment, size) == 0) ? ret : nullptr;
Expand Down
Loading

0 comments on commit 2e24519

Please sign in to comment.