* Makefile.am (DISTCLEANFILES): Change cgen-opc.h to cgen-desc.h.

(cgen.o): Ditto.
	(EXTRA_as_new_SOURCES): Comment out.
	(.tcdep): <arch>-opc.h renamed to <arch>-desc.h.
	* Makefile.in: Rebuild.
	* configure.in: Require autoconf 2.13.  Redo using_cgen handling.
	Delete call to AM_CYGWIN32.  Replace AM_EXEEXT with AC_EXEEXT.
	(AC_OUTPUT): <arch>-opc.h renamed to <arch>-desc.h.
	* configure: Rebuild.
	* aclocal.m4: Rebuild.
	* config.in: Rebuild.
	* cgen.c: Include cgen-desc.h, not cgen-opc.h.
	(*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
	(gas_cgen_cpu_desc): Renamed from gas_cgen_opcode_desc.
	CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE.
	CGEN_OPERAND_ATTR renamed to CGEN_OPERAND_ATTR_VALUE.
	(gas_cgen_record_fixup): Remove unnecessary != 0 test.
	(gas_cgen_record_fixup_exp): Ditto.
	(gas_cgen_finish_insn): Ditto.  Refer to operand table via cpu
	descriptor, not global variable.
	(gas_cgen_md_apply_fix3): Refer to operand_table via cpu
	descriptor, not global variable.  Refer to insert_operand handler
	via cpu descriptor, not global function.
	* cgen.h (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
	* config/tc-fr30.c: Include opcodes/fr30-desc.h.
	(*): gas_cgen_opcode_desc renamed to gas_cgen_cpu_desc.
	CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE.
	Update call to CGEN_OPERAND_TYPE,CGEN_INSN_OPERANDS.
	* config/tc-m32r.c: Ditto.
	(assemble_two_insns): Update calls to cgen_lookup_get_insn_operands.
	(md_assemble): Ditto.
	(md_convert_frag): Update call to CGEN_OPERAND_ENTRY.
This commit is contained in:
Doug Evans 1999-02-10 03:19:32 +00:00
parent b43ef111ac
commit 310addc423
9 changed files with 1663 additions and 1660 deletions

View File

@ -12,7 +12,7 @@ tooldir = $(exec_prefix)/$(target_alias)
YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
DEP = mkdep
DEP = $(srcdir)/../mkdep
TARG_CPU = @target_cpu_type@
TARG_CPU_C = $(srcdir)/config/tc-@target_cpu_type@.c
@ -369,7 +369,7 @@ EXTRA_DIST = make-gas.com
DISTSTUFF = make-gas.com m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c
diststuff: $(DISTSTUFF) info
DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-opc.h
DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-desc.h
# Now figure out from those variables how to compile and link.
@ -498,7 +498,8 @@ e-i386elf.o: $(srcdir)/config/e-i386elf.c
# The m68k operand parser.
EXTRA_as_new_SOURCES = config/m68k-parse.y
# Commented out, doesn't work with recent automake.
#EXTRA_as_new_SOURCES = config/m68k-parse.y
m68k-parse.c: $(srcdir)/config/m68k-parse.y
$(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/config/m68k-parse.y y.tab.c m68k-parse.c --
@ -536,7 +537,7 @@ itbl-test.o: $(srcdir)/testsuite/gas/all/itbl-test.c $(srcdir)/itbl-ops.h
CGEN_CPU_PREFIX = @cgen_cpu_prefix@
cgen.o: cgen.c cgen.h cgen-opc.h subsegs.h \
cgen.o: cgen.c cgen.h cgen-desc.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/cgen.h \
$(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-opc.h
@ -551,7 +552,7 @@ CLEANFILES = dep.sed .tcdep .objdep .dep2 .dep1 .depa .dep .depdir
.PHONY: install-exec-local install-data-local
.PHONY: install-exec-bindir install-exec-tooldir
install-exec-local: install-exec-bindir install-exec-tooldir
install-exec-local: install-exec-bindir @install_tooldir@
install-exec-bindir: $(noinst_PROGRAMS)
$(mkinstalldirs) $(bindir)
@ -700,7 +701,7 @@ DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
echo '#include "obj-'"$${o}"'.h"' > obj-format.h; \
echo '#include "te-generic.h"' > targ-env.h; \
echo '' > itbl-cpu.h; \
echo '#include "opcodes/'"$${c}"'-opc.h"' > cgen-opc.h; \
echo '#include "opcodes/'"$${c}"'-desc.h"' > cgen-desc.h; \
rm -f dummy.c; \
cp $${srcdir}/config/tc-$${c}.c dummy.c; \
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
@ -875,7 +876,6 @@ subsegs.o: subsegs.c subsegs.h $(INCDIR)/obstack.h
symbols.o: symbols.c $(INCDIR)/obstack.h subsegs.h
write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h
gasp.o: gasp.c sb.h macro.h
itbl-ops.o: itbl-ops.c itbl-ops.h
e-i386coff.o: $(srcdir)/config/e-i386coff.c emul.h \
emul-target.h
e-i386elf.o: $(srcdir)/config/e-i386elf.c emul.h emul-target.h
@ -893,7 +893,7 @@ TCDEP_a29k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h $(INCDIR)/opcode/a29k.h
TCDEP_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/alpha.h \
subsegs.h $(INCDIR)/obstack.h ecoff.h $(INCDIR)/opcode/alpha.h \
$(srcdir)/config/atof-vax.c
TCDEP_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \
ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
@ -902,10 +902,11 @@ TCDEP_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \
TCDEP_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h \
$(INCDIR)/elf/reloc-macros.h $(srcdir)/config/atof-vax.c
$(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
$(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
$(srcdir)/config/atof-vax.c
TCDEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/alpha.h \
subsegs.h $(INCDIR)/obstack.h ecoff.h $(INCDIR)/opcode/alpha.h \
$(srcdir)/config/atof-vax.c
TCDEP_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
@ -924,7 +925,7 @@ TCDEP_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \
TCDEP_arm_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h subsegs.h \
$(INCDIR)/obstack.h
$(INCDIR)/obstack.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h
TCDEP_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h \
@ -941,6 +942,11 @@ TCDEP_d30v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h
TCDEP_fr30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/symcat.h cgen-desc.h $(srcdir)/../opcodes/fr30-opc.h \
$(INCDIR)/opcode/cgen.h cgen.h
TCDEP_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h
@ -993,13 +999,13 @@ TCDEP_i960_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/opcode/i960.h
TCDEP_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h cgen-opc.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h cgen-desc.h \
$(srcdir)/../opcodes/m32r-opc.h $(INCDIR)/opcode/cgen.h \
cgen.h
TCDEP_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/symcat.h cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \
$(INCDIR)/obstack.h $(INCDIR)/symcat.h cgen-desc.h $(srcdir)/../opcodes/m32r-opc.h \
$(INCDIR)/opcode/cgen.h cgen.h
TCDEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
@ -1203,6 +1209,10 @@ OBJDEP_d30v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
OBJDEP_fr30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
OBJDEP_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
@ -1445,6 +1455,9 @@ DEP_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \
DEP_d30v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h
DEP_fr30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h
DEP_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h

File diff suppressed because it is too large Load Diff

476
gas/aclocal.m4 vendored
View File

@ -1,7 +1,7 @@
dnl aclocal.m4 generated automatically by aclocal 1.3
dnl aclocal.m4 generated automatically by aclocal 1.4
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
dnl This Makefile.in is free software; the Free Software Foundation
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@ -79,7 +79,7 @@ dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE,
[AC_REQUIRE([AM_PROG_INSTALL])
[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
@ -89,8 +89,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
ifelse([$3],,
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
@ -102,15 +102,6 @@ AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
# serial 1
AC_DEFUN(AM_PROG_INSTALL,
[AC_REQUIRE([AC_PROG_INSTALL])
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
AC_SUBST(INSTALL_SCRIPT)dnl
])
#
# Check to make sure that the build environment is sane.
#
@ -171,11 +162,12 @@ fi
AC_SUBST($1)])
# serial 24 AM_PROG_LIBTOOL
# serial 25 AM_PROG_LIBTOOL
AC_DEFUN(AM_PROG_LIBTOOL,
[AC_REQUIRE([AM_ENABLE_SHARED])dnl
AC_REQUIRE([AM_ENABLE_STATIC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AM_PROG_LD])dnl
@ -221,8 +213,8 @@ case "$host" in
CFLAGS="$CFLAGS -belf"
;;
*-*-cygwin32*)
AM_SYS_LIBTOOL_CYGWIN32
*-*-cygwin*)
AM_SYS_LIBTOOL_CYGWIN
;;
esac
@ -231,9 +223,13 @@ esac
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
DLLTOOL="$DLLTOOL" AS="$AS" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|| AC_MSG_ERROR([libtool configure failed])
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
# AM_ENABLE_SHARED - implement the --enable-shared flag
@ -244,10 +240,8 @@ AC_DEFUN(AM_ENABLE_SHARED,
[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(shared,
changequote(<<, >>)dnl
<< --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
<< --enable-shared[=PKGS] build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
[ --enable-shared=PKGS only build shared libraries if the current package
appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
@ -283,10 +277,8 @@ AC_DEFUN(AM_ENABLE_STATIC,
[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(static,
changequote(<<, >>)dnl
<< --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
<< --enable-static[=PKGS] build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
[ --enable-static=PKGS only build shared libraries if the current package
appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
@ -385,7 +377,10 @@ fi])
AC_DEFUN(AM_PROG_NM,
[AC_MSG_CHECKING([for BSD-compatible nm])
AC_CACHE_VAL(ac_cv_path_NM,
[if test -z "$NM"; then
[if test -n "$NM"; then
# Let the user override the test.
ac_cv_path_NM="$NM"
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
test -z "$ac_dir" && ac_dir=.
@ -405,16 +400,14 @@ AC_CACHE_VAL(ac_cv_path_NM,
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
else
ac_cv_path_NM="$NM" # Let the user override the test with a path.
fi])
NM="$ac_cv_path_NM"
AC_MSG_RESULT([$NM])
AC_SUBST(NM)
])
# AM_SYS_LIBTOOL_CYGWIN32 - find tools needed on cygwin32
AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN32,
# AM_SYS_LIBTOOL_CYGWIN - find tools needed on cygwin
AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN,
[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(AS, as, false)
])
@ -451,6 +444,351 @@ AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
AC_PROG_LEX
AC_DECL_YYTEXT])
# This file is derived from `gettext.m4'. The difference is that the
# included macros assume Cygnus-style source and build trees.
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 3
AC_DEFUN(CY_WITH_NLS,
[AC_MSG_CHECKING([whether NLS is requested])
dnl Default is enabled NLS
AC_ARG_ENABLE(nls,
[ --disable-nls do not use Native Language Support],
USE_NLS=$enableval, USE_NLS=yes)
AC_MSG_RESULT($USE_NLS)
AC_SUBST(USE_NLS)
USE_INCLUDED_LIBINTL=no
dnl If we use NLS figure out what method
if test "$USE_NLS" = "yes"; then
AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
AC_MSG_CHECKING([whether included gettext is requested])
AC_ARG_WITH(included-gettext,
[ --with-included-gettext use the GNU gettext library included here],
nls_cv_force_use_gnu_gettext=$withval,
nls_cv_force_use_gnu_gettext=no)
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
dnl User does not insist on using GNU NLS library. Figure out what
dnl to use. If gettext or catgets are available (in this order) we
dnl use this. Else we have to fall back to GNU NLS library.
dnl catgets is only used if permitted by option --with-catgets.
nls_cv_header_intl=
nls_cv_header_libgt=
CATOBJEXT=NONE
AC_CHECK_HEADER(libintl.h,
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
if test "$gt_cv_func_gettext_libc" != "yes"; then
AC_CHECK_LIB(intl, bindtextdomain,
[AC_CACHE_CHECK([for gettext in libintl],
gt_cv_func_gettext_libintl,
[AC_TRY_LINK([], [return (int) gettext ("")],
gt_cv_func_gettext_libintl=yes,
gt_cv_func_gettext_libintl=no)])])
fi
if test "$gt_cv_func_gettext_libc" = "yes" \
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
AC_DEFINE(HAVE_GETTEXT, 1,
[Define as 1 if you have gettext and don't want to use GNU gettext.])
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
if test "$MSGFMT" != "no"; then
AC_CHECK_FUNCS(dcgettext)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr],
[CATOBJEXT=.gmo
DATADIRNAME=share],
[CATOBJEXT=.mo
DATADIRNAME=lib])
INSTOBJEXT=.mo
fi
fi
])
dnl In the standard gettext, we would now check for catgets.
dnl However, we never want to use catgets for our releases.
if test "$CATOBJEXT" = "NONE"; then
dnl Neither gettext nor catgets in included in the C library.
dnl Fall back on GNU gettext library.
nls_cv_use_gnu_gettext=yes
fi
fi
if test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions used to generate GNU NLS library.
INTLOBJS="\$(GETTOBJS)"
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_SUBST(MSGFMT)
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
INSTOBJEXT=.mo
DATADIRNAME=share
INTLDEPS='$(top_builddir)/../intl/libintl.a'
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=libintl.h
nls_cv_header_libgt=libgettext.h
fi
dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
dnl If it is no GNU xgettext we define it as : so that the
dnl Makefiles still can work.
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
AC_MSG_RESULT(
[found xgettext programs is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi
# We need to process the po/ directory.
POSUB=po
else
DATADIRNAME=share
nls_cv_header_intl=libintl.h
nls_cv_header_libgt=libgettext.h
fi
# If this is used in GNU gettext we have to set USE_NLS to `yes'
# because some of the sources are only built for this goal.
if test "$PACKAGE" = gettext; then
USE_NLS=yes
USE_INCLUDED_LIBINTL=yes
fi
dnl These rules are solely for the distribution goal. While doing this
dnl we only have to keep exactly one list of the available catalogs
dnl in configure.in.
for lang in $ALL_LINGUAS; do
GMOFILES="$GMOFILES $lang.gmo"
POFILES="$POFILES $lang.po"
done
dnl Make all variables we use known to autoconf.
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATALOGS)
AC_SUBST(CATOBJEXT)
AC_SUBST(DATADIRNAME)
AC_SUBST(GMOFILES)
AC_SUBST(INSTOBJEXT)
AC_SUBST(INTLDEPS)
AC_SUBST(INTLLIBS)
AC_SUBST(INTLOBJS)
AC_SUBST(POFILES)
AC_SUBST(POSUB)
])
AC_DEFUN(CY_GNU_GETTEXT,
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_ISC_POSIX])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_C_CONST])dnl
AC_REQUIRE([AC_C_INLINE])dnl
AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
unistd.h values.h sys/param.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
__argz_count __argz_stringify __argz_next])
if test "${ac_cv_func_stpcpy+set}" != "set"; then
AC_CHECK_FUNCS(stpcpy)
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
fi
AM_LC_MESSAGES
CY_WITH_NLS
if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi
dnl Construct list of names of catalog files to be constructed.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
fi
fi
dnl The reference to <locale.h> in the installed <libintl.h> file
dnl must be resolved because we cannot expect the users of this
dnl to define HAVE_LOCALE_H.
if test $ac_cv_header_locale_h = yes; then
INCLUDE_LOCALE_H="#include <locale.h>"
else
INCLUDE_LOCALE_H="\
/* The system does not provide the header <locale.h>. Take care yourself. */"
fi
AC_SUBST(INCLUDE_LOCALE_H)
dnl Determine which catalog format we have (if any is needed)
dnl For now we know about two different formats:
dnl Linux libc-5 and the normal X/Open format
if test -f $srcdir/po2tbl.sed.in; then
if test "$CATOBJEXT" = ".cat"; then
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
dnl Transform the SED scripts while copying because some dumb SEDs
dnl cannot handle comments.
sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
fi
dnl po2tbl.sed is always needed.
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
$srcdir/po2tbl.sed.in > po2tbl.sed
fi
dnl In the intl/Makefile.in we have a special dependency which makes
dnl only sense for gettext. We comment this out for non-gettext
dnl packages.
if test "$PACKAGE" = "gettext"; then
GT_NO="#NO#"
GT_YES=
else
GT_NO=
GT_YES="#YES#"
fi
AC_SUBST(GT_NO)
AC_SUBST(GT_YES)
MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
AC_SUBST(MKINSTALLDIRS)
dnl *** For now the libtool support in intl/Makefile is not for real.
l=
AC_SUBST(l)
dnl Generate list of files to be processed by xgettext which will
dnl be included in po/Makefile. But only do this if the po directory
dnl exists in srcdir.
if test -d $srcdir/po; then
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
posrcprefix="$srcdir/"
else
posrcprefix="../$srcdir/"
fi
else
posrcprefix="../"
fi
rm -f po/POTFILES
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
fi
])
# Search path for a program which passes the given test.
# Ulrich Drepper <drepper@cygnus.com>, 1996.
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AM_PATH_PROG_WITH_TEST,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
/*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
$1="$ac_cv_path_$1"
if test -n "[$]$1"; then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
AC_DEFUN(AM_LC_MESSAGES,
[if test $ac_cv_header_locale_h = yes; then
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES, 1,
[Define if your locale.h file contains LC_MESSAGES.])
fi
fi])
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
@ -465,76 +803,22 @@ AC_DEFUN(AM_MAINTAINER_MODE,
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=no)
AC_MSG_RESULT($USE_MAINTAINER_MODE)
if test $USE_MAINTAINER_MODE = yes; then
MAINT=
else
MAINT='#M#'
fi
AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST(MAINT)dnl
]
)
# Check to see if we're running under Cygwin32, without using
# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
# Otherwise set it to "no".
# Define a conditional.
dnl AM_CYGWIN32()
AC_DEFUN(AM_CYGWIN32,
[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
[AC_TRY_COMPILE(,[return __CYGWIN32__;],
am_cv_cygwin32=yes, am_cv_cygwin32=no)
rm -f conftest*])
CYGWIN32=
test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
# Check to see if we're running under Win32, without using
# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
# Otherwise set it to "".
dnl AM_EXEEXT()
dnl This knows we add .exe if we're building in the Cygwin32
dnl environment. But if we're not, then it compiles a test program
dnl to see if there is a suffix for executables.
AC_DEFUN(AM_EXEEXT,
[AC_REQUIRE([AM_CYGWIN32])
AC_REQUIRE([AM_MINGW32])
AC_MSG_CHECKING([for executable suffix])
AC_CACHE_VAL(am_cv_exeext,
[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
am_cv_exeext=.exe
AC_DEFUN(AM_CONDITIONAL,
[AC_SUBST($1_TRUE)
AC_SUBST($1_FALSE)
if $2; then
$1_TRUE=
$1_FALSE='#'
else
cat > am_c_test.c << 'EOF'
int main() {
/* Nothing needed here */
}
EOF
${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
am_cv_exeext=
for file in am_c_test.*; do
case $file in
*.c) ;;
*.o) ;;
*) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
esac
done
rm -f am_c_test*])
test x"${am_cv_exeext}" = x && am_cv_exeext=no
fi
EXEEXT=""
test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
AC_MSG_RESULT(${am_cv_exeext})
AC_SUBST(EXEEXT)])
# Check to see if we're running under Mingw, without using
# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
# Otherwise set it to "no".
dnl AM_MINGW32()
AC_DEFUN(AM_MINGW32,
[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
[AC_TRY_COMPILE(,[return __MINGW32__;],
am_cv_mingw32=yes, am_cv_mingw32=no)
rm -f conftest*])
MINGW32=
test "$am_cv_mingw32" = yes && MINGW32=yes])
$1_TRUE='#'
$1_FALSE=
fi])

