Skip to content

Commit

Permalink
fix: With arch flags
Browse files Browse the repository at this point in the history
  • Loading branch information
howjmay committed Oct 30, 2023
1 parent e758ae0 commit 37e49bc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ else # CROSS_COMPILE was set
$(error Unsupported cross-compiler)
endif

ARCH_CFLAGS = -march=$(processor)gcv_zba

ifeq ($(SIMULATOR_TYPE), qemu)
SIMULATOR += qemu-riscv64
SIMULATOR_FLAGS = -cpu $(processor),v=true,zba=true,vlen=128
Expand All @@ -40,6 +38,14 @@ else # CROSS_COMPILE was set
endif
endif

ifeq ($(processor),$(filter $(processor),rv64 rv32))
ARCH_CFLAGS = -march=$(processor)gcv_zbad
else ifeq ($(processor),$(filter $(processor),i386 x86_64))
ARCH_CFLAGS = -maes -mpclmul -mssse3 -msse4.2
else
$(error Unsupported architecture)
endif

CXXFLAGS += -Wall -Wcast-qual -I. $(ARCH_CFLAGS)
LDFLAGS += -lm
OBJS = \
Expand Down
6 changes: 6 additions & 0 deletions tests/impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11229,6 +11229,12 @@ result_t SSE2RVV_TEST_IMPL::run_single_test(INSTRUCTION_TEST test, uint32_t i) {
return ret;
}

const char *instruction_string[] = {
#define _(x) #x,
INTRIN_LIST
#undef _
};

SSE2RVV_TEST *SSE2RVV_TEST::create(void) {
SSE2RVV_TEST_IMPL *st = new SSE2RVV_TEST_IMPL;
return static_cast<SSE2RVV_TEST *>(st);
Expand Down
2 changes: 1 addition & 1 deletion tests/impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ namespace SSE2RVV {
// A short C implementation of every intrinsic is implemented and compared to
// the actual expected results from the corresponding SSE intrinsic against all
// of the 10,000 randomized input vectors. When running on RISCV, then the
// results are compared to the NEON approximate version.
// results are compared to the RISCV approximate version.
extern const char *instruction_string[];
enum INSTRUCTION_TEST {
#define _(x) it_##x,
Expand Down

0 comments on commit 37e49bc

Please sign in to comment.