Skip to content

Commit

Permalink
ARM build fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
VioletGiraffe committed Nov 22, 2024
1 parent 6bdcee4 commit 5619348
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion file-commander-core/file-commander-core.pro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ mac*|linux*|freebsd{

LIBS += -L$${DESTDIR} -L$${DESTDIR_NOARCH} -lcpputils -lqtutils

!win*:!contains(QT_ARCH, arm): QMAKE_CXXFLAGS += -msse4.1
!win*:!contains(QT_ARCH, arm.*): QMAKE_CXXFLAGS += -msse4.1

HEADERS += \
src/cfilesystemobject.h \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ inline void replace_null(std::byte* array, size_t size)

for (size_t i = 0; i < size; i += 16)
{
uint8x16_t data = vld1q_u8(&array[i]); // Load 16 bytes
uint8x16_t data = vld1q_u8(reinterpret_cast<const uint8_t*>(&array[i])); // Load 16 bytes
uint8x16_t mask = vceqq_u8(data, old_neon); // Compare with old_value
uint8x16_t result = vbslq_u8(mask, new_neon, data); // Select new_value where mask is true, else original value
vst1q_u8(&array[i], result); // Store the result back
vst1q_u8(reinterpret_cast<uint8_t*>(&array[i]), result); // Store the result back
}
}
#endif
Expand Down

0 comments on commit 5619348

Please sign in to comment.