View File

@ -1,5 +1,5 @@
/* GAS interface for targets using CGEN: Cpu tools GENerator.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -22,14 +22,14 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libiberty.h"
#include "bfd.h"
#include "symcat.h"
#include "cgen-opc.h"
#include "cgen-desc.h"
#include "as.h"
#include "subsegs.h"
#include "cgen.h"
/* Opcode table descriptor, must be set by md_begin. */
CGEN_OPCODE_DESC gas_cgen_opcode_desc;
CGEN_CPU_DESC gas_cgen_cpu_desc;
/* Callback to insert a register into the symbol table.
A target may choose to let GAS parse the registers.
@ -181,8 +181,10 @@ gas_cgen_record_fixup (frag, where, insn, length, operand, opinfo, symbol, offse
but it is the operand that has a pc relative relocation. */
fixP = fix_new (frag, where, length / 8, symbol, offset,
CGEN_OPERAND_ATTR (operand, CGEN_OPERAND_PCREL_ADDR) != 0,
(bfd_reloc_code_real_type) ((int) BFD_RELOC_UNUSED + CGEN_OPERAND_INDEX (operand)));
CGEN_OPERAND_ATTR_VALUE (operand, CGEN_OPERAND_PCREL_ADDR),
(bfd_reloc_code_real_type)
((int) BFD_RELOC_UNUSED
+ CGEN_OPERAND_INDEX (gas_cgen_cpu_desc, operand)));
fixP->tc_fix_data.insn = (PTR) insn;
fixP->tc_fix_data.opinfo = opinfo;
@ -218,8 +220,10 @@ gas_cgen_record_fixup_exp (frag, where, insn, length, operand, opinfo, exp)
but it is the operand that has a pc relative relocation. */
fixP = fix_new_exp (frag, where, length / 8, exp,
CGEN_OPERAND_ATTR (operand, CGEN_OPERAND_PCREL_ADDR) != 0,
(bfd_reloc_code_real_type) ((int) BFD_RELOC_UNUSED + CGEN_OPERAND_INDEX (operand)));
CGEN_OPERAND_ATTR_VALUE (operand, CGEN_OPERAND_PCREL_ADDR),
(bfd_reloc_code_real_type)
((int) BFD_RELOC_UNUSED
+ CGEN_OPERAND_INDEX (gas_cgen_cpu_desc, operand)));
fixP->tc_fix_data.insn = (PTR) insn;
fixP->tc_fix_data.opinfo = opinfo;
@ -241,8 +245,8 @@ static jmp_buf expr_jmp_buf;
The resulting value is stored in VALUEP. */
const char *
gas_cgen_parse_operand (od, want, strP, opindex, opinfo, resultP, valueP)
CGEN_OPCODE_DESC od;
gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
CGEN_CPU_DESC cd;
enum cgen_parse_operand_type want;
const char ** strP;
int opindex;
@ -337,7 +341,7 @@ gas_cgen_md_operand (expressionP)
void
gas_cgen_finish_insn (insn, buf, length, relax_p, result)
const CGEN_INSN * insn;
cgen_insn_t * buf;
CGEN_INSN_BYTES_PTR buf;
unsigned int length;
int relax_p;
finished_insnS * result;
@ -350,7 +354,7 @@ gas_cgen_finish_insn (insn, buf, length, relax_p, result)
/* ??? Target foo issues various warnings here, so one might want to provide
a hook here. However, our caller is defined in tc-foo.c so there
shouldn't be a need for a hook. */
/* Write out the instruction.
It is important to fetch enough space in one call to `frag_more'.
We use (f - frag_now->fr_literal) to compute where we are and we
@ -359,21 +363,21 @@ gas_cgen_finish_insn (insn, buf, length, relax_p, result)
Relaxable instructions: We need to ensure we allocate enough
space for the largest insn. */
if (CGEN_INSN_ATTR (insn, CGEN_INSN_RELAX) != 0)
if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX))
abort (); /* These currently shouldn't get here. */
/* Is there a relaxable insn with the relaxable operand needing a fixup? */
relax_operand = -1;
if (relax_p && CGEN_INSN_ATTR (insn, CGEN_INSN_RELAXABLE) != 0)
if (relax_p && CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXABLE))
{
/* Scan the fixups for the operand affected by relaxing
(i.e. the branch address). */
for (i = 0; i < num_fixups; ++ i)
{
if (CGEN_OPERAND_ATTR (& CGEN_SYM (operand_table) [fixups[i].opindex],
CGEN_OPERAND_RELAX) != 0)
if (CGEN_OPERAND_ATTR_VALUE (& CGEN_CPU_OPERAND_TABLE (gas_cgen_cpu_desc) [fixups[i].opindex],
CGEN_OPERAND_RELAX))
{
relax_operand = i;
break;
@ -394,10 +398,10 @@ gas_cgen_finish_insn (insn, buf, length, relax_p, result)
/* Ensure variable part and fixed part are in same fragment. */
/* FIXME: Having to do this seems like a hack. */
frag_grow (max_len);
/* Allocate space for the fixed part. */
f = frag_more (byte_len);
/* Create a relaxable fragment for this instruction. */
old_frag = frag_now;
@ -410,7 +414,7 @@ gas_cgen_finish_insn (insn, buf, length, relax_p, result)
fixups[relax_operand].exp.X_add_symbol,
fixups[relax_operand].exp.X_add_number,
f);
/* Record the operand number with the fragment so md_convert_frag
can use gas_cgen_md_record_fixup to record the appropriate reloc. */
old_frag->fr_cgen.insn = insn;
@ -428,24 +432,8 @@ gas_cgen_finish_insn (insn, buf, length, relax_p, result)
/* If we're recording insns as numbers (rather than a string of bytes),
target byte order handling is deferred until now. */
#if 0 /*def CGEN_INT_INSN*/
switch (length)
{
case 16:
if (cgen_big_endian_p)
bfd_putb16 ((bfd_vma) * buf, f);
else
bfd_putl16 ((bfd_vma) * buf, f);
break;
case 32:
if (cgen_big_endian_p)
bfd_putb32 ((bfd_vma) * buf, f);
else
bfd_putl32 ((bfd_vma) * buf, f);
break;
default:
abort ();
}
#if CGEN_INT_INSN_P
cgen_put_insn_value (gas_cgen_cpu_desc, f, length, *buf);
#else
memcpy (f, buf, byte_len);
#endif
@ -459,9 +447,9 @@ gas_cgen_finish_insn (insn, buf, length, relax_p, result)
We don't need to test for CGEN_INSN_RELAX as they can't get here
(see above). */
if (relax_p
&& CGEN_INSN_ATTR (insn, CGEN_INSN_RELAXABLE) != 0
&& CGEN_OPERAND_ATTR (& CGEN_SYM (operand_table) [fixups[i].opindex],
CGEN_OPERAND_RELAX) != 0)
&& CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXABLE)
&& CGEN_OPERAND_ATTR_VALUE (& CGEN_CPU_OPERAND_TABLE (gas_cgen_cpu_desc) [fixups[i].opindex],
CGEN_OPERAND_RELAX))
continue;
#ifndef md_cgen_record_fixup_exp
@ -470,7 +458,7 @@ gas_cgen_finish_insn (insn, buf, length, relax_p, result)
fixP = md_cgen_record_fixup_exp (frag_now, f - frag_now->fr_literal,
insn, length,
& CGEN_SYM (operand_table) [fixups[i].opindex],
& CGEN_CPU_OPERAND_TABLE (gas_cgen_cpu_desc) [fixups[i].opindex],
fixups[i].opinfo,
& fixups[i].exp);
if (result)
@ -504,8 +492,9 @@ gas_cgen_md_apply_fix3 (fixP, valueP, seg)
{
char * where = fixP->fx_frag->fr_literal + fixP->fx_where;
valueT value;
/* canonical name, since used a lot */
CGEN_CPU_DESC cd = gas_cgen_cpu_desc;
/* FIXME FIXME FIXME: The value we are passed in *valuep includes
the symbol values. Since we are using BFD_ASSEMBLER, if we are
doing this relocation the code in write.c is going to call
@ -542,20 +531,12 @@ gas_cgen_md_apply_fix3 (fixP, valueP, seg)
if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
{
int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
const CGEN_OPERAND * operand = & CGEN_SYM (operand_table) [opindex];
const char * errmsg;
int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
const CGEN_OPERAND *operand = & CGEN_CPU_OPERAND_TABLE (cd) [opindex];
const char *errmsg;
bfd_reloc_code_real_type reloc_type;
CGEN_FIELDS fields;
const CGEN_INSN * insn = (CGEN_INSN *) fixP->tc_fix_data.insn;
if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
{
fixP->fx_done = 0;
return 1;
}
CGEN_FIELDS *fields = alloca (CGEN_CPU_SIZEOF_FIELDS (cd));
const CGEN_INSN *insn = (CGEN_INSN *) fixP->tc_fix_data.insn;
/* If the reloc has been fully resolved finish the operand here. */
/* FIXME: This duplicates the capabilities of code in BFD. */
@ -564,13 +545,27 @@ gas_cgen_md_apply_fix3 (fixP, valueP, seg)
finish the job. Testing for pcrel is a temporary hack. */
|| fixP->fx_pcrel)
{
CGEN_FIELDS_BITSIZE (& fields) = CGEN_INSN_BITSIZE (insn);
CGEN_SYM (set_vma_operand) (opindex, & fields, (bfd_vma) value);
/* ??? 0 is passed for `pc' */
errmsg = CGEN_SYM (insert_operand) (gas_cgen_opcode_desc, opindex,
& fields, where, (bfd_vma) 0);
CGEN_CPU_SET_FIELDS_BITSIZE (cd) (fields, CGEN_INSN_BITSIZE (insn));
CGEN_CPU_SET_VMA_OPERAND (cd) (opindex, fields, (bfd_vma) value);
#if CGEN_INT_INSN_P
{
CGEN_INSN_INT insn_value =
cgen_get_insn_value (cd, where, CGEN_INSN_BITSIZE (insn));
/* ??? 0 is passed for `pc' */
errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields,
&insn_value, (bfd_vma) 0);
cgen_put_insn_value (cd, where, CGEN_INSN_BITSIZE (insn),
insn_value);
}
#else
/* ??? 0 is passed for `pc' */
errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields, where,
(bfd_vma) 0);
#endif
if (errmsg)
as_warn_where (fixP->fx_file, fixP->fx_line, "%s", errmsg);
as_bad_where (fixP->fx_file, fixP->fx_line, "%s", errmsg);
}
if (fixP->fx_done)
@ -611,7 +606,10 @@ gas_cgen_md_apply_fix3 (fixP, valueP, seg)
break;
/* FIXME: later add support for 64 bits. */
default:
abort ();
as_bad_where (fixP->fx_file, fixP->fx_line,
_("internal error: can't install fix for reloc type %d (`%s')"),
fixP->fx_r_type, bfd_get_reloc_code_name (fixP->fx_r_type));
break;
}
}
else
@ -654,13 +652,12 @@ gas_cgen_tc_gen_reloc (section, fixP)
reloc->sym_ptr_ptr = & fixP->fx_addsy->bsym;
/* Use fx_offset for these cases */
if (fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY
if ( fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY
|| fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT)
reloc->address = fixP->fx_offset;
reloc->addend = fixP->fx_offset;
else
{
reloc->address = fixP->fx_frag->fr_address + fixP->fx_where;
reloc->addend = fixP->fx_addnumber;
}
reloc->addend = fixP->fx_addnumber;
reloc->address = fixP->fx_frag->fr_address + fixP->fx_where;
return reloc;
}

