aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorChih-Min Chao <chihmin.chao@sifive.com>2019-06-06 01:54:38 -0700
committerChih-Min Chao <chihmin.chao@sifive.com>2019-06-14 07:36:45 -0700
commit004649e9e5d71d0a3ebb1e4d70711999aca91cbf (patch)
treed4992148a971eaa5fa295599fcf726c8eb69722c /configure
parent3d7c84220971c6b1aee6e28779c8ebc71276d26a (diff)
downloadspike-004649e9e5d71d0a3ebb1e4d70711999aca91cbf.zip
spike-004649e9e5d71d0a3ebb1e4d70711999aca91cbf.tar.gz
spike-004649e9e5d71d0a3ebb1e4d70711999aca91cbf.tar.bz2
rvv: add configuration and command-line option
1. configure option "--with-varch" the option defines the default u-arch implementatiton-decided parameter VLEN: vector register length in bit SLEN: striping distance in bit ELEN: max element size in bit ex: --with-vector=v128:e32:s128 2. add __int128_t type checking 3. add --varch command option and help message ex: --varch=v512:e64:s512 Signed-off-by: Dave Wen <dave.wen@sifive.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure87
1 files changed, 87 insertions, 0 deletions
diff --git a/configure b/configure
index 56813ad..e211cab 100755
--- a/configure
+++ b/configure
@@ -701,6 +701,7 @@ enable_option_checking
enable_stow
enable_optional_subprojects
with_isa
+with_varch
enable_commitlog
enable_histogram
enable_dirty
@@ -1358,6 +1359,8 @@ Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-isa=RV64IMAFDC Sets the default RISC-V ISA
+ --with-varch=v128:e32:s128
+ Sets the default vector config
Some influential environment variables:
CC C compiler command
@@ -1639,6 +1642,60 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_cxx_check_header_compile
+# ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES
+# ---------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_cxx_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_cxx_check_type
+
# ac_fn_cxx_try_link LINENO
# -------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -4288,6 +4345,18 @@ fi
#-------------------------------------------------------------------------
+# Checks for type
+#-------------------------------------------------------------------------
+
+ac_fn_cxx_check_type "$LINENO" "__int128_t" "ac_cv_type___int128_t" "$ac_includes_default"
+if test "x$ac_cv_type___int128_t" = xyes; then :
+
+else
+ echo "error: spike requires 128 integer suuport"; exit 1
+fi
+
+
+#-------------------------------------------------------------------------
# Default compiler flags
#-------------------------------------------------------------------------
@@ -4473,6 +4542,24 @@ _ACEOF
fi
+
+# Check whether --with-varch was given.
+if test "${with_varch+set}" = set; then :
+ withval=$with_varch;
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_VARCH "$withval"
+_ACEOF
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_VARCH "v128:e32:s128"
+_ACEOF
+
+fi
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
$as_echo_n "checking for library containing dlopen... " >&6; }
if ${ac_cv_search_dlopen+:} false; then :