Add new port: crx-elf

This commit is contained in:
Nick Clifton 2004-07-07 17:28:50 +00:00
parent 6edb3da9ac
commit 49e7d4dbb3
10 changed files with 552 additions and 71 deletions

4
config.sub vendored
View File

@ -455,6 +455,10 @@ case $basic_machine in
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;

156
configure vendored
View File

@ -48,6 +48,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
sitefile=
srcdir=
target=NONE
verbose=
@ -162,6 +163,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
--site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@ -332,6 +334,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
-site-file | --site-file | --site-fil | --site-fi | --site-f)
ac_prev=sitefile ;;
-site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
sitefile="$ac_optarg" ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@ -497,12 +504,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
if test -z "$sitefile"; then
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
fi
else
CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@ -589,7 +600,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:593: checking host system type" >&5
echo "configure:604: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@ -610,7 +621,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:614: checking target system type" >&5
echo "configure:625: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@ -628,7 +639,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:632: checking build system type" >&5
echo "configure:643: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@ -683,7 +694,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:687: checking for a BSD compatible install" >&5
echo "configure:698: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -736,7 +747,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ln works""... $ac_c" 1>&6
echo "configure:740: checking whether ln works" >&5
echo "configure:751: checking whether ln works" >&5
if eval "test \"`echo '$''{'acx_cv_prog_LN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -760,7 +771,7 @@ else
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:764: checking whether ln -s works" >&5
echo "configure:775: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1283,6 +1294,9 @@ case "${target}" in
cris-*-*)
noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
;;
crx-*-*)
noconfigdirs="$noconfigdirs target-libgloss target-libstdc++-v3 target-libmudflap ${libgcj}"
;;
d10v-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
;;
@ -1769,7 +1783,7 @@ else
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1773: checking for $ac_word" >&5
echo "configure:1787: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1799,7 +1813,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1803: checking for $ac_word" >&5
echo "configure:1817: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1850,7 +1864,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1854: checking for $ac_word" >&5
echo "configure:1868: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1882,7 +1896,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1886: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:1900: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -1893,12 +1907,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 1897 "configure"
#line 1911 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -1924,12 +1938,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1928: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:1942: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1933: checking whether we are using GNU C" >&5
echo "configure:1947: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1938,7 +1952,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -1957,7 +1971,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1961: checking whether ${CC-cc} accepts -g" >&5
echo "configure:1975: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2024,7 +2038,7 @@ fi
# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2028: checking for $ac_word" >&5
echo "configure:2042: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2056,7 +2070,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "gnatbind", so it can be a program name with args.
set dummy gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2060: checking for $ac_word" >&5
echo "configure:2074: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2089,7 +2103,7 @@ fi
fi
echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
echo "configure:2093: checking whether compiler driver understands Ada" >&5
echo "configure:2107: checking whether compiler driver understands Ada" >&5
if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2122,7 +2136,7 @@ else
fi
echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
echo "configure:2126: checking how to compare bootstrapped objects" >&5
echo "configure:2140: checking how to compare bootstrapped objects" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2195,9 +2209,9 @@ saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $gmpinc"
# Check GMP actually works
echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
echo "configure:2199: checking for correct version of gmp.h" >&5
echo "configure:2213: checking for correct version of gmp.h" >&5
cat > conftest.$ac_ext <<EOF
#line 2201 "configure"
#line 2215 "configure"
#include "confdefs.h"
#include "gmp.h"
int main() {
@ -2208,7 +2222,7 @@ choke me
; return 0; }
EOF
if { (eval echo configure:2212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@ -2221,19 +2235,19 @@ rm -f conftest*
if test x"$have_gmp" = xyes; then
echo $ac_n "checking for mpf_init in -lgmp""... $ac_c" 1>&6
echo "configure:2225: checking for mpf_init in -lgmp" >&5
echo "configure:2239: checking for mpf_init in -lgmp" >&5
saved_LIBS="$LIBS"
LIBS="$LIBS $gmplibs"
cat > conftest.$ac_ext <<EOF
#line 2230 "configure"
#line 2244 "configure"
#include "confdefs.h"
#include <gmp.h>
int main() {
mpf_t n; mpf_init(n);
; return 0; }
EOF
if { (eval echo configure:2237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@ -2706,7 +2720,7 @@ do
# 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:2710: checking for $ac_word" >&5
echo "configure:2724: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_BISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2741,7 +2755,7 @@ do
# 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:2745: checking for $ac_word" >&5
echo "configure:2759: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2776,7 +2790,7 @@ do
# 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:2780: checking for $ac_word" >&5
echo "configure:2794: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_M4'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2811,7 +2825,7 @@ do
# 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:2815: checking for $ac_word" >&5
echo "configure:2829: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_FLEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2846,7 +2860,7 @@ do
# 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:2850: checking for $ac_word" >&5
echo "configure:2864: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2881,7 +2895,7 @@ do
# 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:2885: checking for $ac_word" >&5
echo "configure:2899: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3479,7 +3493,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
# Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3483: checking for $ac_word" >&5
echo "configure:3497: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3512,7 +3526,7 @@ if test -z "$ac_cv_prog_AR" ; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3516: checking for $ac_word" >&5
echo "configure:3530: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3551,7 +3565,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3555: checking for $ac_word" >&5
echo "configure:3569: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3584,7 +3598,7 @@ if test -z "$ac_cv_prog_AS" ; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3588: checking for $ac_word" >&5
echo "configure:3602: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3623,7 +3637,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3627: checking for $ac_word" >&5
echo "configure:3641: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3656,7 +3670,7 @@ if test -z "$ac_cv_prog_DLLTOOL" ; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3660: checking for $ac_word" >&5
echo "configure:3674: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3695,7 +3709,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3699: checking for $ac_word" >&5
echo "configure:3713: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3728,7 +3742,7 @@ if test -z "$ac_cv_prog_LD" ; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3732: checking for $ac_word" >&5
echo "configure:3746: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3767,7 +3781,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3771: checking for $ac_word" >&5
echo "configure:3785: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3800,7 +3814,7 @@ if test -z "$ac_cv_prog_NM" ; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3804: checking for $ac_word" >&5
echo "configure:3818: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3839,7 +3853,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3843: checking for $ac_word" >&5
echo "configure:3857: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3872,7 +3886,7 @@ if test -z "$ac_cv_prog_RANLIB" ; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3876: checking for $ac_word" >&5
echo "configure:3890: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3911,7 +3925,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3915: checking for $ac_word" >&5
echo "configure:3929: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3944,7 +3958,7 @@ if test -z "$ac_cv_prog_WINDRES" ; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3948: checking for $ac_word" >&5
echo "configure:3962: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3983,7 +3997,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3987: checking for $ac_word" >&5
echo "configure:4001: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4016,7 +4030,7 @@ if test -z "$ac_cv_prog_OBJCOPY" ; then
# Extract the first word of "objcopy", so it can be a program name with args.
set dummy objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4020: checking for $ac_word" >&5
echo "configure:4034: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4055,7 +4069,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ncn_tool_prefix}objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4059: checking for $ac_word" >&5
echo "configure:4073: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4088,7 +4102,7 @@ if test -z "$ac_cv_prog_OBJDUMP" ; then
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4092: checking for $ac_word" >&5
echo "configure:4106: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4134,7 +4148,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4138: checking for $ac_word" >&5
echo "configure:4152: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4167,7 +4181,7 @@ if test -z "$ac_cv_prog_CONFIGURED_AR_FOR_TARGET" ; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4171: checking for $ac_word" >&5
echo "configure:4185: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4206,7 +4220,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4210: checking for $ac_word" >&5
echo "configure:4224: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4239,7 +4253,7 @@ if test -z "$ac_cv_prog_CONFIGURED_AS_FOR_TARGET" ; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4243: checking for $ac_word" >&5
echo "configure:4257: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4278,7 +4292,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4282: checking for $ac_word" >&5
echo "configure:4296: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4311,7 +4325,7 @@ if test -z "$ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET" ; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4315: checking for $ac_word" >&5
echo "configure:4329: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4350,7 +4364,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4354: checking for $ac_word" >&5
echo "configure:4368: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4383,7 +4397,7 @@ if test -z "$ac_cv_prog_CONFIGURED_LD_FOR_TARGET" ; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4387: checking for $ac_word" >&5
echo "configure:4401: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4422,7 +4436,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4426: checking for $ac_word" >&5
echo "configure:4440: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4455,7 +4469,7 @@ if test -z "$ac_cv_prog_CONFIGURED_NM_FOR_TARGET" ; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4459: checking for $ac_word" >&5
echo "configure:4473: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4494,7 +4508,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4498: checking for $ac_word" >&5
echo "configure:4512: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4527,7 +4541,7 @@ if test -z "$ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET" ; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4531: checking for $ac_word" >&5
echo "configure:4545: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4566,7 +4580,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4570: checking for $ac_word" >&5
echo "configure:4584: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4599,7 +4613,7 @@ if test -z "$ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET" ; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4603: checking for $ac_word" >&5
echo "configure:4617: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4684,7 +4698,7 @@ RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:4688: checking whether to enable maintainer-specific portions of Makefiles" >&5
echo "configure:4702: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@ -4731,7 +4745,7 @@ esac
# gcc for stageN-gcc and stage-prev for stage(N-1). In case this is not
# possible, however, we can resort to mv.
echo $ac_n "checking if symbolic links between directories work""... $ac_c" 1>&6
echo "configure:4735: checking if symbolic links between directories work" >&5
echo "configure:4749: checking if symbolic links between directories work" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_ln_s_dir'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else

View File

@ -503,6 +503,9 @@ case "${target}" in
cris-*-*)
noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
;;
crx-*-*)
noconfigdirs="$noconfigdirs target-libgloss target-libstdc++-v3 target-libmudflap ${libgcj}"
;;
d10v-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
;;

View File

@ -1,3 +1,7 @@
2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
* dis-asm.h (print_insn_crx): Declare.
2004-06-24 Alan Modra <amodra@bigpond.net.au>
* bfdlink.h (struct bfd_link_order): Update comment.

View File

@ -224,6 +224,7 @@ extern int print_insn_mn10200 (bfd_vma, disassemble_info *);
extern int print_insn_mn10300 (bfd_vma, disassemble_info *);
extern int print_insn_msp430 (bfd_vma, disassemble_info *);
extern int print_insn_ns32k (bfd_vma, disassemble_info *);
extern int print_insn_crx (bfd_vma, disassemble_info *);
extern int print_insn_openrisc (bfd_vma, disassemble_info *);
extern int print_insn_big_or32 (bfd_vma, disassemble_info *);
extern int print_insn_little_or32 (bfd_vma, disassemble_info *);

View File

@ -1,3 +1,8 @@
2004-07-06 Tomer Levi <Tomer.Levi@nsc.com>
* common.h (EM_CRX): Define.
* crx.h: New file.
2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
* m32r.h: Add defintions of R_M32R_GOTOFF_HI_ULO,

View File

@ -182,6 +182,7 @@
#define EM_IP2K 101 /* Ubicom IP2022 micro controller */
#define EM_CR 103 /* National Semiconductor CompactRISC */
#define EM_MSP430 105 /* TI msp430 micro controller */
#define EM_CRX 114 /* National Semiconductor CRX */
/* If it is necessary to assign new unofficial EM_* values, please pick large
random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision

50
include/elf/crx.h Normal file
View File

@ -0,0 +1,50 @@
/* CRX ELF support for BFD.
Copyright 2004 Free Software Foundation, Inc.
Contributed by Tomer Levi, NSC, Israel.
Originally written for GAS 2.12 by Tomer Levi, NSC, Israel.
Updates, BFDizing, GNUifying and ELF support by Tomer Levi.
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _ELF_CRX_H
#define _ELF_CRX_H
#include "elf/reloc-macros.h"
/* Creating indices for reloc_map_index array. */
START_RELOC_NUMBERS(elf_crx_reloc_type)
RELOC_NUMBER (R_CRX_NONE, 0)
RELOC_NUMBER (R_CRX_REL4, 1)
RELOC_NUMBER (R_CRX_REL8, 2)
RELOC_NUMBER (R_CRX_REL8_CMP, 3)
RELOC_NUMBER (R_CRX_REL16, 4)
RELOC_NUMBER (R_CRX_REL24, 5)
RELOC_NUMBER (R_CRX_REL32, 6)
RELOC_NUMBER (R_CRX_REGREL12, 7)
RELOC_NUMBER (R_CRX_REGREL22, 8)
RELOC_NUMBER (R_CRX_REGREL28, 9)
RELOC_NUMBER (R_CRX_REGREL32, 10)
RELOC_NUMBER (R_CRX_ABS16, 11)
RELOC_NUMBER (R_CRX_ABS32, 12)
RELOC_NUMBER (R_CRX_NUM8, 13)
RELOC_NUMBER (R_CRX_NUM16, 14)
RELOC_NUMBER (R_CRX_NUM32, 15)
RELOC_NUMBER (R_CRX_IMM16, 16)
RELOC_NUMBER (R_CRX_IMM32, 17)
END_RELOC_NUMBERS(R_CRX_MAX)
#endif /* _ELF_CRX_H */

View File

@ -1,3 +1,7 @@
2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
* crx.h: New file.
2004-06-24 Alan Modra <amodra@bigpond.net.au>
* i386.h (i386_optab): Remove fildd, fistpd and fisttpd.

395
include/opcode/crx.h Normal file
View File

@ -0,0 +1,395 @@
/* crx.h -- Header file for CRX opcode and register tables.
Copyright 2004 Free Software Foundation, Inc.
Contributed by Tomer Levi, NSC, Israel.
Originally written for GAS 2.12 by Tomer Levi, NSC, Israel.
Updates, BFDizing, GNUifying and ELF support by Tomer Levi.
This file is part of GAS, GDB and the GNU binutils.
GAS, GDB, and GNU binutils is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at your
option) any later version.
GAS, GDB, and GNU binutils are distributed in the hope that they will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _CRX_H_
#define _CRX_H_
/* CRX core/debug Registers :
The enums are used as indices to CRX registers table (crx_regtab).
Therefore, order MUST be preserved. */
typedef enum
{
/* 32-bit general purpose registers. */
r0, r1, r2, r3, r4, r5, r6, r7, r8, r9,
r10, r11, r12, r13, r14, r15, ra, sp,
/* 32-bit user registers. */
u0, u1, u2, u3, u4, u5, u6, u7, u8, u9,
u10, u11, u12, u13, u14, u15, ura, usp,
/* hi and lo registers. */
hi, lo,
/* hi and lo user registers. */
uhi, ulo,
/* Processor Status Register. */
psr,
/* Configuration Register. */
cfg,
/* Coprocessor Configuration Register. */
cpcfg,
/* Cashe Configuration Register. */
ccfg,
/* Interrupt Base Register. */
intbase,
/* Interrupt Stack Pointer Register. */
isp,
/* Coprocessor Enable Register. */
cen,
/* Program Counter Register. */
pc,
/* Not a register. */
nullregister,
MAX_REG
}
reg;
/* CRX Coprocessor registers and special registers :
The enums are used as indices to CRX coprocessor registers table
(crx_copregtab). Therefore, order MUST be preserved. */
typedef enum
{
/* Coprocessor registers. */
c0 = MAX_REG, c1, c2, c3, c4, c5, c6, c7, c8,
c9, c10, c11, c12, c13, c14, c15,
/* Coprocessor special registers. */
cs0, cs1 ,cs2, cs3, cs4, cs5, cs6, cs7, cs8,
cs9, cs10, cs11, cs12, cs13, cs14, cs15,
/* Not a Coprocessor register. */
nullcopregister,
MAX_COPREG
}
copreg;
/* CRX Register types. */
typedef enum
{
CRX_PC_REGTYPE, /* pc type */
CRX_R_REGTYPE, /* r<N> */
CRX_U_REGTYPE, /* u<N> */
CRX_C_REGTYPE, /* c<N> */
CRX_CS_REGTYPE, /* cs<N> */
CRX_MTPR_REGTYPE, /* mtpr */
CRX_CFG_REGTYPE /* *hi|lo, *cfg, psr */
}
reg_type;
/* CRX argument types :
The argument types correspond to instructions operands
Argument types :
r - register
c - constant
d - displacement
ic - immediate
icr - index register
rbase - register base
s - star ('*')
copr - coprocessor register
copsr - coprocessor special register. */
typedef enum
{
arg_r, arg_c, arg_cr, arg_dc, arg_dcr, arg_sc,
arg_ic, arg_icr, arg_rbase, arg_copr, arg_copsr,
/* Not an argument. */
nullargs
}
argtype;
/* CRX operand types :
The operand types correspond to instructions operands
Operand Types :
cst4 - 4-bit encoded constant
iN - N-bit immediate field
d, dispsN - N-bit immediate signed displacement
dispuN - N-bit immediate unsigned displacement
absN - N-bit absolute address
rbase - 4-bit genaral-purpose register specifier
regr - 4-bit genaral-purpose register specifier
regr8 - 8-bit register address space
copregr - coprocessor register
copsregr - coprocessor special register
scl2 - 2-bit scaling factor for memory index
ridx - register index. */
typedef enum
{
dummy, cst4, disps9,
i3, i4, i5, i8, i12, i16, i32,
d5, d9, d17, d25, d33,
abs16, abs32,
rbase, rbase_cst4,
rbase_dispu8, rbase_dispu12, rbase_dispu16, rbase_dispu28, rbase_dispu32,
rbase_ridx_scl2_dispu6, rbase_ridx_scl2_dispu22,
regr, regr8, copregr,copregr8,copsregr,
/* Not an operand. */
nulloperand,
/* Maximum supported operand. */
MAX_OPRD
}
operand_type;
/* CRX instruction types. */
#define ARITH_INS 1
#define LD_STOR_INS 2
#define BRANCH_INS 3
#define ARITH_BYTE_INS 4
#define CMPBR_INS 5
#define SHIFT_INS 6
#define BRANCH_NEQ_INS 7
#define LD_STOR_INS_INC 8
#define STOR_IMM_INS 9
#define CSTBIT_INS 10
#define SYS_INS 11
#define JMP_INS 12
#define MUL_INS 13
#define DIV_INS 14
#define COP_BRANCH_INS 15
#define COP_REG_INS 16
#define DCR_BRANCH_INS 17
#define MMC_INS 18
#define MMU_INS 19
/* Maximum value supported for instruction types. */
#define CRX_INS_MAX (1 << 5)
/* Mask to record an instruction type. */
#define CRX_INS_MASK (CRX_INS_MAX - 1)
/* Return instruction type, given instruction's attributes. */
#define CRX_INS_TYPE(attr) ((attr) & CRX_INS_MASK)
/* Indicates whether this instruction has a register list as parameter. */
#define REG_LIST CRX_INS_MAX
/* The operands in binary and assembly are placed in reverse order.
load - (REVERSE_MATCH)/store - (! REVERSE_MATCH). */
#define REVERSE_MATCH (REG_LIST << 1)
/* Kind of displacement map used DISPU[BWD]4. */
#define DISPUB4 (REVERSE_MATCH << 1)
#define DISPUW4 (DISPUB4 << 1)
#define DISPUD4 (DISPUW4 << 1)
#define CST4MAP (DISPUB4 | DISPUW4 | DISPUD4)
/* Printing formats, where the instruction prefix isn't consecutive. */
#define FMT_1 (DISPUD4 << 1) /* 0xF0F00000 */
#define FMT_2 (FMT_1 << 1) /* 0xFFF0FF00 */
#define FMT_3 (FMT_2 << 1) /* 0xFFF00F00 */
#define FMT_4 (FMT_3 << 1) /* 0xFFF0F000 */
#define FMT_5 (FMT_4 << 1) /* 0xFFF0FFF0 */
#define FMT_CRX (FMT_1 | FMT_2 | FMT_3 | FMT_4 | FMT_5)
#define RELAXABLE (FMT_5 << 1)
/* Maximum operands per instruction. */
#define MAX_OPERANDS 5
/* Maximum words per instruction. */
#define MAX_WORDS 3
/* Maximum register name length. */
#define MAX_REGNAME_LEN 10
/* Maximum instruction length. */
#define MAX_INST_LEN 256
/* Single operand description. */
typedef struct
{
/* Operand type. */
operand_type op_type;
/* Operand location within the opcode. */
unsigned int shift;
}
operand_desc;
/* Instruction data structure used in instruction table. */
typedef struct
{
/* Name. */
const char *mnemonic;
/* Size (in words). */
unsigned int size;
/* Constant prefix (matched by the disassembler). */
unsigned long match;
/* Match size (in bits). */
int match_bits;
/* Attributes. */
unsigned int flags;
/* Operands (always last, so unreferenced operands are initialized). */
operand_desc operands[MAX_OPERANDS];
}
inst;
/* Data structure for a single instruction's arguments (Operands). */
typedef struct
{
/* Register or base register. */
reg r;
/* Index register. */
reg i_r;
/* Coprocessor register. */
copreg cr;
/* Constant/immediate/absolute value. */
unsigned long int constant;
/* Scaled index mode. */
unsigned int scale;
/* Argument type. */
argtype type;
/* Size of the argument (in bits) required to represent. */
int size;
/* Indicates whether a constant is positive or negative. */
int signflag;
}
argument;
/* Internal structure to hold the various entities
corresponding to the current assembling instruction. */
typedef struct
{
/* Number of arguments. */
int nargs;
/* The argument data structure for storing args (operands). */
argument arg[MAX_OPERANDS];
/* The following fields are required only by CRX-assembler. */
#ifdef TC_CRX
/* Expression used for setting the fixups (if any). */
expressionS exp;
bfd_reloc_code_real_type rtype;
#endif /* TC_CRX */
/* Instruction size (in bytes). */
int size;
}
ins;
/* Structure to hold information about predefined operands. */
typedef struct
{
/* Size (in bits). */
unsigned int bit_size;
/* Argument type. */
argtype arg_type;
}
operand_entry;
/* Structure to hold trap handler information. */
typedef struct
{
/* Trap name. */
char *name;
/* Index in dispatch table. */
unsigned int entry;
}
trap_entry;
/* Structure to hold information about predefined registers. */
typedef struct
{
/* Name (string representation). */
char *name;
/* Value (enum representation). */
union
{
/* Register. */
reg reg_val;
/* Coprocessor register. */
copreg copreg_val;
} value;
/* Register image. */
int image;
/* Register type. */
reg_type type;
}
reg_entry;
/* Structure to hold a cst4 operand mapping. */
typedef struct
{
/* The binary value which is written to the object file. */
int binary;
/* The value which is mapped. */
int value;
}
cst4_entry;
/* CRX opcode table. */
extern const inst crx_instruction[];
extern const int crx_num_opcodes;
#define NUMOPCODES crx_num_opcodes
/* CRX operands table. */
extern const operand_entry crx_optab[];
/* CRX registers table. */
extern const reg_entry crx_regtab[];
extern const int crx_num_regs;
#define NUMREGS crx_num_regs
/* CRX coprocessor registers table. */
extern const reg_entry crx_copregtab[];
extern const int crx_num_copregs;
#define NUMCOPREGS crx_num_copregs
/* CRX trap/interrupt table. */
extern const trap_entry crx_traps[];
extern const int crx_num_traps;
#define NUMTRAPS crx_num_traps
/* cst4 operand mapping. */
extern const cst4_entry cst4_map[];
extern const int cst4_maps;
/* Current instruction we're assembling. */
extern const inst *instruction;
/* A macro for representing the instruction "constant" opcode, that is,
the FIXED part of the instruction. The "constant" opcode is represented
as a 32-bit unsigned long, where OPC is expanded (by a left SHIFT)
over that range. */
#define BIN(OPC,SHIFT) (OPC << SHIFT)
/* Is the current instruction type is TYPE ? */
#define IS_INSN_TYPE(TYPE) \
(CRX_INS_TYPE(instruction->flags) == TYPE)
/* Is the current instruction mnemonic is MNEMONIC ? */
#define IS_INSN_MNEMONIC(MNEMONIC) \
(strcmp(instruction->mnemonic,MNEMONIC) == 0)
/* Does the current instruction has register list ? */
#define INST_HAS_REG_LIST \
(instruction->flags & REG_LIST)
/* Long long type handling. */
/* Replace all appearances of 'long long int' with LONGLONG. */
typedef long long int LONGLONG;
typedef unsigned long long ULONGLONG;
/* A mask for the upper 31 bits of a 64 bits type. */
#define UPPER31_MASK 0xFFFFFFFE00000000LL
#endif /* _CRX_H_ */