View File

@ -3,6 +3,9 @@
/* Define if using alloca.c. */
#undef C_ALLOCA
/* Define to empty if the keyword does not work. */
#undef const
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
@ -13,9 +16,21 @@
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
@ -25,15 +40,12 @@
*/
#undef STACK_DIRECTION
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if lex declares yytext as a char * by default, not a char[]. */
#undef YYTEXT_POINTER
/* Name of package. */
#undef PACKAGE
/* Version of package. */
#undef VERSION
/* Should gas use high-level BFD interfaces? */
#undef BFD_ASSEMBLER
@ -70,9 +82,9 @@
#undef MANY_SEGMENTS
/* Needed only for sparc configuration. */
#undef SPARC_V9
#undef SPARC_ARCH64
/* The configure script defines this for some targets based on the
target name used. It is not always defined. */
#undef TARGET_BYTES_BIG_ENDIAN
/* Needed only for some configurations that can produce multiple output
formats. */
@ -99,21 +111,84 @@
/* Using cgen code? */
#undef USING_CGEN
/* Needed only for sparc configuration. */
#undef DEFAULT_ARCH
/* Needed only for PowerPC Solaris. */
#undef TARGET_SOLARIS_COMMENT
/* Needed only for SCO 5. */
#undef SCO_ELF
/* Define if you have the __argz_count function. */
#undef HAVE___ARGZ_COUNT
/* Define if you have the __argz_next function. */
#undef HAVE___ARGZ_NEXT
/* Define if you have the __argz_stringify function. */
#undef HAVE___ARGZ_STRINGIFY
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
/* Define if you have the remove function. */
#undef HAVE_REMOVE
/* Define if you have the sbrk function. */
#undef HAVE_SBRK
/* Define if you have the setenv function. */
#undef HAVE_SETENV
/* Define if you have the setlocale function. */
#undef HAVE_SETLOCALE
/* Define if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define if you have the strcasecmp function. */
#undef HAVE_STRCASECMP
/* Define if you have the strchr function. */
#undef HAVE_STRCHR
/* Define if you have the unlink function. */
#undef HAVE_UNLINK
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
/* Define if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if you have the <nl_types.h> header file. */
#undef HAVE_NL_TYPES_H
/* Define if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
@ -126,11 +201,36 @@
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the <values.h> header file. */
#undef HAVE_VALUES_H
/* Define if you have the <varargs.h> header file. */
#undef HAVE_VARARGS_H
/* Name of package */
#undef PACKAGE
/* Version number of package */
#undef VERSION
/* Define if you have the stpcpy function */
#undef HAVE_STPCPY
/* Define if your locale.h file contains LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define to 1 if NLS is requested */
#undef ENABLE_NLS
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT

