Skip to content

Commit

Permalink
libspl: remove assembly atomics for i486 and amd64
Browse files Browse the repository at this point in the history
These are only used by ztest and zdb, absolute speed isn't too big of a
concern

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
  • Loading branch information
nabijaczleweli committed Apr 15, 2021
1 parent 3133f38 commit 082492b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 1,557 deletions.
28 changes: 3 additions & 25 deletions lib/libspl/Makefile.am
@@ -1,27 +1,14 @@
include $(top_srcdir)/config/Rules.am

if TARGET_CPU_I386
TARGET_CPU_ATOMIC_SOURCE = asm-i386/atomic.S
else
if TARGET_CPU_X86_64
TARGET_CPU_ATOMIC_SOURCE = asm-x86_64/atomic.S
else
TARGET_CPU_ATOMIC_SOURCE = asm-generic/atomic.c
LIBATOMIC = -latomic
endif
endif

SUBDIRS = include

AM_CCASFLAGS = \
$(CFLAGS)

noinst_LTLIBRARIES = libspl_assert.la libspl.la

libspl_assert_la_SOURCES = \
assert.c

USER_C = \
atomic.c \
list.c \
mkdirp.c \
page.c \
Expand All @@ -48,20 +35,11 @@ USER_C += \
os/freebsd/zone.c
endif

libspl_la_SOURCES = \
$(USER_C) \
$(TARGET_CPU_ATOMIC_SOURCE)
libspl_la_SOURCES = $(USER_C)

libspl_la_LIBADD = \
libspl_assert.la

libspl_la_LIBADD += $(LIBATOMIC) $(LIBCLOCK_GETTIME)
libspl_la_LIBADD += -latomic $(LIBCLOCK_GETTIME)

include $(top_srcdir)/config/CppCheck.am

# Override the default SOURCES which includes TARGET_CPU_ATOMIC_SOURCE
# in order to always evaluate the generic asm-generic/atomic.c source.
CPPCHECKSRC = $(USER_C) asm-generic/atomic.c
cppcheck:
$(CPPCHECK) -j$(CPU_COUNT) $(CPPCHECKFLAGS) --force \
$(DEFAULT_INCLUDES) $(CPPCHECKSRC)
1 change: 0 additions & 1 deletion lib/libspl/asm-generic/.gitignore

This file was deleted.

0 comments on commit 082492b

Please sign in to comment.