Skip to content

Commit

Permalink
only for test
Browse files Browse the repository at this point in the history
  • Loading branch information
howjmay committed Mar 4, 2024
1 parent 53cd846 commit c032914
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .ci/cross-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ tar Jxvf gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz
make clean
export PATH=gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/bin:$PATH
make CROSS_COMPILE=aarch64-linux-gnu- check || exit 1 # ARMv8-A
# aarch64-linux-gnu-g++ -o test test.c -march=armv8-a+fp+simd
# echo "=================hihihihihi=============="
# qemu-aarch64 -L gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/lib test

# aarch64-linux-gnu-g++ -Wall -Wcast-qual -I. -march=armv8-a+fp+simd test.c -o test

Expand Down
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ endif
CXXFLAGS += -Wall -Wcast-qual -I. $(ARCH_CFLAGS) -std=gnu++14
LDFLAGS += -lm
OBJS = \
tests/binding.o \
tests/common.o \
tests/impl.o \
tests/main.o
tests/test.o
# tests/binding.o \
# tests/common.o \
# tests/impl.o \
# tests/main.o

deps := $(OBJS:%.o=%.o.d)

.SUFFIXES: .o .cpp
Expand All @@ -72,12 +74,12 @@ deps := $(OBJS:%.o=%.o.d)
# $(CXX) -S $(CXXFLAGS) -g $< -o $@.s -MMD -MF $@.d -v
# cat tests/*.s

EXEC = tests/main
EXEC = tests/test

$(EXEC): $(OBJS)
$(CXX) $(LDFLAGS) -o $@ $^

check: tests/main
check: tests/test
ifeq ($(processor),$(filter $(processor),aarch64 arm64 arm armv7l))
$(CC) $(ARCH_CFLAGS) -c sse2neon.h
endif
Expand Down
9 changes: 9 additions & 0 deletions tests/test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "sse2neon.h"
#include <stdint.h>

int main() {
int32_t _a[4];
__m128i a = _mm_loadu_si64(_a);
_mm_shufflelo_epi16(a, 10);
return 0;
}

0 comments on commit c032914

Please sign in to comment.