View File

@ -1,5 +1,5 @@
/* tc-fr30.c -- Assembler for the Fujitsu FR30.
Copyright (C) 1998 Free Software Foundation.
Copyright (C) 1998, 1999 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@ -23,7 +23,8 @@
#include "as.h"
#include "subsegs.h"
#include "symcat.h"
#include "cgen-opc.h"
#include "opcodes/fr30-desc.h"
#include "opcodes/fr30-opc.h"
#include "cgen.h"
/* Structure to hold all of the different components describing
@ -101,17 +102,18 @@ md_begin ()
/* Initialize the `cgen' interface. */
/* Set the machine number and endian. */
gas_cgen_opcode_desc = fr30_cgen_opcode_open (bfd_mach_fr30, CGEN_ENDIAN_BIG);
fr30_cgen_init_asm (gas_cgen_opcode_desc);
gas_cgen_cpu_desc = fr30_cgen_cpu_open (bfd_mach_fr30, CGEN_ENDIAN_BIG);
fr30_cgen_init_asm (gas_cgen_cpu_desc);
/* This is a callback from cgen to gas to parse operands. */
cgen_set_parse_operand_fn (gas_cgen_opcode_desc, gas_cgen_parse_operand);
cgen_set_parse_operand_fn (gas_cgen_cpu_desc, gas_cgen_parse_operand);
}
void
md_assemble (str)
char * str;
{
static int last_insn_had_delay_slot = 0;
fr30_insn insn;
char * errmsg;
char * str2 = NULL;
@ -120,7 +122,7 @@ md_assemble (str)
gas_cgen_init_parse ();
insn.insn = fr30_cgen_assemble_insn
(gas_cgen_opcode_desc, str, & insn.fields, insn.buffer, & errmsg);
(gas_cgen_cpu_desc, str, & insn.fields, insn.buffer, & errmsg);
if (!insn.insn)
{
@ -131,6 +133,15 @@ md_assemble (str)
/* Doesn't really matter what we pass for RELAX_P here. */
gas_cgen_finish_insn (insn.insn, insn.buffer,
CGEN_FIELDS_BITSIZE (& insn.fields), 1, NULL);
/* Warn about invalid insns in delay slots. */
if (last_insn_had_delay_slot
&& CGEN_INSN_ATTR_VALUE (insn.insn, CGEN_INSN_NOT_IN_DELAY_SLOT))
as_warn (_("Instruction %s not allowed in a delay slot."),
CGEN_INSN_NAME (insn.insn));
last_insn_had_delay_slot
= CGEN_INSN_ATTR_VALUE (insn.insn, CGEN_INSN_DELAY_SLOT);
}
/* The syntax in the manual says constants begin with '#'.
@ -296,7 +307,7 @@ md_estimate_size_before_relax (fragP, segment)
if ((strcmp (CGEN_INSN_MNEMONIC (insn),
CGEN_INSN_MNEMONIC (fragP->fr_cgen.insn))
== 0)
&& CGEN_INSN_ATTR (insn, CGEN_INSN_RELAX))
&& CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX))
break;
}
if (i == 4)
@ -437,7 +448,7 @@ md_cgen_lookup_reloc (insn, operand, fixP)
const CGEN_OPERAND * operand;
fixS * fixP;
{
switch (CGEN_OPERAND_TYPE (operand))
switch (CGEN_OPERAND_TYPE (gas_cgen_cpu_desc, operand))
{
case FR30_OPERAND_LABEL9: fixP->fx_pcrel = 1; return BFD_RELOC_FR30_9_PCREL;
case FR30_OPERAND_LABEL12: fixP->fx_pcrel = 1; return BFD_RELOC_FR30_12_PCREL;
@ -469,11 +480,11 @@ int
fr30_force_relocation (fix)
fixS * fix;
{
if (fix->fx_r_type == BFD_RELOC_VTABLE_INHERIT
if ( fix->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fix->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 1;
return fix->fx_pcrel;
return 0;
}
/* Write a value out to the object file, using the appropriate endianness. */
@ -630,3 +641,27 @@ fr30_is_colon_insn (start)
return 0;
}
boolean
fr30_fix_adjustable (fixP)
fixS * fixP;
{
if (fixP->fx_addsy == NULL)
return 1;
#if 0
/* Prevent all adjustments to global symbols. */
if (S_IS_EXTERN (fixP->fx_addsy))
return 0;
if (S_IS_WEAK (fixP->fx_addsy))
return 0;
#endif
/* We need the symbol name for the VTABLE entries */
if ( fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 0;
return 1;
}

View File

@ -23,7 +23,8 @@
#include "as.h"
#include "subsegs.h"
#include "symcat.h"
#include "cgen-opc.h"
#include "opcodes/m32r-desc.h"
#include "opcodes/m32r-opc.h"
#include "cgen.h"
/* Linked list of symbols that are debugging symbols to be defined as the
@ -506,14 +507,19 @@ md_begin ()
/* Initialize the `cgen' interface. */
/* Set the machine number and endian. */
gas_cgen_opcode_desc = m32r_cgen_opcode_open (0 /* mach number */,
target_big_endian ?
CGEN_ENDIAN_BIG
: CGEN_ENDIAN_LITTLE);
m32r_cgen_init_asm (gas_cgen_opcode_desc);
gas_cgen_cpu_desc = m32r_cgen_cpu_open (0 /* mach number */,
target_big_endian ?
CGEN_ENDIAN_BIG
: CGEN_ENDIAN_LITTLE);
m32r_cgen_init_asm (gas_cgen_cpu_desc);
/* The operand instance table is used during optimization to determine
which insns can be executed in parallel. It is also used to give
warnings regarding operand interference in parallel insns. */
m32r_cgen_init_opinst_table (gas_cgen_cpu_desc);
/* This is a callback from cgen to gas to parse operands. */
cgen_set_parse_operand_fn (gas_cgen_opcode_desc, gas_cgen_parse_operand);
cgen_set_parse_operand_fn (gas_cgen_cpu_desc, gas_cgen_parse_operand);
#if 0 /* not supported yet */
/* If a runtime cpu description file was provided, parse it. */
@ -521,7 +527,7 @@ md_begin ()
{
const char * errmsg;
errmsg = cgen_read_cpu_file (gas_cgen_opcode_desc, m32r_cpu_desc);
errmsg = cgen_read_cpu_file (gas_cgen_cpu_desc, m32r_cpu_desc);
if (errmsg != NULL)
as_bad ("%s: %s", m32r_cpu_desc, errmsg);
}
@ -563,11 +569,11 @@ md_begin ()
/* start-sanitize-cygnus */
#define OPERAND_IS_COND_BIT(operand, indices, index) \
(CGEN_OPERAND_INSTANCE_HW (operand)->type == HW_H_COND \
|| (CGEN_OPERAND_INSTANCE_HW (operand)->type == HW_H_PSW) \
|| (CGEN_OPERAND_INSTANCE_HW (operand)->type == HW_H_CR \
&& (indices [index] == 0 || indices [index] == 1)))
#define OPERAND_IS_COND_BIT(operand, indices, index) \
((operand)->hw->type == HW_H_COND \
|| ((operand)->hw->type == HW_H_PSW) \
|| ((operand)->hw->type == HW_H_CR \
&& (indices [index] == 0 || indices [index] == 1)))
/* Returns true if an output of instruction 'a' is referenced by an operand
of instruction 'b'. If 'check_outputs' is true then b's outputs are
@ -579,9 +585,9 @@ first_writes_to_seconds_operands (a, b, check_outputs)
m32r_insn * b;
const int check_outputs;
{
const CGEN_OPERAND_INSTANCE * a_operands = CGEN_INSN_OPERANDS (a->insn);
const CGEN_OPERAND_INSTANCE * b_ops = CGEN_INSN_OPERANDS (b->insn);
int a_index;
const CGEN_OPINST * a_operands = CGEN_INSN_OPERANDS (a->insn);
const CGEN_OPINST * b_ops = CGEN_INSN_OPERANDS (b->insn);
int a_index;
/* If at least one of the instructions takes no operands, then there is
nothing to check. There really are instructions without operands,
@ -591,13 +597,13 @@ first_writes_to_seconds_operands (a, b, check_outputs)
/* Scan the operand list of 'a' looking for an output operand. */
for (a_index = 0;
CGEN_OPERAND_INSTANCE_TYPE (a_operands) != CGEN_OPERAND_INSTANCE_END;
a_operands->type != CGEN_OPINST_END;
a_index ++, a_operands ++)
{
if (CGEN_OPERAND_INSTANCE_TYPE (a_operands) == CGEN_OPERAND_INSTANCE_OUTPUT)
if (a_operands->type == CGEN_OPINST_OUTPUT)
{
int b_index;
const CGEN_OPERAND_INSTANCE * b_operands = b_ops;
const CGEN_OPINST * b_operands = b_ops;
/* Special Case:
The Condition bit 'C' is a shadow of the CBR register (control
@ -610,11 +616,13 @@ first_writes_to_seconds_operands (a, b, check_outputs)
/* Scan operand list of 'b' looking for another reference to the
condition bit, which goes in the right direction. */
for (b_index = 0;
CGEN_OPERAND_INSTANCE_TYPE (b_operands) != CGEN_OPERAND_INSTANCE_END;
b_operands->type != CGEN_OPINST_END;
b_index ++, b_operands ++)
{
if ((CGEN_OPERAND_INSTANCE_TYPE (b_operands) ==
(check_outputs ? CGEN_OPERAND_INSTANCE_OUTPUT : CGEN_OPERAND_INSTANCE_INPUT))
if ((b_operands->type
== (check_outputs
? CGEN_OPINST_OUTPUT
: CGEN_OPINST_INPUT))
&& OPERAND_IS_COND_BIT (b_operands, b->indices, b_index))
return 1;
}
@ -625,12 +633,14 @@ first_writes_to_seconds_operands (a, b, check_outputs)
references the same hardware element, and which goes in the
right direction. */
for (b_index = 0;
CGEN_OPERAND_INSTANCE_TYPE (b_operands) != CGEN_OPERAND_INSTANCE_END;
b_operands->type != CGEN_OPINST_END;
b_index ++, b_operands ++)
{
if ((CGEN_OPERAND_INSTANCE_TYPE (b_operands) ==
(check_outputs ? CGEN_OPERAND_INSTANCE_OUTPUT : CGEN_OPERAND_INSTANCE_INPUT))
&& (CGEN_OPERAND_INSTANCE_HW (b_operands) == CGEN_OPERAND_INSTANCE_HW (a_operands))
if ((b_operands->type
== (check_outputs
? CGEN_OPINST_OUTPUT
: CGEN_OPINST_INPUT))
&& (b_operands->hw == a_operands->hw)
&& (a->indices [a_index] == b->indices [b_index]))
return 1;
}
@ -648,22 +658,23 @@ writes_to_pc (a)
m32r_insn * a;
{
#if 0 /* Once PC operands are working.... */
const CGEN_OPERAND_INSTANCE * a_operands == CGEN_INSN_OPERANDS (a->insn);
const CGEN_OPINST * a_operands == CGEN_INSN_OPERANDS (gas_cgen_cpu_desc,
a->insn);
if (a_operands == NULL)
return 0;
while (CGEN_OPERAND_INSTANCE_TYPE (a_operands) != CGEN_OPERAND_INSTANCE_END)
while (a_operands->type != CGEN_OPINST_END)
{
if (CGEN_OPERAND_INSTANCE_OPERAND (a_operands) != NULL
&& CGEN_OPERAND_INDEX (CGEN_OPERAND_INSTANCE_OPERAND (a_operands)) == M32R_OPERAND_PC)
if (a_operands->operand != NULL
&& CGEN_OPERAND_INDEX (gas_cgen_cpu_desc, a_operands->operand) == M32R_OPERAND_PC)
return 1;
a_operands ++;
}
#else
if (CGEN_INSN_ATTR (a->insn, CGEN_INSN_UNCOND_CTI)
|| CGEN_INSN_ATTR (a->insn, CGEN_INSN_COND_CTI))
if (CGEN_INSN_ATTR_VALUE (a->insn, CGEN_INSN_UNCOND_CTI)
|| CGEN_INSN_ATTR_VALUE (a->insn, CGEN_INSN_COND_CTI))
return 1;
#endif
return 0;
@ -688,8 +699,8 @@ can_make_parallel (a, b)
if (first_writes_to_seconds_operands (a, b, true))
return _("Instructions write to the same destination register.");
a_pipe = CGEN_INSN_ATTR (a->insn, CGEN_INSN_PIPE);
b_pipe = CGEN_INSN_ATTR (b->insn, CGEN_INSN_PIPE);
a_pipe = CGEN_INSN_ATTR_VALUE (a->insn, CGEN_INSN_PIPE);
b_pipe = CGEN_INSN_ATTR_VALUE (b->insn, CGEN_INSN_PIPE);
/* Make sure that the instructions use the correct execution pipelines. */
if ( a_pipe == PIPE_NONE
@ -715,7 +726,7 @@ make_parallel (buffer)
#if CGEN_INT_INSN_P
*buffer |= 0x8000;
#else
buffer [CGEN_OPCODE_ENDIAN (gas_cgen_opcode_desc) == CGEN_ENDIAN_BIG ? 0 : 1]
buffer [CGEN_CPU_ENDIAN (gas_cgen_cpu_desc) == CGEN_ENDIAN_BIG ? 0 : 1]
|= 0x80;
#endif
}
@ -726,7 +737,7 @@ static void
target_make_parallel (buffer)
char *buffer;
{
buffer [CGEN_OPCODE_ENDIAN (gas_cgen_opcode_desc) == CGEN_ENDIAN_BIG ? 0 : 1]
buffer [CGEN_CPU_ENDIAN (gas_cgen_cpu_desc) == CGEN_ENDIAN_BIG ? 0 : 1]
|= 0x80;
}
@ -760,7 +771,7 @@ assemble_two_insns (str, str2, parallel_p)
/* Parse the first instruction. */
if (! (first.insn = m32r_cgen_assemble_insn
(gas_cgen_opcode_desc, str, & first.fields, first.buffer, & errmsg)))
(gas_cgen_cpu_desc, str, & first.fields, first.buffer, & errmsg)))
{
as_bad (errmsg);
return;
@ -774,7 +785,7 @@ assemble_two_insns (str, str2, parallel_p)
return;
}
else if (! enable_special
&& CGEN_INSN_ATTR (first.insn, CGEN_INSN_SPECIAL))
&& CGEN_INSN_ATTR_VALUE (first.insn, CGEN_INSN_SPECIAL))
{
/* xgettext:c-format */
as_bad (_("unknown instruction '%s'"), str);
@ -782,7 +793,7 @@ assemble_two_insns (str, str2, parallel_p)
}
else if (! enable_m32rx
/* FIXME: Need standard macro to perform this test. */
&& CGEN_INSN_ATTR (first.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
&& CGEN_INSN_ATTR_VALUE (first.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
{
/* xgettext:c-format */
as_bad (_("instruction '%s' is for the M32RX only"), str);
@ -790,7 +801,7 @@ assemble_two_insns (str, str2, parallel_p)
}
/* Check to see if this is an allowable parallel insn. */
if (parallel_p && CGEN_INSN_ATTR (first.insn, CGEN_INSN_PIPE) == PIPE_NONE)
if (parallel_p && CGEN_INSN_ATTR_VALUE (first.insn, CGEN_INSN_PIPE) == PIPE_NONE)
{
/* xgettext:c-format */
as_bad (_("instruction '%s' cannot be executed in parallel."), str);
@ -832,9 +843,12 @@ assemble_two_insns (str, str2, parallel_p)
version (eg relaxability). When aliases behave differently this
may have to change. */
first.orig_insn = first.insn;
first.insn = m32r_cgen_lookup_get_insn_operands
(gas_cgen_opcode_desc, NULL, INSN_VALUE (first.buffer), 16,
first.indices);
{
CGEN_FIELDS tmp_fields;
first.insn = cgen_lookup_get_insn_operands
(gas_cgen_cpu_desc, NULL, INSN_VALUE (first.buffer), NULL, 16,
first.indices, &tmp_fields);
}
if (first.insn == NULL)
as_fatal (_("internal error: lookup/get operands failed"));
@ -843,7 +857,7 @@ assemble_two_insns (str, str2, parallel_p)
/* Parse the second instruction. */
if (! (second.insn = m32r_cgen_assemble_insn
(gas_cgen_opcode_desc, str, & second.fields, second.buffer, & errmsg)))
(gas_cgen_cpu_desc, str, & second.fields, second.buffer, & errmsg)))
{
as_bad (errmsg);
return;
@ -857,14 +871,14 @@ assemble_two_insns (str, str2, parallel_p)
return;
}
else if (! enable_special
&& CGEN_INSN_ATTR (second.insn, CGEN_INSN_SPECIAL))
&& CGEN_INSN_ATTR_VALUE (second.insn, CGEN_INSN_SPECIAL))
{
/* xgettext:c-format */
as_bad (_("unknown instruction '%s'"), str);
return;
}
else if (! enable_m32rx
&& CGEN_INSN_ATTR (second.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
&& CGEN_INSN_ATTR_VALUE (second.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
{
/* xgettext:c-format */
as_bad (_("instruction '%s' is for the M32RX only"), str);
@ -872,7 +886,7 @@ assemble_two_insns (str, str2, parallel_p)
}
/* Check to see if this is an allowable parallel insn. */
if (parallel_p && CGEN_INSN_ATTR (second.insn, CGEN_INSN_PIPE) == PIPE_NONE)
if (parallel_p && CGEN_INSN_ATTR_VALUE (second.insn, CGEN_INSN_PIPE) == PIPE_NONE)
{
/* xgettext:c-format */
as_bad (_("instruction '%s' cannot be executed in parallel."), str);
@ -892,9 +906,12 @@ assemble_two_insns (str, str2, parallel_p)
/* Get the indices of the operands of the instruction. */
second.orig_insn = second.insn;
second.insn = m32r_cgen_lookup_get_insn_operands
(gas_cgen_opcode_desc, NULL, INSN_VALUE (second.buffer), 16,
second.indices);
{
CGEN_FIELDS tmp_fields;
second.insn = cgen_lookup_get_insn_operands
(gas_cgen_cpu_desc, NULL, INSN_VALUE (second.buffer), NULL, 16,
second.indices, &tmp_fields);
}
if (second.insn == NULL)
as_fatal (_("internal error: lookup/get operands failed"));
@ -1005,7 +1022,7 @@ md_assemble (str)
debug_sym_link = (sym_linkS *)0;
insn.insn = m32r_cgen_assemble_insn
(gas_cgen_opcode_desc, str, & insn.fields, insn.buffer, & errmsg);
(gas_cgen_cpu_desc, str, & insn.fields, insn.buffer, & errmsg);
if (!insn.insn)
{
@ -1015,14 +1032,14 @@ md_assemble (str)
/* start-sanitize-cygnus */
if (! enable_special
&& CGEN_INSN_ATTR (insn.insn, CGEN_INSN_SPECIAL))
&& CGEN_INSN_ATTR_VALUE (insn.insn, CGEN_INSN_SPECIAL))
{
/* xgettext:c-format */
as_bad (_("unknown instruction '%s'"), str);
return;
}
else if (! enable_m32rx
&& CGEN_INSN_ATTR (insn.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
&& CGEN_INSN_ATTR_VALUE (insn.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
{
/* xgettext:c-format */
as_bad (_("instruction '%s' is for the M32RX only"), str);
@ -1070,9 +1087,12 @@ md_assemble (str)
{
/* Get the indices of the operands of the instruction.
FIXME: See assemble_parallel for notes on orig_insn. */
insn.insn = m32r_cgen_lookup_get_insn_operands
(gas_cgen_opcode_desc, NULL, INSN_VALUE (insn.buffer),
16, insn.indices);
{
CGEN_FIELDS tmp_fields;
insn.insn = cgen_lookup_get_insn_operands
(gas_cgen_cpu_desc, NULL, INSN_VALUE (insn.buffer), NULL,
16, insn.indices, &tmp_fields);
}
if (insn.insn == NULL)
as_fatal (_("internal error: lookup/get operands failed"));
@ -1097,7 +1117,7 @@ md_assemble (str)
if ( ! on_32bit_boundary_p
&& enable_m32rx
&& optimize
&& CGEN_INSN_ATTR (insn.orig_insn, CGEN_INSN_RELAXABLE) == 0
&& CGEN_INSN_ATTR_VALUE (insn.orig_insn, CGEN_INSN_RELAXABLE) == 0
&& ! writes_to_pc (& prev_insn)
&& ! first_writes_to_seconds_operands (& prev_insn, &insn, false)
)
@ -1168,13 +1188,13 @@ md_assemble (str)
/* If the insn needs the following one to be on a 32 bit boundary
(e.g. subroutine calls), fill this insn's slot. */
if (on_32bit_boundary_p
&& CGEN_INSN_ATTR (insn.orig_insn, CGEN_INSN_FILL_SLOT) != 0)
&& CGEN_INSN_ATTR_VALUE (insn.orig_insn, CGEN_INSN_FILL_SLOT) != 0)
fill_insn (0);
/* If this is a relaxable insn (can be replaced with a larger version)
mark the fact so that we can emit an alignment directive for a
following 32 bit insn if we see one. */
if (CGEN_INSN_ATTR (insn.orig_insn, CGEN_INSN_RELAXABLE) != 0)
if (CGEN_INSN_ATTR_VALUE (insn.orig_insn, CGEN_INSN_RELAXABLE) != 0)
seen_relaxable_p = 1;
}
@ -1477,7 +1497,7 @@ md_estimate_size_before_relax (fragP, segment)
if ((strcmp (CGEN_INSN_MNEMONIC (insn),
CGEN_INSN_MNEMONIC (fragP->fr_cgen.insn))
== 0)
&& CGEN_INSN_ATTR (insn, CGEN_INSN_RELAX))
&& CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX))
break;
}
if (i == 4)
@ -1568,9 +1588,11 @@ md_convert_frag (abfd, sec, fragP)
4 /*length*/,
/* FIXME: quick hack */
#if 0
CGEN_OPERAND_ENTRY (fragP->fr_cgen.opindex),
CGEN_OPERAND_ENTRY (gas_cgen_cpu_desc,
fragP->fr_cgen.opindex),
#else
CGEN_OPERAND_ENTRY (M32R_OPERAND_DISP24),
CGEN_OPERAND_ENTRY (gas_cgen_cpu_desc,
M32R_OPERAND_DISP24),
#endif
fragP->fr_cgen.opinfo,
fragP->fr_symbol, fragP->fr_offset);
@ -1616,7 +1638,7 @@ md_cgen_lookup_reloc (insn, operand, fixP)
const CGEN_OPERAND * operand;
fixS * fixP;
{
switch (CGEN_OPERAND_TYPE (operand))
switch (CGEN_OPERAND_TYPE (gas_cgen_cpu_desc, operand))
{
case M32R_OPERAND_DISP8 : return BFD_RELOC_M32R_10_PCREL;
case M32R_OPERAND_DISP16 : return BFD_RELOC_M32R_18_PCREL;
@ -1673,7 +1695,7 @@ m32r_cgen_record_fixup_exp (frag, where, insn, length, operand, opinfo, exp)
fixS * fixP = gas_cgen_record_fixup_exp (frag, where, insn, length,
operand, opinfo, exp);
switch (CGEN_OPERAND_TYPE (operand))
switch (CGEN_OPERAND_TYPE (gas_cgen_cpu_desc, operand))
{
case M32R_OPERAND_HI16 :
/* If low/high/shigh/sda was used, it is recorded in `opinfo'. */

609
gas/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@ dnl brackets, be sure changequote invocations surround it.
dnl
dnl
dnl v2.5 needed for --bindir et al
AC_PREREQ(2.5)
AC_PREREQ(2.13)
AC_INIT(as.h)
AC_CANONICAL_SYSTEM
@ -38,6 +38,8 @@ AC_ARG_ENABLE(commonbfdlib,
*) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
esac])dnl
using_cgen=no
# Generate a header file
AM_CONFIG_HEADER(config.h:config.in)
@ -62,8 +64,6 @@ fi
emulations=""
using_cgen=no
for this_target in $target $canon_targets ; do
changequote(,)dnl
@ -389,12 +389,7 @@ dnl end-sanitize-beos
# Any other special object files needed ?
case ${cpu_type} in
fr30 | m32r)
case "x${extra_objects}" in
*cgen.o*) ;;
*) extra_objects="$extra_objects cgen.o"
using_cgen=yes
;;
esac
using_cgen=yes
;;
m68k)
@ -431,6 +426,13 @@ dnl end-sanitize-beos
;;
esac
if test $using_cgen = yes ; then
case "x${extra_objects}" in
*cgen.o*) ;;
*) extra_objects="$extra_objects cgen.o" ;;
esac
fi
# See if we really can support this configuration with the emulation code.
if test $this_target = $target ; then
@ -488,7 +490,7 @@ esac
# Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
cgen_cpu_prefix=""
if test "x$using_cgen" = xyes ; then
if test $using_cgen = yes ; then
case ${target_cpu} in
*) cgen_cpu_prefix=${target_cpu} ;;
esac
@ -662,8 +664,7 @@ ALL_LINGUAS=
CY_GNU_GETTEXT
AM_MAINTAINER_MODE
AM_CYGWIN32
AM_EXEEXT
AC_EXEEXT
AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h)
@ -743,7 +744,7 @@ AC_OUTPUT(Makefile doc/Makefile .gdbinit:gdbinit.in po/Makefile.in:po/Make-in,
echo '#include "te-'"${te_file}"'.h"' > targ-env.h
echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
if test "x$cgen_cpu_prefix" != x ; then
echo '#include "opcodes/'"${cgen_cpu_prefix}"'-opc.h"' > cgen-opc.h
echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
fi
sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile],