/* Define if subproject MCPPBS_SPROJ_NORM is enabled */
#undef RISCV_ENABLED
+/* Define if 64-bit mode is supported */
+#undef RISCV_ENABLE_64BIT
+
+/* Define if floating-point instructions are supported */
+#undef RISCV_ENABLE_FPU
+
/* Define if libopcodes exists */
#undef RISCV_HAVE_LIBOPCODES
enable_option_checking
enable_stow
enable_optional_subprojects
+enable_fpu
+enable_64bit
'
ac_precious_vars='build_alias
host_alias
--enable-stow Enable stow-based install
--enable-optional-subprojects
Enable all optional subprojects
+ --disable-fpu Disable floating-point
+ --disable-64bit Disable 64-bit mode
Some influential environment variables:
CC C compiler command
$as_echo "#define RISCV_ENABLED /**/" >>confdefs.h
- libopc=`dirname \`which riscv-gcc\``/../`$ac_config_guess`/riscv/lib/libopcodes.a
+ # Check whether --enable-fpu was given.
+if test "${enable_fpu+set}" = set; then :
+ enableval=$enable_fpu;
+fi
+
+if test "x$enable_fpu" != "xno"; then :
+
+
+$as_echo "#define RISCV_ENABLE_FPU /**/" >>confdefs.h
+
+
+fi
+
+# Check whether --enable-64bit was given.
+if test "${enable_64bit+set}" = set; then :
+ enableval=$enable_64bit;
+fi
+
+if test "x$enable_64bit" != "xno"; then :
+
+
+$as_echo "#define RISCV_ENABLE_64BIT /**/" >>confdefs.h
+
+
+fi
+
+libopc=`dirname \`which riscv-gcc\``/../`$ac_config_guess`/riscv/lib/libopcodes.a
as_ac_File=`$as_echo "ac_cv_file_$libopc" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $libopc" >&5
$as_echo_n "checking for $libopc... " >&6; }
#define __STDC_LIMIT_MACROS
#include <stdint.h>
+
+#include "config.h"
+
+#ifdef RISCV_ENABLE_64BIT
+# define support_64bit 1
+#else
+# define support_64bit 0
+#endif
+
+#ifdef RISCV_ENABLE_FPU
+# define support_fp 1
+#else
+# define support_fp 0
+#endif
+
+
typedef int int128_t __attribute__((mode(TI)));
typedef unsigned int uint128_t __attribute__((mode(TI)));
-#define support_64bit 1
typedef int64_t sreg_t;
typedef uint64_t reg_t;
typedef uint64_t freg_t;
#include "insns/sgninjn_d.h"
break;
}
- if((insn.bits & 0xfe007fe0) == 0xd4006ba0)
+ if((insn.bits & 0xfe007fe0) == 0xd4006f80)
{
#include "insns/mtflh_d.h"
break;
sr = val & ~SR_ZERO;
if(!support_64bit)
sr &= ~(SR_SX | SR_UX);
+ if(!support_fp)
+ sr &= ~SR_EF;
gprlen = ((sr & SR_S) ? (sr & SR_SX) : (sr & SR_UX)) ? 64 : 32;
}
+AC_ARG_ENABLE([fpu], AS_HELP_STRING([--disable-fpu], [Disable floating-point]))
+AS_IF([test "x$enable_fpu" != "xno"], [
+ AC_DEFINE([RISCV_ENABLE_FPU],,[Define if floating-point instructions are supported])
+])
+
+AC_ARG_ENABLE([64bit], AS_HELP_STRING([--disable-64bit], [Disable 64-bit mode]))
+AS_IF([test "x$enable_64bit" != "xno"], [
+ AC_DEFINE([RISCV_ENABLE_64BIT],,[Define if 64-bit mode is supported])
+])
+
libopc=`dirname \`which riscv-gcc\``/../`$ac_config_guess`/riscv/lib/libopcodes.a
AC_CHECK_FILES([$libopc],[have_libopcodes="yes"],[have_libopcodes="no"])