#include "bfd.h"
#include "dis-asm.h"
+#include "opcode/cgen-bitset.h"
// ansidecl.h interferes with this perfectly ordinary word
#undef AND
// Disassembly tracing support
void disassemble (PCADDR pc, disassembler_ftype printfn,
enum bfd_flavour flavour, enum bfd_architecture arch,
- enum bfd_endian endian, const char *name, unsigned long isa_mask = 0, int machine = 0);
+ enum bfd_endian endian, const char *name, CGEN_BITSET *isas = NULL, int machine = 0);
struct disassemble_info info;
protected:
static int cgen_read_memory (bfd_vma memaddr, bfd_byte *myaddr,
public:
// rtl memory access methods
inline QI
- GETMEMQI(PCADDR pc, ADDR addr) const
+ GETMEMQI(PCADDR pc, ADDR addr)
{
return this->read_data_memory_1 (pc, addr);
}
inline UQI
- GETMEMUQI(PCADDR pc, ADDR addr) const
+ GETMEMUQI(PCADDR pc, ADDR addr)
{
return this->read_data_memory_1 (pc, addr);
}
inline void
- SETMEMBI(PCADDR pc, ADDR addr, BI value) const
+ SETMEMBI(PCADDR pc, ADDR addr, BI value)
{
return this->write_insn_memory_1 (pc, addr, value);
}
inline void
- SETMEMQI(PCADDR pc, ADDR addr, QI value) const
+ SETMEMQI(PCADDR pc, ADDR addr, QI value)
{
return this->write_data_memory_1 (pc, addr, value);
}
inline void
- SETMEMUQI(PCADDR pc, ADDR addr, UQI value) const
+ SETMEMUQI(PCADDR pc, ADDR addr, UQI value)
{
return this->write_data_memory_1 (pc, addr, value);
}
inline HI
- GETMEMHI(PCADDR pc, ADDR addr) const
+ GETMEMHI(PCADDR pc, ADDR addr)
{
return this->read_data_memory_2 (pc, addr);
}
inline UHI
- GETMEMUHI(PCADDR pc, ADDR addr) const
+ GETMEMUHI(PCADDR pc, ADDR addr)
{
return this->read_data_memory_2 (pc, addr);
}
inline void
- SETMEMHI(PCADDR pc, ADDR addr, HI value) const
+ SETMEMHI(PCADDR pc, ADDR addr, HI value)
{
return this->write_data_memory_2 (pc, addr, value);
}
inline void
- SETMEMUHI(PCADDR pc, ADDR addr, UHI value) const
+ SETMEMUHI(PCADDR pc, ADDR addr, UHI value)
{
return this->write_data_memory_2 (pc, addr, value);
}
inline SI
- GETMEMSI(PCADDR pc, ADDR addr) const
+ GETMEMSI(PCADDR pc, ADDR addr)
{
return this->read_data_memory_4 (pc, addr);
}
inline void
- SETMEMSI(PCADDR pc, ADDR addr, SI value) const
+ SETMEMSI(PCADDR pc, ADDR addr, SI value)
{
return this->write_data_memory_4 (pc, addr, value);
}
inline USI
- GETMEMUSI(PCADDR pc, ADDR addr) const
+ GETMEMUSI(PCADDR pc, ADDR addr)
{
return this->read_data_memory_4 (pc, addr);
}
inline void
- SETMEMUSI(PCADDR pc, ADDR addr, USI value) const
+ SETMEMUSI(PCADDR pc, ADDR addr, USI value)
{
return this->write_data_memory_4 (pc, addr, value);
}
inline DI
- GETMEMDI(PCADDR pc, ADDR addr) const
+ GETMEMDI(PCADDR pc, ADDR addr)
{
return this->read_data_memory_8 (pc, addr);
}
inline void
- SETMEMDI(PCADDR pc, ADDR addr, DI value) const
+ SETMEMDI(PCADDR pc, ADDR addr, DI value)
{
return this->write_data_memory_8 (pc, addr, value);
}
inline void
- SETMEMUDI(PCADDR pc, ADDR addr, UDI value) const
+ SETMEMUDI(PCADDR pc, ADDR addr, UDI value)
{
return this->write_data_memory_8 (pc, addr, value);
}
// floats (can you think of a better way to do this?)
inline SF
- GETMEMSF(PCADDR pc, IADDR addr) const
+ GETMEMSF(PCADDR pc, IADDR addr)
{
return reinterpret_cast<SF>(this->read_insn_memory_4 (pc, addr));
}
inline void
- SETMEMSF(PCADDR pc, ADDR addr, SF value) const
+ SETMEMSF(PCADDR pc, ADDR addr, SF value)
{
return this->write_insn_memory_4 (pc, addr, reinterpret_cast<USI>(value));
}
inline DF
- GETMEMDF(PCADDR pc, IADDR addr) const
+ GETMEMDF(PCADDR pc, IADDR addr)
{
return reinterpret_cast<DF>(this->read_insn_memory_8 (pc, addr));
}
inline void
- SETMEMDF(PCADDR pc, ADDR addr, DF value) const
+ SETMEMDF(PCADDR pc, ADDR addr, DF value)
{
return this->write_insn_memory_8 (pc, addr, reinterpret_cast<UDI>(value));
}
// IMEM: instruction memory calls
inline QI
- GETIMEMQI(PCADDR pc, IADDR addr) const
+ GETIMEMQI(PCADDR pc, IADDR addr)
{
return this->read_insn_memory_1 (pc, addr);
}
inline void
- SETIMEMQI(PCADDR pc, ADDR addr, QI value) const
+ SETIMEMQI(PCADDR pc, ADDR addr, QI value)
{
return this->write_insn_memory_1 (pc, addr, value);
}
inline UQI
- GETIMEMUQI(PCADDR pc, IADDR addr) const
+ GETIMEMUQI(PCADDR pc, IADDR addr)
{
return this->read_insn_memory_1 (pc, addr);
}
inline void
- SETIMEMUQI(PCADDR pc, ADDR addr, UQI value) const
+ SETIMEMUQI(PCADDR pc, ADDR addr, UQI value)
{
return this->write_insn_memory_1 (pc, addr, value);
}
inline HI
- GETIMEMHI(PCADDR pc, IADDR addr) const
+ GETIMEMHI(PCADDR pc, IADDR addr)
{
return this->read_insn_memory_2 (pc, addr);
}
inline void
- SETIMEMHI(PCADDR pc, ADDR addr, HI value) const
+ SETIMEMHI(PCADDR pc, ADDR addr, HI value)
{
return this->write_insn_memory_2 (pc, addr, value);
}
inline UHI
- GETIMEMUHI(PCADDR pc, IADDR addr) const
+ GETIMEMUHI(PCADDR pc, IADDR addr)
{
return this->read_insn_memory_2 (pc, addr);
}
inline void
- SETIMEMUHI(PCADDR pc, ADDR addr, UHI value) const
+ SETIMEMUHI(PCADDR pc, ADDR addr, UHI value)
{
return this->write_insn_memory_2 (pc, addr, value);
}
inline SI
- GETIMEMSI(PCADDR pc, IADDR addr) const
+ GETIMEMSI(PCADDR pc, IADDR addr)
{
return this->read_insn_memory_4 (pc, addr);
}
inline void
- SETIMEMSI(PCADDR pc, ADDR addr, SI value) const
+ SETIMEMSI(PCADDR pc, ADDR addr, SI value)
{
return this->write_insn_memory_4 (pc, addr, value);
}
inline USI
- GETIMEMUSI(PCADDR pc, IADDR addr) const
+ GETIMEMUSI(PCADDR pc, IADDR addr)
{
return this->read_insn_memory_4 (pc, addr);
}
inline void
- SETIMEMUSI(PCADDR pc, ADDR addr, USI value) const
+ SETIMEMUSI(PCADDR pc, ADDR addr, USI value)
{
return this->write_insn_memory_4 (pc, addr, value);
}
inline DI
- GETIMEMDI(PCADDR pc, IADDR addr) const
+ GETIMEMDI(PCADDR pc, IADDR addr)
{
return this->read_insn_memory_8 (pc, addr);
}
inline void
- SETIMEMDI(PCADDR pc, ADDR addr, DI value) const
+ SETIMEMDI(PCADDR pc, ADDR addr, DI value)
{
return this->write_insn_memory_8 (pc, addr, value);
}
inline UDI
- GETIMEMUDI(PCADDR pc, IADDR addr) const
+ GETIMEMUDI(PCADDR pc, IADDR addr)
{
return this->read_insn_memory_8 (pc, addr);
}
inline void
- SETIMEMUDI(PCADDR pc, ADDR addr, UDI value) const
+ SETIMEMUDI(PCADDR pc, ADDR addr, UDI value)
{
return this->write_insn_memory_8 (pc, addr, value);
}
echo "$ac_t""no" 1>&6
fi
+echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
+echo "configure:2203: checking for pthread_create in -lpthread" >&5
+ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lpthread $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2211 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char pthread_create();
+
+int main() {
+pthread_create()
+; return 0; }
+EOF
+if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lpthread $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
for ac_func in getopt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2205: checking for $ac_func" >&5
+echo "configure:2255: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2210 "configure"
+#line 2260 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
done
+case "$host" in
+ sparc-sun-solaris*)
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+ cpu_defs="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
+ ;;
+ *)
+ cpu_defs=
+ ;;
+esac
+
echo $ac_n "checking whether libintl is required for gettext""... $ac_c" 1>&6
-echo "configure:2262: checking whether libintl is required for gettext" >&5
+echo "configure:2323: checking whether libintl is required for gettext" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2272 "configure"
+#line 2333 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
textdomain()
; return 0; }
EOF
-if { (eval echo configure:2283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
INTLLIBS=; echo "$ac_t""no" 1>&6
else
echo $ac_n "checking ARM family support""... $ac_c" 1>&6
-echo "configure:2369: checking ARM family support" >&5
+echo "configure:2430: checking ARM family support" >&5
echo "$ac_t""$sidtarget_arm" 1>&6
echo $ac_n "checking X86 family support""... $ac_c" 1>&6
-echo "configure:2383: checking X86 family support" >&5
+echo "configure:2444: checking X86 family support" >&5
echo "$ac_t""$sidtarget_x86" 1>&6
echo $ac_n "checking MIPS family support""... $ac_c" 1>&6
-echo "configure:2397: checking MIPS family support" >&5
+echo "configure:2458: checking MIPS family support" >&5
echo "$ac_t""$sidtarget_mips" 1>&6
echo $ac_n "checking M32R family support""... $ac_c" 1>&6
-echo "configure:2411: checking M32R family support" >&5
+echo "configure:2472: checking M32R family support" >&5
echo "$ac_t""$sidtarget_m32r" 1>&6
echo $ac_n "checking M68K family support""... $ac_c" 1>&6
-echo "configure:2425: checking M68K family support" >&5
+echo "configure:2486: checking M68K family support" >&5
echo "$ac_t""$sidtarget_m68k" 1>&6
echo $ac_n "checking PPC family support""... $ac_c" 1>&6
-echo "configure:2439: checking PPC family support" >&5
+echo "configure:2500: checking PPC family support" >&5
echo "$ac_t""$sidtarget_ppc" 1>&6
echo $ac_n "checking Sanyo Xstormy16 family support""... $ac_c" 1>&6
-echo "configure:2453: checking Sanyo Xstormy16 family support" >&5
+echo "configure:2514: checking Sanyo Xstormy16 family support" >&5
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2499: checking for $ac_word" >&5
+echo "configure:2560: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GUILE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "links", so it can be a program name with args.
set dummy links; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2535: checking for $ac_word" >&5
+echo "configure:2596: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LINKS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xsltproc", so it can be a program name with args.
set dummy xsltproc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2575: checking for $ac_word" >&5
+echo "configure:2636: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_XSLTPROC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "sabcmd", so it can be a program name with args.
set dummy sabcmd; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2615: checking for $ac_word" >&5
+echo "configure:2676: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_SABLOTRON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:2658: checking whether $ac_func is declared" >&5
+echo "configure:2719: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2663 "configure"
+#line 2724 "configure"
#include "confdefs.h"
#undef $ac_tr_decl
#define $ac_tr_decl 1
#endif
; return 0; }
EOF
-if { (eval echo configure:2678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes"
else