aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2016-02-08 15:58:14 -0800
committerAndrew Waterman <waterman@cs.berkeley.edu>2016-02-19 13:01:11 -0800
commit57cbf902c90e11fc15bdf402016ac02635dfc78a (patch)
tree0ebb85a92f53095e27fcdd7eb0be4387d4cd8bc0
parentad7a60abeac14c47cfd8d96b6ca2cd07adb833ca (diff)
downloadriscv-pk-57cbf902c90e11fc15bdf402016ac02635dfc78a.zip
riscv-pk-57cbf902c90e11fc15bdf402016ac02635dfc78a.tar.gz
riscv-pk-57cbf902c90e11fc15bdf402016ac02635dfc78a.tar.bz2
Remove --disable-atomics flag; rely on -march setting instead
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure15
-rw-r--r--pk/atomic.h2
-rw-r--r--pk/pk.ac5
4 files changed, 1 insertions, 24 deletions
diff --git a/config.h.in b/config.h.in
index c15bc0a..3424ee6 100644
--- a/config.h.in
+++ b/config.h.in
@@ -21,9 +21,6 @@
/* Define if subproject MCPPBS_SPROJ_NORM is enabled */
#undef PK_ENABLED
-/* Define if atomics are supported */
-#undef PK_ENABLE_ATOMICS
-
/* Define if floating-point emulation is enabled */
#undef PK_ENABLE_FP_EMULATION
diff --git a/configure b/configure
index 8eda71a..0cd8fe2 100755
--- a/configure
+++ b/configure
@@ -668,7 +668,6 @@ enable_stow
enable_optional_subprojects
enable_vm
enable_fp_emulation
-enable_atomics
'
ac_precious_vars='build_alias
host_alias
@@ -1303,7 +1302,6 @@ Optional Features:
--disable-vm Disable virtual memory
--disable-logo Disable boot logo
--disable-fp-emulation Disable floating-point emulation
- --disable-atomics Emulate atomic ops nonatomically
Some influential environment variables:
CC C compiler command
@@ -4074,19 +4072,6 @@ $as_echo "#define PK_ENABLE_FP_EMULATION /**/" >>confdefs.h
fi
-# Check whether --enable-atomics was given.
-if test "${enable_atomics+set}" = set; then :
- enableval=$enable_atomics;
-fi
-
-if test "x$enable_atomics" != "xno"; then :
-
-
-$as_echo "#define PK_ENABLE_ATOMICS /**/" >>confdefs.h
-
-
-fi
-
diff --git a/pk/atomic.h b/pk/atomic.h
index b539f7b..37f43e5 100644
--- a/pk/atomic.h
+++ b/pk/atomic.h
@@ -17,7 +17,7 @@ typedef struct { int lock; } spinlock_t;
#define atomic_set(ptr, val) (*(volatile typeof(*(ptr)) *)(ptr) = val)
#define atomic_read(ptr) (*(volatile typeof(*(ptr)) *)(ptr))
-#ifdef PK_ENABLE_ATOMICS
+#ifdef __riscv_atomic
# define atomic_add(ptr, inc) __sync_fetch_and_add(ptr, inc)
# define atomic_swap(ptr, swp) __sync_lock_test_and_set(ptr, swp)
# define atomic_cas(ptr, cmp, swp) __sync_val_compare_and_swap(ptr, cmp, swp)
diff --git a/pk/pk.ac b/pk/pk.ac
index 03af889..aa0c669 100644
--- a/pk/pk.ac
+++ b/pk/pk.ac
@@ -12,8 +12,3 @@ AC_ARG_ENABLE([fp-emulation], AS_HELP_STRING([--disable-fp-emulation], [Disable
AS_IF([test "x$enable_fp_emulation" != "xno"], [
AC_DEFINE([PK_ENABLE_FP_EMULATION],,[Define if floating-point emulation is enabled])
])
-
-AC_ARG_ENABLE([atomics], AS_HELP_STRING([--disable-atomics], [Emulate atomic ops nonatomically]))
-AS_IF([test "x$enable_atomics" != "xno"], [
- AC_DEFINE([PK_ENABLE_ATOMICS],,[Define if atomics are supported])
-])