aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>1998-04-22 06:10:03 +0000
committerTom Tromey <tromey@redhat.com>1998-04-22 06:10:03 +0000
commit48401fcf8c8440e57ed0dbc2ade4828b9416090c (patch)
tree044bb8b9e142bd18f50bfb0311ea9e47736aafc7 /gas
parent9d04d6183d792349aaab84ecb1338b9445c0981b (diff)
downloadgdb-48401fcf8c8440e57ed0dbc2ade4828b9416090c.zip
gdb-48401fcf8c8440e57ed0dbc2ade4828b9416090c.tar.gz
gdb-48401fcf8c8440e57ed0dbc2ade4828b9416090c.tar.bz2
* Many files: Added gettext invocations around user-visible
strings. * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY, HAVE_LC_MESSAGES): Define. * dep-in.sed: Added asintl.h. * po/Make-in: New file. * gasp.c (main): Call setlocale, bindtextdomain, and textdomain. Include "asintl.h". * read.c (Z_): Renamed from `_'. * Makefile.am (SUBDIRS): Added po. (POTFILES): new macro. (po/POTFILES.in): New target. ($(OBJS)): Added asintl.h. (HFILES): Likewise. (INCLUDES): Added -DLOCALEDIR, -I$(top_srcdir)/../intl. (as_new_LDADD): Added $(INTLLIBS). (as_new_DEPENDENCIES): Added $(INTLDEPS). (gasp_new_LDADD): Added $(INTLLIBS). (gasp_new_DEPENDENCIES): New macro. * configure, aclocal.m4: Rebuilt. * configure.in: Call CY_GNU_GETTEXT. Generate po/Makefile.in and po/Makefile. (ALL_LINGUAS): Define. * macro.c: Include "asintl.h". * as.c (main): Call setlocale, bindtextdomain, and textdomain. * as.h: Include "asintl.h". * config/tc-i386.c (ordinal_names): Removed. (md_assemble): Changed error text to avoid ordinal_names. (i386_operand): Likewise. (reloc): Added as_bad to avoid i18n problems. (tc_gen_reloc): Likewise. * config/tc-arm.c (bad_args): Now a #define. (bad_pc): Likewise. * config/obj-vms.c (VMS_stab_parse): Changed type of `long_const_msg'. (global_symbol_directory): Unified strings to avoid i18n problems. * config/tc-m68k.c (get_reloc_code): Added some as_bad calls to avoid i18n problems. * config/tc-ns32k.c (reloc): Added as_bad to avoid i18n problems. * config/tc-ppc.c (md_apply_fix3): Added as_bad_where to avoid i18n problems. * config/tc-sh.c (md_convert_frag): Added as_bad to avoid i18n problems. start-sanitize-v850 * config/tc-v850.c (md_assemble): Changed C++ comment into C comment. end-sanitize-v850 * config/tc-vax.c (md_assemble): Added as_warn to avoid i18n problems. * as.c (print_version_id): Added an fprintf to avoid i18n problems. * cond.c (cond_finish_check): Added as_bad call to avoid i18n problems. * expr.c (expr): Added as_warn call to avoid i18n problems. * messages.c (as_assert): Changed code to avoid i18n problems. (as_abort): Likewise. * read.c (pseudo_set): Added as_bad call to avoid i18n problems. (s_space): Likewise. * po/Make-in, po/POTFILES.in, po/gas.pot: New files.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog63
-rw-r--r--gas/Makefile.am58
-rw-r--r--gas/Makefile.in43
-rw-r--r--gas/acconfig.h15
-rw-r--r--gas/as.c75
-rw-r--r--gas/asintl.h44
-rw-r--r--gas/cgen.c22
-rw-r--r--gas/config/atof-tahoe.c4
-rw-r--r--gas/config/obj-bout.c2
-rw-r--r--gas/config/obj-coff.c160
-rw-r--r--gas/config/obj-ieee.c8
-rw-r--r--gas/config/obj-vms.c75
-rw-r--r--gas/config/tc-a29k.c38
-rw-r--r--gas/config/tc-alpha.c210
-rw-r--r--gas/config/tc-arm.c477
-rw-r--r--gas/config/tc-d30v.c73
-rw-r--r--gas/config/tc-h8500.c46
-rw-r--r--gas/config/tc-hppa.c256
-rw-r--r--gas/config/tc-i386.c126
-rw-r--r--gas/config/tc-i960.c183
-rw-r--r--gas/config/tc-m32r.c121
-rw-r--r--gas/config/tc-m68k.c297
-rw-r--r--gas/config/tc-m88k.c38
-rw-r--r--gas/config/tc-m88k.h4
-rw-r--r--gas/config/tc-mips.c355
-rw-r--r--gas/config/tc-ppc.c205
-rw-r--r--gas/config/tc-sh.c254
-rw-r--r--gas/config/tc-sparc.c300
-rw-r--r--gas/config/tc-sparc.h14
-rw-r--r--gas/config/tc-tahoe.c110
-rw-r--r--gas/config/tc-tic80.c44
-rw-r--r--gas/config/tc-v850.c122
-rw-r--r--gas/config/tc-w65.c26
-rwxr-xr-xgas/configure1876
-rw-r--r--gas/configure.in9
-rw-r--r--gas/ecoff.c245
-rw-r--r--gas/gasp.c165
-rw-r--r--gas/po/Make-in250
-rw-r--r--gas/po/POTFILES.in157
-rw-r--r--gas/read.c358
40 files changed, 4769 insertions, 2159 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index f89e2c7..8d4b8eb 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,66 @@
+Tue Apr 21 22:34:25 1998 Tom Tromey <tromey@scribbles.cygnus.com>
+
+ * Many files: Added gettext invocations around user-visible
+ strings.
+ * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
+ HAVE_LC_MESSAGES): Define.
+ * dep-in.sed: Added asintl.h.
+ * po/Make-in: New file.
+ * gasp.c (main): Call setlocale, bindtextdomain, and textdomain.
+ Include "asintl.h".
+ * read.c (Z_): Renamed from `_'.
+ * Makefile.am (SUBDIRS): Added po.
+ (POTFILES): new macro.
+ (po/POTFILES.in): New target.
+ ($(OBJS)): Added asintl.h.
+ (HFILES): Likewise.
+ (INCLUDES): Added -DLOCALEDIR, -I$(top_srcdir)/../intl.
+ (as_new_LDADD): Added $(INTLLIBS).
+ (as_new_DEPENDENCIES): Added $(INTLDEPS).
+ (gasp_new_LDADD): Added $(INTLLIBS).
+ (gasp_new_DEPENDENCIES): New macro.
+ * configure, aclocal.m4: Rebuilt.
+ * configure.in: Call CY_GNU_GETTEXT. Generate po/Makefile.in and
+ po/Makefile.
+ (ALL_LINGUAS): Define.
+ * macro.c: Include "asintl.h".
+ * as.c (main): Call setlocale, bindtextdomain, and textdomain.
+ * as.h: Include "asintl.h".
+ * config/tc-i386.c (ordinal_names): Removed.
+ (md_assemble): Changed error text to avoid ordinal_names.
+ (i386_operand): Likewise.
+ (reloc): Added as_bad to avoid i18n problems.
+ (tc_gen_reloc): Likewise.
+ * config/tc-arm.c (bad_args): Now a #define.
+ (bad_pc): Likewise.
+ * config/obj-vms.c (VMS_stab_parse): Changed type of
+ `long_const_msg'.
+ (global_symbol_directory): Unified strings to avoid i18n
+ problems.
+ * config/tc-m68k.c (get_reloc_code): Added some as_bad calls to
+ avoid i18n problems.
+ * config/tc-ns32k.c (reloc): Added as_bad to avoid i18n problems.
+ * config/tc-ppc.c (md_apply_fix3): Added as_bad_where to avoid
+ i18n problems.
+ * config/tc-sh.c (md_convert_frag): Added as_bad to avoid i18n
+ problems.
+start-sanitize-v850
+ * config/tc-v850.c (md_assemble): Changed C++ comment into C
+ comment.
+end-sanitize-v850
+ * config/tc-vax.c (md_assemble): Added as_warn to avoid i18n
+ problems.
+ * as.c (print_version_id): Added an fprintf to avoid i18n
+ problems.
+ * cond.c (cond_finish_check): Added as_bad call to avoid i18n
+ problems.
+ * expr.c (expr): Added as_warn call to avoid i18n problems.
+ * messages.c (as_assert): Changed code to avoid i18n problems.
+ (as_abort): Likewise.
+ * read.c (pseudo_set): Added as_bad call to avoid i18n problems.
+ (s_space): Likewise.
+ * po/Make-in, po/POTFILES.in, po/gas.pot: New files.
+
Tue Apr 21 17:01:22 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
* config/tc-i386.c (check_prefix): New static function, split out
diff --git a/gas/Makefile.am b/gas/Makefile.am
index 695ae1d..810769c 100644
--- a/gas/Makefile.am
+++ b/gas/Makefile.am
@@ -2,7 +2,7 @@
AUTOMAKE_OPTIONS = cygnus dejagnu
-SUBDIRS = doc
+SUBDIRS = doc po
tooldir = $(exec_prefix)/$(target_alias)
@@ -153,6 +153,7 @@ CFILES = $(GAS_CFILES) gasp.c itbl-ops.c
HFILES = \
as.h \
+ asintl.h \
bignum.h \
bit_fix.h \
ecoff.h \
@@ -340,6 +341,13 @@ GENERIC_OBJS = \
OBJS = $(CONFIG_OBJS) $(GENERIC_OBJS)
+POTFILES = $(MULTI_CFILES) $(TARGET_ENV_HFILES) $(OBJ_FORMAT_HFILES) \
+ $(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \
+ $(HFILES) $(CFILES) $(GAS_CFILES)
+po/POTFILES.in: @MAINT@ Makefile
+ for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in
+
noinst_PROGRAMS = as-new gasp-new
noinst_SCRIPTS = .gdbinit
@@ -367,13 +375,13 @@ INCDIR = $(BASEDIR)/include
# Both . and srcdir are used, in that order,
# so that tm.h and config.h will be found in the compilation
# subdirectory rather than in the source directory.
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR)
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
# This should be parallel to INCLUDES, but should replace $(srcdir)
# with $${srcdir}, and should work in a subdirectory. This is used
# when building dependencies, because the dependency building is done
# in a subdirectory.
-DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. -I$${srcdir}/../bfd
+DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. -I$${srcdir}/../bfd -I$${srcdir}/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
# How to link with both our special library facilities
# and the system's installed libraries.
@@ -387,18 +395,19 @@ $(OBJS): @ALL_OBJ_DEPS@
as_new_SOURCES = $(GAS_CFILES)
as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
- $(extra_objects) $(GASLIBS)
+ $(extra_objects) $(GASLIBS) $(INTLLIBS)
as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
- $(extra_objects) $(GASLIBS)
+ $(extra_objects) $(GASLIBS) $(INTLDEPS)
# Stuff that every object file depends upon. If anything is removed
# from this list, remove it from dep-in.sed as well.
$(OBJS): config.h as.h $(TARG_ENV_H) $(OBJ_FORMAT_H) $(TARG_CPU_H) flonum.h \
expr.h struc-symbol.h write.h frags.h hash.h read.h symbols.h tc.h \
- obj.h listing.h bignum.h bit_fix.h $(INCDIR)/libiberty.h
+ obj.h listing.h bignum.h bit_fix.h $(INCDIR)/libiberty.h asintl.h
gasp_new_SOURCES = gasp.c macro.c sb.c hash.c
-gasp_new_LDADD = ../libiberty/libiberty.a
+gasp_new_LDADD = ../libiberty/libiberty.a $(INTLLIBS)
+gasp_new_DEPENDENCIES = ../libiberty/libiberty.a $(INTLDEPS)
EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
echo $${rootme}/../expect/expect ; \
@@ -657,7 +666,8 @@ DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
echo '' > itbl-cpu.h; \
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
$(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $?
- mv -f .depdir/.dep .dep1
+ sed -e '/IF YOU PUT ANYTHING/,$$d' < .depdir/.dep > .dep1
+ rm -f .depdir/.dep
# Work out the special dependencies for the tc-*.c files.
.tcdep: $(TARGET_CPU_CFILES)
@@ -686,9 +696,9 @@ DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
else true; fi; \
done; \
done
- echo 'TCDEP_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \' >> .tcdepa
- echo ' $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h \' >> .tcdepa
- echo ' $(INCDIR)/opcode/hppa.h $(BFDDIR)/som.h' >> .tcdepa
+ echo 'TCDEP_hppa_som = $$(srcdir)/config/tc-hppa.h subsegs.h \' >> .tcdepa
+ echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> .tcdepa
+ echo ' $$(INCDIR)/opcode/hppa.h $$(BFDDIR)/som.h' >> .tcdepa
# We don't try to handle all multi cases.
for c in $(CPU_TYPES); do \
$(CPU_MULTI_VALID) \
@@ -731,10 +741,10 @@ DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
else true; fi; \
done; \
done
- echo 'OBJDEP_hppa_som = $(srcdir)/config/obj-som.h subsegs.h \' >> .objdepa
- echo ' $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h \' >> .objdepa
- echo ' $(BFDDIR)/som.h $(INCDIR)/aout/stab_gnu.h \' >> .objdepa
- echo ' $(INCDIR)/aout/stab.def' >> .objdepa
+ echo 'OBJDEP_hppa_som = $$(srcdir)/config/obj-som.h subsegs.h \' >> .objdepa
+ echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> .objdepa
+ echo ' $$(BFDDIR)/som.h $$(INCDIR)/aout/stab_gnu.h \' >> .objdepa
+ echo ' $$(INCDIR)/aout/stab.def' >> .objdepa
# We don't try to handle all multi cases.
for c in $(CPU_TYPES); do \
$(CPU_MULTI_VALID) \
@@ -773,7 +783,7 @@ DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
else true; fi; \
done; \
done
- echo 'DEP_hppa_som = $(srcdir)/../bfd/som.h' >> .dep2a
+ echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> .dep2a
# We don't try to handle all multi cases.
for c in $(CPU_TYPES); do \
$(CPU_MULTI_VALID) \
@@ -791,10 +801,11 @@ DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
mv -f .dep2a .dep2
dep.sed: dep-in.sed config.status
+ srcdir=`cd $(srcdir); pwd`; \
sed <$(srcdir)/dep-in.sed >dep.sed \
- -e 's!@INCDIR@!$(INCDIR)!' \
- -e 's!@BFDDIR@!$(BFDDIR)!' \
- -e 's!@SRCDIR@!$(srcdir)!'
+ -e "s!@INCDIR@!$${srcdir}/../include!" \
+ -e "s!@BFDDIR@!$${srcdir}/../bfd!" \
+ -e "s!@SRCDIR@!$${srcdir}!"
dep: .dep
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
@@ -855,7 +866,6 @@ e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul.h \
emul-target.h
e-mipself.o: $(srcdir)/config/e-mipself.c emul.h emul-target.h
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
TCDEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h
TCDEP_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \
@@ -957,12 +967,12 @@ 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 cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \
- $(INCDIR)/opcode/cgen.h
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h cgen-opc.h \
+ $(srcdir)/../opcodes/m32r-opc.h $(INCDIR)/opcode/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 cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \
+ $(INCDIR)/obstack.h $(INCDIR)/symcat.h cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \
$(INCDIR)/opcode/cgen.h
TCDEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
@@ -1129,7 +1139,7 @@ OBJDEP_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 ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
- $(INCDIR)/aout/aout64.h
+ $(INCDIR)/elf/alpha.h $(INCDIR)/aout/aout64.h
OBJDEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
OBJDEP_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
diff --git a/gas/Makefile.in b/gas/Makefile.in
index 9def1d7..529922b 100644
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -66,28 +66,47 @@ target_triplet = @target@
ALL_OBJ_DEPS = @ALL_OBJ_DEPS@
AS = @AS@
BFDLIB = @BFDLIB@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
+DATADIRNAME = @DATADIRNAME@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
LD = @LD@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
NM = @NM@
OPCODES_LIB = @OPCODES_LIB@
PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
RANLIB = @RANLIB@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
atof = @atof@
extra_objects = @extra_objects@
+l = @l@
obj_format = @obj_format@
target_cpu_type = @target_cpu_type@
te_file = @te_file@
AUTOMAKE_OPTIONS = cygnus dejagnu
-SUBDIRS = doc
+SUBDIRS = doc po
tooldir = $(exec_prefix)/$(target_alias)
@@ -238,6 +257,7 @@ CFILES = $(GAS_CFILES) gasp.c itbl-ops.c
HFILES = \
as.h \
+ asintl.h \
bignum.h \
bit_fix.h \
ecoff.h \
@@ -425,6 +445,10 @@ GENERIC_OBJS = \
OBJS = $(CONFIG_OBJS) $(GENERIC_OBJS)
+POTFILES = $(MULTI_CFILES) $(TARGET_ENV_HFILES) $(OBJ_FORMAT_HFILES) \
+ $(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \
+ $(HFILES) $(CFILES) $(GAS_CFILES)
+
noinst_PROGRAMS = as-new gasp-new
noinst_SCRIPTS = .gdbinit
@@ -445,13 +469,13 @@ INCDIR = $(BASEDIR)/include
# Both . and srcdir are used, in that order,
# so that tm.h and config.h will be found in the compilation
# subdirectory rather than in the source directory.
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR)
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
# This should be parallel to INCLUDES, but should replace $(srcdir)
# with $${srcdir}, and should work in a subdirectory. This is used
# when building dependencies, because the dependency building is done
# in a subdirectory.
-DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. -I$${srcdir}/../bfd
+DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. -I$${srcdir}/../bfd -I$${srcdir}/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
# How to link with both our special library facilities
# and the system's installed libraries.
@@ -463,12 +487,13 @@ STAGESTUFF = *.o $(noinst_PROGRAMS)
as_new_SOURCES = $(GAS_CFILES)
as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
- $(extra_objects) $(GASLIBS)
+ $(extra_objects) $(GASLIBS) $(INTLLIBS)
as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
- $(extra_objects) $(GASLIBS)
+ $(extra_objects) $(GASLIBS) $(INTLDEPS)
gasp_new_SOURCES = gasp.c macro.c sb.c hash.c
-gasp_new_LDADD = ../libiberty/libiberty.a
+gasp_new_LDADD = ../libiberty/libiberty.a $(INTLLIBS)
+gasp_new_DEPENDENCIES = ../libiberty/libiberty.a $(INTLDEPS)
EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
echo $${rootme}/../expect/expect ; \
@@ -1216,7 +1241,6 @@ literal.o macro.o messages.o output-file.o read.o sb.o stabs.o \
subsegs.o symbols.o write.o
as_new_LDFLAGS =
gasp_new_OBJECTS = gasp.o macro.o sb.o hash.o
-gasp_new_DEPENDENCIES = ../libiberty/libiberty.a
gasp_new_LDFLAGS =
SCRIPTS = $(noinst_SCRIPTS)
@@ -1575,6 +1599,9 @@ install-exec-am install-exec install-data install uninstall all \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+po/POTFILES.in: @MAINT@ Makefile
+ for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in
$(srcdir)/make-gas.com: stamp-mk.com
stamp-mk.com: vmsconf.sh Makefile
@@ -1589,7 +1616,7 @@ $(OBJS): @ALL_OBJ_DEPS@
# from this list, remove it from dep-in.sed as well.
$(OBJS): config.h as.h $(TARG_ENV_H) $(OBJ_FORMAT_H) $(TARG_CPU_H) flonum.h \
expr.h struc-symbol.h write.h frags.h hash.h read.h symbols.h tc.h \
- obj.h listing.h bignum.h bit_fix.h $(INCDIR)/libiberty.h
+ obj.h listing.h bignum.h bit_fix.h $(INCDIR)/libiberty.h asintl.h
check-DEJAGNU: site.exp
if [ -d testsuite ]; then \
diff --git a/gas/acconfig.h b/gas/acconfig.h
index c9c6002..95e970b 100644
--- a/gas/acconfig.h
+++ b/gas/acconfig.h
@@ -77,3 +77,18 @@
/* Needed only for SCO 5. */
#undef SCO_ELF
+
+/* Define to 1 if NLS is requested. */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have catgets and don't want to use GNU gettext. */
+#undef HAVE_CATGETS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
+
+/* Define as 1 if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
diff --git a/gas/as.c b/gas/as.c
index 3bbf2d5..fc2ec45 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -116,9 +116,11 @@ print_version_id ()
return;
printed = 1;
- fprintf (stderr, "GNU assembler version %s (%s)", VERSION, TARGET_ALIAS);
#ifdef BFD_ASSEMBLER
- fprintf (stderr, ", using BFD version %s", BFD_VERSION);
+ fprintf (stderr, _("GNU assembler version %s (%s) using BFD version %s"),
+ VERSION, TARGET_ALIAS, BFD_VERSION);
+#else
+ fprintf (stderr, _("GNU assembler version %s (%s)"), VERSION, TARGET_ALIAS);
#endif
fprintf (stderr, "\n");
}
@@ -127,9 +129,9 @@ static void
show_usage (stream)
FILE *stream;
{
- fprintf (stream, "Usage: %s [option...] [asmfile...]\n", myname);
+ fprintf (stream, _("Usage: %s [option...] [asmfile...]\n"), myname);
- fprintf (stream, "\
+ fprintf (stream, _("\
Options:\n\
-a[sub-option...] turn on listings\n\
Sub-options [default hls]:\n\
@@ -140,8 +142,8 @@ Options:\n\
m include macro expansions\n\
n omit forms processing\n\
s include symbols\n\
- =file set listing file name (must be last sub-option)\n");
- fprintf (stream, "\
+ =file set listing file name (must be last sub-option)\n"));
+ fprintf (stream, _("\
-D produce assembler debugging messages\n\
--defsym SYM=VAL define symbol SYM to given value\n\
-f skip whitespace and comment preprocessing\n\
@@ -150,8 +152,8 @@ Options:\n\
-I DIR add DIR to search list for .include directives\n\
-J don't warn about signed overflow\n\
-K warn when differences altered for long displacements\n\
--L,--keep-locals keep local symbols (e.g. starting with `L')\n");
- fprintf (stream, "\
+-L,--keep-locals keep local symbols (e.g. starting with `L')\n"));
+ fprintf (stream, _("\
-M,--mri assemble in MRI compatibility mode\n\
--MD FILE write dependency information in FILE (default none)\n\
-nocpp ignored\n\
@@ -166,8 +168,8 @@ Options:\n\
matching the specifications defined in file INSTTBL\n\
-w ignored\n\
-X ignored\n\
--Z generate object file even after errors\n");
- fprintf (stream, "\
+-Z generate object file even after errors\n"));
+ fprintf (stream, _("\
--listing-lhs-width set the width in words of the output data column of\n\
the listing\n\
--listing-lhs-width2 set the width in words of the continuation lines\n\
@@ -176,11 +178,11 @@ Options:\n\
--listing-rhs-width set the max width in characters of the lines from\n\
the source file\n\
--listing-cont-lines set the maximum number of continuation lines used\n\
- for the output data column of the listing\n");
+ for the output data column of the listing\n"));
md_show_usage (stream);
- fprintf (stream, "\nReport bugs to bug-gnu-utils@prep.ai.mit.edu\n");
+ fprintf (stream, _("\nReport bugs to bug-gnu-utils@gnu.org\n"));
}
#ifdef USE_EMULATIONS
@@ -217,7 +219,7 @@ select_emulation_mode (argc, argv)
p = argv[i+1];
if (!p || !*p)
- as_fatal ("missing emulation mode name");
+ as_fatal (_("missing emulation mode name"));
em = p;
do_default:
@@ -232,7 +234,7 @@ select_emulation_mode (argc, argv)
if (!strcmp (emulations[i]->name, em))
break;
if (i == n_emulations)
- as_fatal ("unrecognized emulation name `%s'", em);
+ as_fatal (_("unrecognized emulation name `%s'"), em);
this_emulation = emulations[i];
}
else
@@ -450,33 +452,33 @@ parse_args (pargc, pargv)
case OPTION_VERSION:
/* This output is intended to follow the GNU standards document. */
- printf ("GNU assembler %s\n", VERSION);
- printf ("Copyright 1997 Free Software Foundation, Inc.\n");
- printf ("\
+ printf (_("GNU assembler %s\n"), VERSION);
+ printf (_("Copyright 1997 Free Software Foundation, Inc.\n"));
+ printf (_("\
This program is free software; you may redistribute it under the terms of\n\
-the GNU General Public License. This program has absolutely no warranty.\n");
- printf ("This assembler was configured for a target of `%s'.\n",
+the GNU General Public License. This program has absolutely no warranty.\n"));
+ printf (_("This assembler was configured for a target of `%s'.\n"),
TARGET_ALIAS);
exit (EXIT_SUCCESS);
case OPTION_EMULATION:
#ifdef USE_EMULATIONS
if (strcmp (optarg, this_emulation->name))
- as_fatal ("multiple emulation names specified");
+ as_fatal (_("multiple emulation names specified"));
#else
- as_fatal ("emulations not handled in this configuration");
+ as_fatal (_("emulations not handled in this configuration"));
#endif
break;
case OPTION_DUMPCONFIG:
- fprintf (stderr, "alias = %s\n", TARGET_ALIAS);
- fprintf (stderr, "canonical = %s\n", TARGET_CANONICAL);
- fprintf (stderr, "cpu-type = %s\n", TARGET_CPU);
+ fprintf (stderr, _("alias = %s\n"), TARGET_ALIAS);
+ fprintf (stderr, _("canonical = %s\n"), TARGET_CANONICAL);
+ fprintf (stderr, _("cpu-type = %s\n"), TARGET_CPU);
#ifdef TARGET_OBJ_FORMAT
- fprintf (stderr, "format = %s\n", TARGET_OBJ_FORMAT);
+ fprintf (stderr, _("format = %s\n"), TARGET_OBJ_FORMAT);
#endif
#ifdef TARGET_FORMAT
- fprintf (stderr, "bfd-target = %s\n", TARGET_FORMAT);
+ fprintf (stderr, _("bfd-target = %s\n"), TARGET_FORMAT);
#endif
exit (EXIT_SUCCESS);
@@ -489,7 +491,7 @@ the GNU General Public License. This program has absolutely no warranty.\n");
for (s = optarg; *s != '\0' && *s != '='; s++)
;
if (*s == '\0')
- as_fatal ("bad defsym; format is --defsym name=value");
+ as_fatal (_("bad defsym; format is --defsym name=value"));
*s++ = '\0';
i = strtol (s, (char **) NULL, 0);
n = (struct defsym_list *) xmalloc (sizeof *n);
@@ -509,7 +511,7 @@ the GNU General Public License. This program has absolutely no warranty.\n");
if (optarg == NULL)
{
- as_warn ( "No file name following -t option\n" );
+ as_warn ( _("No file name following -t option\n") );
break;
}
@@ -525,7 +527,7 @@ the GNU General Public License. This program has absolutely no warranty.\n");
itbl_files->name = xstrdup (optarg);
if (itbl_parse (itbl_files->name) != 0)
{
- fprintf (stderr, "Failed to read instruction table %s\n",
+ fprintf (stderr, _("Failed to read instruction table %s\n"),
itbl_files->name);
exit (EXIT_SUCCESS);
}
@@ -625,7 +627,7 @@ the GNU General Public License. This program has absolutely no warranty.\n");
optarg += strlen (listing_filename);
break;
default:
- as_fatal ("invalid listing option `%c'", *optarg);
+ as_fatal (_("invalid listing option `%c'"), *optarg);
break;
}
optarg++;
@@ -685,6 +687,9 @@ main (argc, argv)
start_time = get_run_time ();
+ setlocale (LC_MESSAGES, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
if (debug_memory)
{
@@ -843,10 +848,10 @@ dump_statistics ()
#endif
long run_time = get_run_time () - start_time;
- fprintf (stderr, "%s: total time in assembly: %ld.%06ld\n",
+ fprintf (stderr, _("%s: total time in assembly: %ld.%06ld\n"),
myname, run_time / 1000000, run_time % 1000000);
#ifdef HAVE_SBRK
- fprintf (stderr, "%s: data size %ld\n",
+ fprintf (stderr, _("%s: data size %ld\n"),
myname, (long) (lim - (char *) &environ));
#endif
@@ -921,9 +926,9 @@ perform_an_assembly_pass (argc, argv)
#else /* BFD_ASSEMBLER */
/* Create the standard sections, and those the assembler uses
internally. */
- text_section = subseg_new (".text", 0);
- data_section = subseg_new (".data", 0);
- bss_section = subseg_new (".bss", 0);
+ text_section = subseg_new (TEXT_SECTION_NAME, 0);
+ data_section = subseg_new (DATA_SECTION_NAME, 0);
+ bss_section = subseg_new (BSS_SECTION_NAME, 0);
/* @@ FIXME -- we're setting the RELOC flag so that sections are assumed
to have relocs, otherwise we don't find out in time. */
applicable = bfd_applicable_section_flags (stdoutput);
diff --git a/gas/asintl.h b/gas/asintl.h
new file mode 100644
index 0000000..6b0ae42
--- /dev/null
+++ b/gas/asintl.h
@@ -0,0 +1,44 @@
+/* asintl.h - gas-specific header for gettext code.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+
+ Written by Tom Tromey <tromey@cygnus.com>
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS 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 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 GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#ifdef ENABLE_NLS
+#include <libintl.h>
+#define _(String) gettext (String)
+#ifdef gettext_noop
+#define N_(String) gettext_noop (String)
+#else
+#define N_(String) (String)
+#endif
+#else
+/* Stubs that do something close enough. */
+#define textdomain(String) (String)
+#define gettext(String) (String)
+#define dgettext(Domain,Message) (Message)
+#define dcgettext(Domain,Message,Type) (Message)
+#define bindtextdomain(Domain,Directory) (Domain)
+#define _(String) (String)
+#define N_(String) (String)
+/* In this case we don't care about the value. */
+#ifndef LC_MESSAGES
+#define LC_MESSAGES 0
+#endif
+#endif
diff --git a/gas/cgen.c b/gas/cgen.c
index 7df4bef..3e1885e 100644
--- a/gas/cgen.c
+++ b/gas/cgen.c
@@ -20,6 +20,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <setjmp.h>
#include "ansidecl.h"
#include "bfd.h"
+#include "symcat.h"
#include "cgen-opc.h"
#include "as.h"
#include "subsegs.h"
@@ -80,7 +81,7 @@ cgen_queue_fixup (opindex, opinfo, expP)
{
/* We need to generate a fixup for this expression. */
if (num_fixups >= MAX_FIXUPS)
- as_fatal ("too many fixups");
+ as_fatal (_("too many fixups"));
fixups[num_fixups].exp = * expP;
fixups[num_fixups].opindex = opindex;
fixups[num_fixups].opinfo = opinfo;
@@ -281,11 +282,11 @@ cgen_parse_operand (want, strP, opindex, opinfo, resultP, valueP)
switch (exp.X_op)
{
case O_illegal :
- errmsg = "illegal operand";
+ errmsg = _("illegal operand");
* resultP = CGEN_PARSE_OPERAND_RESULT_ERROR;
break;
case O_absent :
- errmsg = "missing operand";
+ errmsg = _("missing operand");
* resultP = CGEN_PARSE_OPERAND_RESULT_ERROR;
break;
case O_constant :
@@ -475,8 +476,8 @@ cgen_md_apply_fix3 (fixP, valueP, seg)
valueT * valueP;
segT seg;
{
- char * where = fixP->fx_frag->fr_literal + fixP->fx_where;
- valueT value;
+ char * where = fixP->fx_frag->fr_literal + fixP->fx_where;
+ valueT value;
/* FIXME FIXME FIXME: The value we are passed in *valuep includes
the symbol values. Since we are using BFD_ASSEMBLER, if we are
@@ -507,7 +508,7 @@ cgen_md_apply_fix3 (fixP, valueP, seg)
{
/* We don't actually support subtracting a symbol. */
as_bad_where (fixP->fx_file, fixP->fx_line,
- "expression too complex");
+ _("expression too complex"));
}
}
}
@@ -528,14 +529,11 @@ cgen_md_apply_fix3 (fixP, valueP, seg)
finish the job. Testing for pcrel is a temporary hack. */
|| fixP->fx_pcrel)
{
- /* This may seem like overkill, and using bfd_install_relocation or
- some such may be preferable, but this is simple. */
CGEN_FIELDS_BITSIZE (& fields) = CGEN_INSN_BITSIZE (insn);
CGEN_SYM (set_operand) (opindex, & value, & fields);
- errmsg = CGEN_SYM (validate_operand) (opindex, & fields);
+ errmsg = CGEN_SYM (insert_operand) (opindex, & fields, where);
if (errmsg)
as_warn_where (fixP->fx_file, fixP->fx_line, "%s\n", errmsg);
- CGEN_SYM (insert_operand) (opindex, & fields, where);
}
if (fixP->fx_done)
@@ -554,7 +552,7 @@ cgen_md_apply_fix3 (fixP, valueP, seg)
else
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- "unresolved expression that must be resolved");
+ _("unresolved expression that must be resolved"));
fixP->fx_done = 1;
return 1;
}
@@ -609,7 +607,7 @@ cgen_tc_gen_reloc (section, fixP)
if (reloc->howto == (reloc_howto_type *) NULL)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- "internal error: can't export reloc type %d (`%s')",
+ _("internal error: can't export reloc type %d (`%s')"),
fixP->fx_r_type, bfd_get_reloc_code_name (fixP->fx_r_type));
return NULL;
}
diff --git a/gas/config/atof-tahoe.c b/gas/config/atof-tahoe.c
index 195ea2f..760485c 100644
--- a/gas/config/atof-tahoe.c
+++ b/gas/config/atof-tahoe.c
@@ -1,6 +1,6 @@
/* atof_tahoe.c - turn a string into a Tahoe floating point number
- Copyright (C) 1987 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1998 Free Software Foundation, Inc.
*/
/* This is really a simplified version of atof_vax.c. I glommed it wholesale
@@ -425,7 +425,7 @@ md_atof (what_statement_type, literalP, sizeP)
};
*sizeP = number_of_chars;
- return kind_of_float ? 0 : "Bad call to md_atof()";
+ return kind_of_float ? 0 : _("Bad call to md_atof()");
}
/* atof_tahoe.c */
diff --git a/gas/config/obj-bout.c b/gas/config/obj-bout.c
index f1883fa..c9b80f5 100644
--- a/gas/config/obj-bout.c
+++ b/gas/config/obj-bout.c
@@ -309,7 +309,7 @@ obj_crawl_symbol_chain (headers)
{
if (S_IS_EXTERNAL (symbolP) || !S_IS_DEFINED (symbolP))
{
- as_bad ("Local symbol %s never defined", S_GET_NAME (symbolP));
+ as_bad (_("Local symbol %s never defined"), S_GET_NAME (symbolP));
} /* oops. */
/* Unhook it from the chain */
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c
index 394bc19..5940fbd 100644
--- a/gas/config/obj-coff.c
+++ b/gas/config/obj-coff.c
@@ -1,5 +1,5 @@
/* coff object file format
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GAS.
@@ -30,6 +30,7 @@
#define KEEP_RELOC_INFO
#endif
+static void obj_coff_bss PARAMS ((int));
const char *s_get_name PARAMS ((symbolS * s));
static symbolS *def_symbol_in_progress;
@@ -129,7 +130,7 @@ tag_insert (name, symbolP)
if ((error_string = hash_jam (tag_hash, name, (char *) symbolP)))
{
- as_fatal ("Inserting \"%s\" into structure table failed: %s",
+ as_fatal (_("Inserting \"%s\" into structure table failed: %s"),
name, error_string);
}
}
@@ -165,7 +166,18 @@ tag_find_or_make (name)
return symbolP;
}
+/* We accept the .bss directive to set the section for backward
+ compatibility with earlier versions of gas. */
+static void
+obj_coff_bss (ignore)
+ int ignore;
+{
+ if (*input_line_pointer == '\n')
+ subseg_new (".bss", get_absolute_expression ());
+ else
+ s_lcomm (0);
+}
#ifdef BFD_ASSEMBLER
@@ -401,7 +413,7 @@ obj_coff_ln (appline)
if (! appline && def_symbol_in_progress != NULL)
{
- as_warn (".ln pseudo-op inside .def/.endef: ignored.");
+ as_warn (_(".ln pseudo-op inside .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
}
@@ -461,7 +473,7 @@ obj_coff_def (what)
if (def_symbol_in_progress != NULL)
{
- as_warn (".def pseudo-op used inside of .def/.endef: ignored.");
+ as_warn (_(".def pseudo-op used inside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -506,7 +518,7 @@ obj_coff_endef (ignore)
dim_index = 0;
if (def_symbol_in_progress == NULL)
{
- as_warn (".endef pseudo-op used outside of .def/.endef: ignored.");
+ as_warn (_(".endef pseudo-op used outside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -540,7 +552,7 @@ obj_coff_endef (ignore)
if (name[1] == 'b' && name[2] == 'f')
{
if (! in_function ())
- as_warn ("`%s' symbol without preceding function", name);
+ as_warn (_("`%s' symbol without preceding function"), name);
/* SA_SET_SYM_LNNO (def_symbol_in_progress, 12345);*/
/* Will need relocating */
SF_SET_PROCESS (def_symbol_in_progress);
@@ -577,7 +589,7 @@ obj_coff_endef (ignore)
case C_USTATIC:
case C_EXTDEF:
case C_ULABEL:
- as_warn ("unexpected storage class %d",
+ as_warn (_("unexpected storage class %d"),
S_GET_STORAGE_CLASS (def_symbol_in_progress));
break;
} /* switch on storage class */
@@ -679,7 +691,7 @@ obj_coff_dim (ignore)
if (def_symbol_in_progress == NULL)
{
- as_warn (".dim pseudo-op used outside of .def/.endef: ignored.");
+ as_warn (_(".dim pseudo-op used outside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -699,7 +711,7 @@ obj_coff_dim (ignore)
break;
default:
- as_warn ("badly formed .dim directive ignored");
+ as_warn (_("badly formed .dim directive ignored"));
/* intentional fallthrough */
case '\n':
case ';':
@@ -750,7 +762,7 @@ obj_coff_size (ignore)
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".size pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".size pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -766,7 +778,7 @@ obj_coff_scl (ignore)
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".scl pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".scl pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -784,7 +796,7 @@ obj_coff_tag (ignore)
if (def_symbol_in_progress == NULL)
{
- as_warn (".tag pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".tag pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
}
@@ -803,7 +815,7 @@ obj_coff_tag (ignore)
tag_find_or_make (symbol_name));
if (SA_GET_SYM_TAGNDX (def_symbol_in_progress) == 0L)
{
- as_warn ("tag not found for .tag %s", symbol_name);
+ as_warn (_("tag not found for .tag %s"), symbol_name);
} /* not defined */
SF_SET_TAGGED (def_symbol_in_progress);
@@ -818,7 +830,7 @@ obj_coff_type (ignore)
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".type pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".type pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -840,7 +852,7 @@ obj_coff_val (ignore)
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".val pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".val pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -958,7 +970,7 @@ coff_frob_symbol (symp, punt)
symbolS *begin;
begin = *(symbolS **) stack_pop (block_stack);
if (begin == 0)
- as_warn ("mismatched .eb");
+ as_warn (_("mismatched .eb"));
else
next_set_end = begin;
}
@@ -976,7 +988,7 @@ coff_frob_symbol (symp, punt)
if (S_GET_STORAGE_CLASS (symp) == C_EFCN)
{
if (coff_last_function == 0)
- as_fatal ("C_EFCN symbol out of scope");
+ as_fatal (_("C_EFCN symbol out of scope"));
SA_SET_SYM_FSIZE (coff_last_function,
(long) (S_GET_VALUE (symp)
- S_GET_VALUE (coff_last_function)));
@@ -1088,8 +1100,9 @@ coff_adjust_section_syms (abfd, sec, x)
fixS *fixp = seginfo->fix_root;
while (fixp)
{
+ if (! fixp->fx_done)
+ nrelocs++;
fixp = fixp->fx_next;
- nrelocs++;
}
}
if (bfd_get_section_size_before_reloc (sec) == 0
@@ -1105,7 +1118,7 @@ coff_adjust_section_syms (abfd, sec, x)
}
void
-coff_frob_file ()
+coff_frob_file_after_relocs ()
{
bfd_map_over_sections (stdoutput, coff_adjust_section_syms, (char*) 0);
}
@@ -1184,12 +1197,12 @@ obj_coff_section (ignore)
case 'i': /* STYP_INFO */
case 'l': /* STYP_LIB */
case 'o': /* STYP_OVER */
- as_warn ("unsupported section attribute '%c'",
+ as_warn (_("unsupported section attribute '%c'"),
*input_line_pointer);
break;
default:
- as_warn("unknown section attribute '%c'",
+ as_warn(_("unknown section attribute '%c'"),
*input_line_pointer);
break;
}
@@ -1205,7 +1218,7 @@ obj_coff_section (ignore)
if (flags != SEC_NO_FLAGS)
{
if (! bfd_set_section_flags (stdoutput, sec, flags))
- as_warn ("error setting flags for \"%s\": %s",
+ as_warn (_("error setting flags for \"%s\": %s"),
bfd_section_name (stdoutput, sec),
bfd_errmsg (bfd_get_error ()));
}
@@ -1324,7 +1337,7 @@ symbol_dump ()
for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP))
{
- printf("0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n",
+ printf(_("0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"),
(unsigned long) symbolP,
S_GET_NAME(symbolP),
(long) S_GET_DATA_TYPE(symbolP),
@@ -1433,7 +1446,6 @@ static void adjust_stab_section PARAMS ((bfd *abfd, segT seg));
static void obj_coff_lcomm PARAMS ((int));
static void obj_coff_text PARAMS ((int));
static void obj_coff_data PARAMS ((int));
-static void obj_coff_bss PARAMS ((int));
static void obj_coff_ident PARAMS ((int));
void obj_coff_section PARAMS ((int));
@@ -1519,7 +1531,7 @@ size_section (abfd, idx)
size = frag->fr_address;
if (frag->fr_address != size)
{
- fprintf (stderr, "Out of step\n");
+ fprintf (stderr, _("Out of step\n"));
size = frag->fr_address;
}
@@ -1684,7 +1696,7 @@ do_relocs_for (abfd, h, file_cursor)
/* Turn the segment of the symbol into an offset. */
if (symbol_ptr)
{
- resolve_symbol_value (symbol_ptr);
+ resolve_symbol_value (symbol_ptr, 1);
if (! symbol_ptr->sy_resolved)
{
char *file;
@@ -1692,9 +1704,9 @@ do_relocs_for (abfd, h, file_cursor)
if (expr_symbol_where (symbol_ptr, &file, &line))
as_bad_where (file, line,
- "unresolved relocation");
+ _("unresolved relocation"));
else
- as_bad ("bad relocation: symbol `%s' not in symbol table",
+ as_bad (_("bad relocation: symbol `%s' not in symbol table"),
S_GET_NAME (symbol_ptr));
}
dot = segment_info[S_GET_SEGMENT (symbol_ptr)].dot;
@@ -1954,7 +1966,7 @@ coff_header_append (abfd, h)
&(segment_info[i].scnhdr),
buffer);
if (size == 0)
- as_bad ("bfd_coff_swap_scnhdr_out failed");
+ as_bad (_("bfd_coff_swap_scnhdr_out failed"));
bfd_write (buffer, size, 1, abfd);
}
}
@@ -2039,7 +2051,7 @@ obj_coff_ln (appline)
if (! appline && def_symbol_in_progress != NULL)
{
- as_warn (".ln pseudo-op inside .def/.endef: ignored.");
+ as_warn (_(".ln pseudo-op inside .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
} /* wrong context */
@@ -2096,7 +2108,7 @@ obj_coff_def (what)
if (def_symbol_in_progress != NULL)
{
- as_warn (".def pseudo-op used inside of .def/.endef: ignored.");
+ as_warn (_(".def pseudo-op used inside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -2149,7 +2161,7 @@ obj_coff_endef (ignore)
dim_index = 0;
if (def_symbol_in_progress == NULL)
{
- as_warn (".endef pseudo-op used outside of .def/.endef: ignored.");
+ as_warn (_(".endef pseudo-op used outside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -2181,7 +2193,7 @@ obj_coff_endef (ignore)
{ /* .bf */
if (function_lineoff < 0)
{
- fprintf (stderr, "`.bf' symbol without preceding function\n");
+ fprintf (stderr, _("`.bf' symbol without preceding function\n"));
} /* missing function symbol */
SA_GET_SYM_LNNOPTR (last_line_symbol) = function_lineoff;
@@ -2220,7 +2232,7 @@ obj_coff_endef (ignore)
case C_USTATIC:
case C_EXTDEF:
case C_ULABEL:
- as_warn ("unexpected storage class %d", S_GET_STORAGE_CLASS (def_symbol_in_progress));
+ as_warn (_("unexpected storage class %d"), S_GET_STORAGE_CLASS (def_symbol_in_progress));
break;
} /* switch on storage class */
@@ -2327,7 +2339,7 @@ obj_coff_dim (ignore)
if (def_symbol_in_progress == NULL)
{
- as_warn (".dim pseudo-op used outside of .def/.endef: ignored.");
+ as_warn (_(".dim pseudo-op used outside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -2347,7 +2359,7 @@ obj_coff_dim (ignore)
break;
default:
- as_warn ("badly formed .dim directive ignored");
+ as_warn (_("badly formed .dim directive ignored"));
/* intentional fallthrough */
case '\n':
case ';':
@@ -2410,7 +2422,7 @@ obj_coff_size (ignore)
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".size pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".size pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -2426,7 +2438,7 @@ obj_coff_scl (ignore)
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".scl pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".scl pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -2444,7 +2456,7 @@ obj_coff_tag (ignore)
if (def_symbol_in_progress == NULL)
{
- as_warn (".tag pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".tag pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
}
@@ -2462,7 +2474,7 @@ obj_coff_tag (ignore)
(long) tag_find_or_make (symbol_name));
if (SA_GET_SYM_TAGNDX (def_symbol_in_progress) == 0L)
{
- as_warn ("tag not found for .tag %s", symbol_name);
+ as_warn (_("tag not found for .tag %s"), symbol_name);
} /* not defined */
SF_SET_TAGGED (def_symbol_in_progress);
@@ -2477,7 +2489,7 @@ obj_coff_type (ignore)
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".type pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".type pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -2499,7 +2511,7 @@ obj_coff_val (ignore)
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".val pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".val pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -2618,7 +2630,7 @@ yank_symbols ()
if (symbolP->sy_mri_common)
{
if (S_GET_STORAGE_CLASS (symbolP) == C_EXT)
- as_bad ("%s: global symbols not supported in common sections",
+ as_bad (_("%s: global symbols not supported in common sections"),
S_GET_NAME (symbolP));
symbol_remove (symbolP, &symbol_rootP, &symbol_lastP);
continue;
@@ -2660,7 +2672,7 @@ yank_symbols ()
S_SET_SEGMENT (symbolP, SEG_E0);
} /* push data into text */
- resolve_symbol_value (symbolP);
+ resolve_symbol_value (symbolP, 1);
if (S_GET_STORAGE_CLASS (symbolP) == C_NULL)
{
@@ -2691,7 +2703,7 @@ yank_symbols ()
register symbolS *begin_symbolP;
begin_symbolP = *(symbolS **) stack_pop (block_stack);
if (begin_symbolP == (symbolS *) 0)
- as_warn ("mismatched .eb");
+ as_warn (_("mismatched .eb"));
else
SA_SET_SYM_ENDNDX (begin_symbolP, symbol_number + 2);
}
@@ -2731,7 +2743,7 @@ yank_symbols ()
/* I don't even know if this is needed for sdb. But
the standard assembler generates it, so... */
if (last_functionP == (symbolS *) 0)
- as_fatal ("C_EFCN symbol out of scope");
+ as_fatal (_("C_EFCN symbol out of scope"));
SA_SET_SYM_FSIZE (last_functionP,
(long) (S_GET_VALUE (symbolP) -
S_GET_VALUE (last_functionP)));
@@ -3126,7 +3138,7 @@ write_object_file ()
if (abfd == 0)
{
- as_perror ("FATAL: Can't create %s", out_file_name);
+ as_perror (_("FATAL: Can't create %s"), out_file_name);
exit (EXIT_FAILURE);
}
bfd_set_format (abfd, bfd_object);
@@ -3204,7 +3216,11 @@ write_object_file ()
/* I think the section alignment is only used on the i960; the
i960 needs it, and it should do no harm on other targets. */
+#ifdef ALIGNMENT_IN_S_FLAGS
+ segment_info[i].scnhdr.s_flags |= (section_alignment[i] & 0xF) << 8;
+#else
segment_info[i].scnhdr.s_align = 1 << section_alignment[i];
+#endif
if (i == SEG_E0)
H_SET_TEXT_SIZE (&headers, size);
@@ -3296,7 +3312,7 @@ write_object_file ()
/* Recent changes to write need this, but where it should
go is up to Ken.. */
if (bfd_close_all_done (abfd) == false)
- as_fatal ("Can't close %s: %s", out_file_name,
+ as_fatal (_("Can't close %s: %s"), out_file_name,
bfd_errmsg (bfd_get_error ()));
#else
{
@@ -3330,7 +3346,7 @@ obj_coff_add_segment (name)
if (i == SEG_LAST)
{
- as_bad ("Too many new sections; can't add \"%s\"", name);
+ as_bad (_("Too many new sections; can't add \"%s\""), name);
return now_seg;
}
@@ -3422,7 +3438,7 @@ obj_coff_section (ignore)
case 'x': flags |= STYP_TEXT; break;
case 'r': flags |= STYP_LIT; break;
default:
- as_warn("unknown section attribute '%c'",
+ as_warn(_("unknown section attribute '%c'"),
*input_line_pointer);
break;
}
@@ -3460,16 +3476,6 @@ obj_coff_data (ignore)
}
static void
-obj_coff_bss (ignore)
- int ignore;
-{
- if (*input_line_pointer == '\n') /* .bss */
- subseg_new(".bss", get_absolute_expression());
- else /* .bss id,expr */
- obj_coff_lcomm(0);
-}
-
-static void
obj_coff_ident (ignore)
int ignore;
{
@@ -3744,19 +3750,19 @@ obj_coff_lcomm (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after name");
+ as_bad (_("Expected comma after name"));
ignore_rest_of_line ();
return;
}
if (*input_line_pointer == '\n')
{
- as_bad ("Missing size expression");
+ as_bad (_("Missing size expression"));
return;
}
input_line_pointer++;
if ((temp = get_absolute_expression ()) < 0)
{
- as_warn ("lcomm length (%d.) <0! Ignored.", temp);
+ as_warn (_("lcomm length (%d.) <0! Ignored."), temp);
ignore_rest_of_line ();
return;
}
@@ -3784,7 +3790,7 @@ obj_coff_lcomm (ignore)
}
}
else
- as_bad("Symbol %s already defined", name);
+ as_bad(_("Symbol %s already defined"), name);
demand_empty_rest_of_line();
#endif
@@ -3878,7 +3884,7 @@ fixup_segment (segP, this_segment_type)
if (!SF_GET_BALNAME (tc_get_bal_of_call (add_symbolP)))
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- "No 'bal' entry point for leafproc %s",
+ _("No 'bal' entry point for leafproc %s"),
S_GET_NAME (add_symbolP));
continue;
}
@@ -3889,7 +3895,7 @@ fixup_segment (segP, this_segment_type)
/* Make sure the symbols have been resolved; this may not have
happened if these are expression symbols. */
if (add_symbolP != NULL && ! add_symbolP->sy_resolved)
- resolve_symbol_value (add_symbolP);
+ resolve_symbol_value (add_symbolP, 1);
if (add_symbolP != NULL)
{
@@ -3919,7 +3925,7 @@ fixup_segment (segP, this_segment_type)
}
if (sub_symbolP != NULL && ! sub_symbolP->sy_resolved)
- resolve_symbol_value (sub_symbolP);
+ resolve_symbol_value (sub_symbolP, 1);
if (add_symbolP != NULL
&& add_symbolP->sy_mri_common)
@@ -3957,7 +3963,7 @@ fixup_segment (segP, this_segment_type)
{
#ifndef TC_M68K
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Negative of non-absolute symbol %s",
+ _("Negative of non-absolute symbol %s"),
S_GET_NAME (sub_symbolP));
#endif
add_number -= S_GET_VALUE (sub_symbolP);
@@ -3978,7 +3984,7 @@ fixup_segment (segP, this_segment_type)
if (fixP->fx_tcbit)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- "callj to difference of 2 symbols");
+ _("callj to difference of 2 symbols"));
}
#endif /* TC_I960 */
add_number += S_GET_VALUE (add_symbolP) -
@@ -4024,7 +4030,7 @@ fixup_segment (segP, this_segment_type)
else
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %ld.",
+ _("Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %ld."),
segment_name (S_GET_SEGMENT (sub_symbolP)),
S_GET_NAME (sub_symbolP),
(long) (fragP->fr_address + where));
@@ -4114,7 +4120,7 @@ fixup_segment (segP, this_segment_type)
* relocation.
*/
as_bad_where (fixP->fx_file, fixP->fx_line,
- "can't use COBR format with external label");
+ _("can't use COBR format with external label"));
fixP->fx_addsy = NULL;
fixP->fx_done = 1;
continue;
@@ -4188,7 +4194,7 @@ fixup_segment (segP, this_segment_type)
|| (add_number & 0x8000) == 0)))
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Value of %ld too large for field of %d bytes at 0x%lx",
+ _("Value of %ld too large for field of %d bytes at 0x%lx"),
(long) add_number, size,
(unsigned long) (fragP->fr_address + where));
}
@@ -4202,7 +4208,7 @@ fixup_segment (segP, this_segment_type)
&& size == 2
&& add_number > 0x7fff)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Signed .word overflow; switch may be too large; %ld at 0x%lx",
+ _("Signed .word overflow; switch may be too large; %ld at 0x%lx"),
(long) add_number,
(unsigned long) (fragP->fr_address + where));
#endif
@@ -4210,7 +4216,7 @@ fixup_segment (segP, this_segment_type)
/* Once this fix has been applied, we don't have to output
anything nothing more need be done. */
#ifdef MD_APPLY_FIX3
- md_apply_fix3 (fixP, &add_number, this_segment_type);
+ md_apply_fix3 (fixP, (valueT *) &add_number, this_segment_type);
#else
md_apply_fix (fixP, add_number);
#endif
@@ -4314,11 +4320,13 @@ const pseudo_typeS obj_pseudo_table[] =
/* FIXME: We ignore the MRI short attribute. */
{"section.s", obj_coff_section, 0},
{"sect.s", obj_coff_section, 0},
+ /* We accept the .bss directive for backward compatibility with
+ earlier versions of gas. */
+ {"bss", obj_coff_bss, 0},
#ifndef BFD_ASSEMBLER
{"use", obj_coff_section, 0},
{"text", obj_coff_text, 0},
{"data", obj_coff_data, 0},
- {"bss", obj_coff_bss, 0},
{"lcomm", obj_coff_lcomm, 0},
{"ident", obj_coff_ident, 0},
#else
@@ -4363,8 +4371,8 @@ const struct format_ops coff_format_ops =
0,
1,
coff_frob_symbol,
- coff_frob_file,
no_func,
+ coff_frob_file_after_relocs,
0, 0,
0, 0,
0,
diff --git a/gas/config/obj-ieee.c b/gas/config/obj-ieee.c
index 42e4b1f..30a0798 100644
--- a/gas/config/obj-ieee.c
+++ b/gas/config/obj-ieee.c
@@ -1,5 +1,5 @@
/* obj-format for ieee-695 records.
- Copyright (C) 1991, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 1997, 1998 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -66,7 +66,7 @@ DEFUN (size_section, (abfd, idx),
{
if (frag->fr_address != size)
{
- printf ("Out of step\n");
+ printf (_("Out of step\n"));
size = frag->fr_address;
}
size += frag->fr_fix;
@@ -457,7 +457,7 @@ obj_ieee_section (ignore)
}
if (i == SEG_UNKNOWN)
{
- as_bad ("too many sections");
+ as_bad (_("too many sections"));
return;
}
@@ -519,7 +519,7 @@ DEFUN_VOID (write_object_file)
if (abfd == 0)
{
- as_perror ("FATAL: Can't create %s", out_file_name);
+ as_perror (_("FATAL: Can't create %s"), out_file_name);
exit (EXIT_FAILURE);
}
bfd_set_format (abfd, bfd_object);
diff --git a/gas/config/obj-vms.c b/gas/config/obj-vms.c
index 26411ab..cc68564 100644
--- a/gas/config/obj-vms.c
+++ b/gas/config/obj-vms.c
@@ -1,5 +1,5 @@
/* vms.c -- Write out a VAX/VMS object file
- Copyright (C) 1987, 1988, 1992, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1988, 1992, 1994, 1995, 1998 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -457,7 +457,7 @@ vms_resolve_symbol_redef (sym)
if (SEGMENT_TO_SYMBOL_TYPE ((int) now_seg) == (N_UNDF | N_EXT)
&& frag_now_fix () == 0)
{
- as_warn ("compiler emitted zero-size common symbol `%s' already defined",
+ as_warn (_("compiler emitted zero-size common symbol `%s' already defined"),
S_GET_NAME (sym));
return 1;
}
@@ -467,7 +467,7 @@ vms_resolve_symbol_redef (sym)
*/
if (S_IS_EXTERNAL (sym) && S_IS_DEFINED (sym) && S_GET_VALUE (sym) == 0)
{
- as_warn ("compiler redefined zero-size common symbol `%s'",
+ as_warn (_("compiler redefined zero-size common symbol `%s'"),
S_GET_NAME (sym));
sym->sy_frag = frag_now;
S_SET_OTHER (sym, const_flag);
@@ -559,7 +559,7 @@ obj_crawl_symbol_chain (headers)
{
if (S_IS_EXTERNAL (symbolP) || !S_IS_DEFINED (symbolP))
{
- as_bad ("Local symbol %s never defined", S_GET_NAME (symbolP));
+ as_bad (_("Local symbol %s never defined"), S_GET_NAME (symbolP));
} /* oops. */
/* Unhook it from the chain. */
@@ -589,7 +589,7 @@ Create_VMS_Object_File ()
#endif /* eunice */
/* Deal with errors. */
if (VMS_Object_File_FD < 0)
- as_fatal ("Couldn't create VMS object file \"%s\"", out_file_name);
+ as_fatal (_("Couldn't create VMS object file \"%s\""), out_file_name);
/* Initialize object file hacking variables. */
Object_Record_Offset = 0;
Current_Object_Record_Type = -1;
@@ -615,7 +615,7 @@ Flush_VMS_Object_Record_Buffer ()
When cross-assembling, we must write it explicitly. */
md_number_to_chars (RecLen, Object_Record_Offset, 2);
if (write (VMS_Object_File_FD, RecLen, 2) != 2)
- error ("I/O error writing VMS object file (length prefix)");
+ error (_("I/O error writing VMS object file (length prefix)"));
/* We also need to force the actual record to be an even number of
bytes. For native output, that's automatic; when cross-assembling,
pad with a NUL byte if length is odd. Do so _after_ writing the
@@ -629,7 +629,7 @@ Flush_VMS_Object_Record_Buffer ()
/* Write the data to the file. */
if (write (VMS_Object_File_FD, Object_Record_Buffer, Object_Record_Offset)
!= Object_Record_Offset)
- error ("I/O error writing VMS object file");
+ error (_("I/O error writing VMS object file"));
/* The buffer is now empty. */
Object_Record_Offset = 0;
@@ -1232,7 +1232,7 @@ VMS_TBT_Source_File (Filename, ID_Number)
Status = sys$open (&fab);
if (!(Status & 1))
{
- as_tsktsk ("Couldn't find source file \"%s\", status=%%X%x",
+ as_tsktsk (_("Couldn't find source file \"%s\", status=%%X%x"),
Filename, Status);
return 0;
}
@@ -1741,7 +1741,7 @@ gen1 (spnt, array_suffix_len)
spnt1 = find_symbol (spnt1->type2);
if (!spnt1)
{
- as_tsktsk ("debugger forward reference error, dbx type %d",
+ as_tsktsk (_("debugger forward reference error, dbx type %d"),
spnt->type2);
return 0;
}
@@ -1817,7 +1817,7 @@ generate_suffix (spnt, dbx_type)
for a pointer to void. */
if ((total_len >= MAX_DEBUG_RECORD) || overflow)
{
- as_warn ("Variable descriptor %d too complicated. Defined as `void *'.",
+ as_warn (_("Variable descriptor %d too complicated. Defined as `void *'."),
spnt->dbx_type);
VMS_Store_Immediate_Data (pvoid, 6, OBJ_S_C_DBG);
return;
@@ -2136,14 +2136,14 @@ VMS_stab_parse (sp, expected_type, type1, type2, Text_Psect)
{
if (!gave_compiler_message && expected_type == 'G')
{
- static const char long_const_msg[] = "\
+ char *long_const_msg = _("\
***Warning - the assembly code generated by the compiler has placed \n\
global constant(s) in the text psect. These will not be available to \n\
other modules, since this is not the correct way to handle this. You \n\
have two options: 1) get a patched compiler that does not put global \n\
constants in the text psect, or 2) remove the 'const' keyword from \n\
definitions of global variables in your source module(s). Don't say \n\
- I didn't warn you! \n";
+ I didn't warn you! \n");
as_tsktsk (long_const_msg);
gave_compiler_message = 1;
@@ -2455,7 +2455,7 @@ VMS_typedef_parse (str)
strcpy (str, pnt1);
return 0;
}
- as_tsktsk ("debugginer output: %d is an unknown untyped variable.",
+ as_tsktsk (_("debugginer output: %d is an unknown untyped variable."),
spnt->dbx_type);
return 1; /* do not know what this is */
}
@@ -2673,7 +2673,7 @@ VMS_typedef_parse (str)
/* check if this is a forward reference */
if (final_pass && final_forward_reference (spnt1))
{
- as_tsktsk ("debugger output: structure element `%s' has undefined type",
+ as_tsktsk (_("debugger output: structure element `%s' has undefined type"),
pnt2);
continue;
}
@@ -2784,7 +2784,7 @@ VMS_typedef_parse (str)
default:
spnt->advanced = UNKNOWN;
spnt->VMS_type = 0;
- as_tsktsk ("debugger output: %d is an unknown type of variable.",
+ as_tsktsk (_("debugger output: %d is an unknown type of variable."),
spnt->dbx_type);
return 1; /* unable to decipher */
}
@@ -2918,7 +2918,7 @@ VMS_LSYM_Parse ()
/* if (pass > 1) printf (" Required %d passes\n", pass); */
if (incomplete != 0)
{
- as_tsktsk ("debugger output: Unable to resolve %d circular references.",
+ as_tsktsk (_("debugger output: Unable to resolve %d circular references."),
incomplete);
}
fpnt = f_ref_root;
@@ -2929,7 +2929,7 @@ VMS_LSYM_Parse ()
{
if (find_symbol (fpnt->dbx_type))
{
- as_tsktsk ("debugger forward reference error, dbx type %d",
+ as_tsktsk (_("debugger forward reference error, dbx type %d"),
fpnt->dbx_type);
break;
}
@@ -3123,7 +3123,7 @@ Write_VMS_MHD_Records ()
if (strlen (Module_Name) > 31)
{
if (flag_hash_long_names)
- as_tsktsk ("Module name truncated: %s\n", Module_Name);
+ as_tsktsk (_("Module name truncated: %s\n"), Module_Name);
Module_Name[31] = '\0';
}
PUT_COUNTED_STRING (Module_Name);
@@ -3402,7 +3402,7 @@ VMS_Case_Hack_Symbol (In, Out)
*/
*Out = 0;
if (truncate == 1 && flag_hash_long_names && flag_show_after_trunc)
- as_tsktsk ("Symbol %s replaced by %s\n", old_name, new_name);
+ as_tsktsk (_("Symbol %s replaced by %s\n"), old_name, new_name);
}
@@ -3671,7 +3671,7 @@ VMS_Psect_Spec (Name, Size, Type, vsp)
break;
default:
/* impossible */
- error ("Unknown VMS psect type (%ld)", (long) Type);
+ error (_("Unknown VMS psect type (%ld)"), (long) Type);
break;
}
/*
@@ -3712,7 +3712,7 @@ VMS_Psect_Spec (Name, Size, Type, vsp)
/* In this case we still generate the psect */
break;
default:
- as_fatal ("Globalsymbol attribute for symbol %s was unexpected.",
+ as_fatal (_("Globalsymbol attribute for symbol %s was unexpected."),
Name);
break;
} /* switch */
@@ -3862,7 +3862,7 @@ VMS_Emit_Globalvalues (text_siz, data_siz, Data_Segment)
case N_DATA | N_EXT:
Size = VMS_Initialized_Data_Size (sp, text_siz + data_siz);
if (Size > 4)
- error ("Invalid data type for globalvalue");
+ error (_("Invalid data type for globalvalue"));
globalvalue = md_chars_to_number (Data_Segment +
S_GET_VALUE (sp) - text_siz , Size);
/* Three times for good luck. The linker seems to get confused
@@ -3874,7 +3874,7 @@ VMS_Emit_Globalvalues (text_siz, data_siz, Data_Segment)
GBLSYM_DEF|GBLSYM_VAL);
break;
default:
- as_warn ("Invalid globalvalue of %s", stripped_name);
+ as_warn (_("Invalid globalvalue of %s"), stripped_name);
break;
} /* switch */
} /* if */
@@ -4224,7 +4224,7 @@ VMS_Fix_Indirect_Reference (Text_Psect, Offset, fragP, text_frag_root)
* If we couldn't find the frag, things are BAD!!
*/
if (fragP == 0)
- error ("Couldn't find fixup fragment when checking for indirect reference");
+ error (_("Couldn't find fixup fragment when checking for indirect reference"));
}
/*
* Check for indirect PC relative addressing mode
@@ -4558,14 +4558,14 @@ vms_fixup_text_section (text_siz, text_frag_root, data_frag_root)
/* They need to be in the same segment. */
if (S_GET_RAW_TYPE (fixP->fx_subsy) !=
S_GET_RAW_TYPE (fixP->fx_addsy))
- error ("Fixup data addsy and subsy don't have the same type");
+ error (_("Fixup data addsy and subsy don't have the same type"));
/* And they need to be in one that we can check the psect on. */
if ((S_GET_TYPE (fixP->fx_addsy) != N_DATA) &&
(S_GET_TYPE (fixP->fx_addsy) != N_TEXT))
- error ("Fixup data addsy and subsy don't have an appropriate type");
+ error (_("Fixup data addsy and subsy don't have an appropriate type"));
/* This had better not be PC relative! */
if (fixP->fx_pcrel)
- error ("Fixup data is erroneously \"pcrel\"");
+ error (_("Fixup data is erroneously \"pcrel\""));
/* Subtract their values to get the difference. */
dif = S_GET_VALUE (fixP->fx_addsy) - S_GET_VALUE (fixP->fx_subsy);
md_number_to_chars (Local, (valueT)dif, fixP->fx_size);
@@ -4581,11 +4581,11 @@ vms_fixup_text_section (text_siz, text_frag_root, data_frag_root)
} /* if fx_subsy && fx_addsy */
/* Size will HAVE to be "long". */
if (fixP->fx_size != 4)
- error ("Fixup datum is not a longword");
+ error (_("Fixup datum is not a longword"));
/* Symbol must be "added" (if it is ever
subtracted we can fix this assumption). */
if (fixP->fx_addsy == 0)
- error ("Fixup datum is not \"fixP->fx_addsy\"");
+ error (_("Fixup datum is not \"fixP->fx_addsy\""));
/* Store the symbol value in a PIC fashion. */
VMS_Store_PIC_Symbol_Reference (fixP->fx_addsy,
fixP->fx_offset,
@@ -4700,14 +4700,14 @@ vms_fixup_data_section (data_siz, text_siz)
/* They need to be in the same segment. */
if (S_GET_RAW_TYPE (fixP->fx_subsy) !=
S_GET_RAW_TYPE (fixP->fx_addsy))
- error ("Fixup data addsy and subsy don't have the same type");
+ error (_("Fixup data addsy and subsy don't have the same type"));
/* And they need to be in one that we can check the psect on. */
if ((S_GET_TYPE (fixP->fx_addsy) != N_DATA) &&
(S_GET_TYPE (fixP->fx_addsy) != N_TEXT))
- error ("Fixup data addsy and subsy don't have an appropriate type");
+ error (_("Fixup data addsy and subsy don't have an appropriate type"));
/* This had better not be PC relative! */
if (fixP->fx_pcrel)
- error ("Fixup data is erroneously \"pcrel\"");
+ error (_("Fixup data is erroneously \"pcrel\""));
/* Subtract their values to get the difference. */
dif = S_GET_VALUE (fixP->fx_addsy) - S_GET_VALUE (fixP->fx_subsy);
md_number_to_chars (Local, (valueT)dif, fixP->fx_size);
@@ -4726,11 +4726,11 @@ vms_fixup_data_section (data_siz, text_siz)
}
/* Size will HAVE to be "long". */
if (fixP->fx_size != 4)
- error ("Fixup datum is not a longword");
+ error (_("Fixup datum is not a longword"));
/* Symbol must be "added" (if it is ever
subtracted we can fix this assumption). */
if (fixP->fx_addsy == 0)
- error ("Fixup datum is not \"fixP->fx_addsy\"");
+ error (_("Fixup datum is not \"fixP->fx_addsy\""));
/* Store the symbol value in a PIC fashion. */
VMS_Store_PIC_Symbol_Reference (fixP->fx_addsy,
fixP->fx_offset,
@@ -4770,9 +4770,8 @@ global_symbol_directory (text_siz, data_siz)
{
S_SET_TYPE (sp, N_UNDF | N_EXT);
S_SET_OTHER (sp, 1);
- as_warn ("g++ wrote an extern reference to `%s' as a routine.\n%s",
- S_GET_NAME (sp),
- "I will fix it, but I hope that it was not really a routine.");
+ as_warn (_("g++ wrote an extern reference to `%s' as a routine.\nI will fix it, but I hope that it was note really a routine."),
+ S_GET_NAME (sp));
}
#endif /* gxx_bug_fixed */
@@ -4959,7 +4958,7 @@ global_symbol_directory (text_siz, data_siz)
/*
* Error otherwise.
*/
- as_tsktsk ("unhandled stab type %d", S_GET_TYPE (sp));
+ as_tsktsk (_("unhandled stab type %d"), S_GET_TYPE (sp));
break;
}
diff --git a/gas/config/tc-a29k.c b/gas/config/tc-a29k.c
index 4c3ede1..8debcf0 100644
--- a/gas/config/tc-a29k.c
+++ b/gas/config/tc-a29k.c
@@ -1,5 +1,5 @@
/* tc-a29k.c -- Assemble for the AMD 29000.
- Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1990, 1991, 1992, 1993, 1998 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -157,7 +157,7 @@ s_use (ignore)
return;
}
- as_bad ("Unknown segment type");
+ as_bad (_("Unknown segment type"));
demand_empty_rest_of_line ();
}
@@ -327,7 +327,7 @@ md_begin ()
}
if (lose)
- as_fatal ("Broken assembler. No assembly attempted.");
+ as_fatal (_("Broken assembler. No assembly attempted."));
define_some_regs ();
}
@@ -372,7 +372,7 @@ parse_operand (s, operandp, opt)
input_line_pointer = s;
expression (operandp);
if (operandp->X_op == O_absent && ! opt)
- as_bad ("missing operand");
+ as_bad (_("missing operand"));
new = input_line_pointer;
input_line_pointer = save;
return new;
@@ -412,12 +412,12 @@ machine_ip (str)
break;
default:
- as_bad ("Unknown opcode: `%s'", str);
+ as_bad (_("Unknown opcode: `%s'"), str);
return;
}
if ((insn = (struct machine_opcode *) hash_find (op_hash, str)) == NULL)
{
- as_bad ("Unknown opcode `%s'.", str);
+ as_bad (_("Unknown opcode `%s'."), str);
return;
}
argsStart = s;
@@ -449,7 +449,7 @@ machine_ip (str)
the_insn.opcode = opcode;
return;
}
- as_bad ("Too many operands: %s", s);
+ as_bad (_("Too many operands: %s"), s);
break;
case ',': /* Must match a comma */
@@ -471,7 +471,7 @@ machine_ip (str)
}
else
{
- as_bad ("Immediate value of %ld is too large",
+ as_bad (_("Immediate value of %ld is too large"),
(long) operand->X_add_number);
continue;
}
@@ -502,7 +502,7 @@ machine_ip (str)
}
else
{
- as_bad ("Immediate value of %ld is too large",
+ as_bad (_("Immediate value of %ld is too large"),
(long) operand->X_add_number);
continue;
}
@@ -541,7 +541,7 @@ machine_ip (str)
opcode |= reg << 16;
continue;
}
- as_fatal ("failed sanity check.");
+ as_fatal (_("failed sanity check."));
break;
case 'x': /* 16 bit constant, zero-extended */
@@ -889,7 +889,7 @@ md_apply_fix (fixP, val)
case NO_RELOC:
default:
- as_bad ("bad relocation type: 0x%02x", fixP->fx_r_type);
+ as_bad (_("bad relocation type: 0x%02x"), fixP->fx_r_type);
break;
}
}
@@ -913,7 +913,7 @@ tc_coff_fix2rtype (fixP)
case RELOC_JUMPTARG:
return (R_IREL);
default:
- printf ("need %o3\n", fixP->fx_r_type);
+ printf (_("need %o3\n"), fixP->fx_r_type);
abort ();
} /* switch on type */
@@ -930,7 +930,7 @@ md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
fragS *frag;
symbolS *to_symbol;
{
- as_fatal ("a29k_create_short_jmp\n");
+ as_fatal (_("a29k_create_short_jmp\n"));
}
/* should never be called for 29k */
@@ -940,7 +940,7 @@ md_convert_frag (headers, seg, fragP)
segT seg;
register fragS *fragP;
{
- as_fatal ("a29k_convert_frag\n");
+ as_fatal (_("a29k_convert_frag\n"));
}
/* should never be called for 29k */
@@ -952,7 +952,7 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
fragS *frag;
symbolS *to_symbol;
{
- as_fatal ("a29k_create_long_jump\n");
+ as_fatal (_("a29k_create_long_jump\n"));
}
/* should never be called for a29k */
@@ -961,7 +961,7 @@ md_estimate_size_before_relax (fragP, segtype)
register fragS *fragP;
segT segtype;
{
- as_fatal ("a29k_estimate_size_before_relax\n");
+ as_fatal (_("a29k_estimate_size_before_relax\n"));
return 0;
}
@@ -1112,7 +1112,7 @@ a29k_unrecognized_line (c)
if (dollar_label_defined (lab))
{
- as_bad ("label \"$%d\" redefined", lab);
+ as_bad (_("label \"$%d\" redefined"), lab);
return 0;
}
@@ -1185,7 +1185,7 @@ md_operand (expressionP)
(void) expression (expressionP);
if (expressionP->X_op != O_constant
|| expressionP->X_add_number > 255)
- as_bad ("Invalid expression after %%%%\n");
+ as_bad (_("Invalid expression after %%%%\n"));
expressionP->X_op = O_register;
}
else if (input_line_pointer[0] == '&')
@@ -1196,7 +1196,7 @@ md_operand (expressionP)
input_line_pointer++; /* Skip & */
(void) expression (expressionP);
if (expressionP->X_op != O_register)
- as_bad ("Invalid register in & expression");
+ as_bad (_("Invalid register in & expression"));
else
expressionP->X_op = O_constant;
}
diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c
index cf9c3b8..9533cba 100644
--- a/gas/config/tc-alpha.c
+++ b/gas/config/tc-alpha.c
@@ -1,5 +1,5 @@
/* tc-alpha.c - Processor-specific code for the DEC Alpha AXP CPU.
- Copyright (C) 1989, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
Contributed by Carnegie Mellon University, 1993.
Written by Alessandro Forin, based on earlier gas-1.38 target CPU files.
Modified by Ken Raeburn for gas-2.x and ECOFF support.
@@ -110,11 +110,20 @@ struct alpha_macro
#define note_fpreg(R) (alpha_fprmask |= (1 << (R)))
/* Predicates for 16- and 32-bit ranges */
+/* XXX: The non-shift version appears to trigger a compiler bug when
+ cross-assembling from x86 w/ gcc 2.7.2. */
+#if 1
+#define range_signed_16(x) \
+ (((offsetT)(x) >> 15) == 0 || ((offsetT)(x) >> 15) == -1)
+#define range_signed_32(x) \
+ (((offsetT)(x) >> 31) == 0 || ((offsetT)(x) >> 31) == -1)
+#else
#define range_signed_16(x) ((offsetT)(x) >= -(offsetT)0x8000 && \
(offsetT)(x) <= (offsetT)0x7FFF)
#define range_signed_32(x) ((offsetT)(x) >= -(offsetT)0x80000000 && \
(offsetT)(x) <= (offsetT)0x7FFFFFFF)
+#endif
/* Macros for sign extending from 16- and 32-bits. */
/* XXX: The cast macros will work on all the systems that I care about,
@@ -220,7 +229,7 @@ static void create_literal_section PARAMS ((const char *, segT *, symbolS **));
#ifndef OBJ_ELF
static void select_gp_value PARAMS ((void));
#endif
-static void alpha_align PARAMS ((int, char *, symbolS *));
+static void alpha_align PARAMS ((int, char *, symbolS *, int));
/* Generic assembler global variables which must be defined by all
@@ -255,14 +264,16 @@ char FLT_CHARS[] = "rRsSfFdDxXpP";
#endif
#ifdef OBJ_EVAX
-const char *md_shortopts = "Fm:g+1h:H";
+const char *md_shortopts = "Fm:g+1h:HG:";
#else
-const char *md_shortopts = "Fm:g";
+const char *md_shortopts = "Fm:gG:";
#endif
struct option md_longopts[] = {
#define OPTION_32ADDR (OPTION_MD_BASE)
{ "32addr", no_argument, NULL, OPTION_32ADDR },
+#define OPTION_RELAX (OPTION_32ADDR+1)
+ { "relax", no_argument, NULL, OPTION_RELAX },
{ NULL, no_argument, NULL, 0 }
};
@@ -375,6 +386,12 @@ unsigned long alpha_gprmask, alpha_fprmask;
/* Whether the debugging option was seen. */
static int alpha_debug;
+/* Don't fully resolve relocations, allowing code movement in the linker. */
+static int alpha_flag_relax;
+
+/* What value to give to bfd_set_gp_size. */
+static int g_switch_value = 8;
+
#ifdef OBJ_EVAX
/* Collect information about current procedure here. */
static struct {
@@ -422,7 +439,7 @@ static const struct cpu_type
{ "21164a", AXP_OPCODE_BASE|AXP_OPCODE_EV5|AXP_OPCODE_BWX },
/* Still same PALcodes? */
{ "21164pc", (AXP_OPCODE_BASE|AXP_OPCODE_EV5|AXP_OPCODE_BWX
- |AXP_OPCODE_CIX|AXP_OPCODE_MAX) },
+ |AXP_OPCODE_MAX) },
/* All new PALcodes? Extras? */
{ "21264", (AXP_OPCODE_BASE|AXP_OPCODE_BWX
|AXP_OPCODE_CIX|AXP_OPCODE_MAX) },
@@ -432,7 +449,7 @@ static const struct cpu_type
{ "lca45", AXP_OPCODE_BASE },
{ "ev5", AXP_OPCODE_BASE },
{ "ev56", AXP_OPCODE_BASE|AXP_OPCODE_BWX },
- { "pca56", AXP_OPCODE_BASE|AXP_OPCODE_BWX|AXP_OPCODE_CIX|AXP_OPCODE_MAX },
+ { "pca56", AXP_OPCODE_BASE|AXP_OPCODE_BWX|AXP_OPCODE_MAX },
{ "ev6", AXP_OPCODE_BASE|AXP_OPCODE_BWX|AXP_OPCODE_CIX|AXP_OPCODE_MAX },
{ "all", AXP_OPCODE_BASE },
@@ -689,7 +706,7 @@ md_begin ()
name = alpha_opcodes[i].name;
retval = hash_insert (alpha_opcode_hash, name, (PTR)&alpha_opcodes[i]);
if (retval)
- as_fatal ("internal error: can't hash opcode `%s': %s", name, retval);
+ as_fatal (_("internal error: can't hash opcode `%s': %s"), name, retval);
/* Some opcodes include modifiers of various sorts with a "/mod"
syntax, like the architecture manual suggests. However, for
@@ -723,7 +740,7 @@ md_begin ()
name = alpha_macros[i].name;
retval = hash_insert (alpha_macro_hash, name, (PTR)&alpha_macros[i]);
if (retval)
- as_fatal ("internal error: can't hash macro `%s': %s", name, retval);
+ as_fatal (_("internal error: can't hash macro `%s': %s"), name, retval);
while (++i < alpha_num_macros
&& (alpha_macros[i].name == name
@@ -751,7 +768,7 @@ md_begin ()
/* Create the special symbols and sections we'll be using */
/* So .sbss will get used for tiny objects. */
- bfd_set_gp_size (stdoutput, 8);
+ bfd_set_gp_size (stdoutput, g_switch_value);
#ifdef OBJ_ECOFF
create_literal_section (".lita", &alpha_lita_section, &alpha_lita_symbol);
@@ -810,7 +827,7 @@ md_assemble (str)
/* tokenize the rest of the line */
if ((ntok = tokenize_arguments (str + opnamelen, tok, MAX_INSN_ARGS)) < 0)
{
- as_bad ("syntax error");
+ as_bad (_("syntax error"));
return;
}
@@ -883,7 +900,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "Bad call to MD_ATOF()";
+ return _("Bad call to MD_ATOF()");
}
t = atof_ieee (input_line_pointer, type, words);
if (t)
@@ -920,6 +937,10 @@ md_parse_option (c, arg)
alpha_debug = 1;
break;
+ case 'G':
+ g_switch_value = atoi(arg);
+ break;
+
case 'm':
{
const struct cpu_type *p;
@@ -929,7 +950,7 @@ md_parse_option (c, arg)
alpha_target_name = p->name, alpha_target = p->flags;
goto found;
}
- as_warn("Unknown CPU identifier `%s'", arg);
+ as_warn(_("Unknown CPU identifier `%s'"), arg);
found:;
}
break;
@@ -947,6 +968,10 @@ md_parse_option (c, arg)
break;
#endif
+ case OPTION_RELAX:
+ alpha_flag_relax = 1;
+ break;
+
default:
return 0;
}
@@ -960,19 +985,19 @@ void
md_show_usage (stream)
FILE *stream;
{
- fputs("\
+ fputs(_("\
Alpha options:\n\
-32addr treat addresses as 32-bit values\n\
-F lack floating point instructions support\n\
-m21064 | -m21066 | -m21164 | -m21164a\n\
-mev4 | -mev45 | -mev5 | -mev56 | -mall\n\
- specify variant of Alpha architecture\n",
+ specify variant of Alpha architecture\n"),
stream);
#ifdef OBJ_EVAX
- fputs ("\
+ fputs (_("\
VMS options:\n\
-+ hash encode (don't truncate) names longer than 64 characters\n\
--H show new symbol after hash truncation\n",
+-H show new symbol after hash truncation\n"),
stream);
#endif
}
@@ -1125,7 +1150,7 @@ md_apply_fix (fixP, valueP)
const struct alpha_operand *operand;
if ((int)fixP->fx_r_type >= 0)
- as_fatal ("unhandled relocation type %s",
+ as_fatal (_("unhandled relocation type %s"),
bfd_get_reloc_code_name (fixP->fx_r_type));
assert (-(int)fixP->fx_r_type < alpha_num_operands);
@@ -1138,7 +1163,7 @@ md_apply_fix (fixP, valueP)
if (fixP->fx_addsy != 0
&& fixP->fx_addsy->bsym->section != absolute_section)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "non-absolute expression in constant field");
+ _("non-absolute expression in constant field"));
image = bfd_getl32(fixpos);
image = insert_operand(image, operand, (offsetT)value,
@@ -1152,7 +1177,7 @@ md_apply_fix (fixP, valueP)
else
{
as_warn_where(fixP->fx_file, fixP->fx_line,
- "type %d reloc done?\n", (int)fixP->fx_r_type);
+ _("type %d reloc done?\n"), (int)fixP->fx_r_type);
goto done;
}
@@ -1203,14 +1228,14 @@ md_undefined_symbol(name)
break;
if (!alpha_noat_on && num == AXP_REG_AT)
- as_warn("Used $at without \".set noat\"");
+ as_warn(_("Used $at without \".set noat\""));
return alpha_register_table[num + is_float];
case 'a':
if (name[1] == 't' && name[2] == '\0')
{
if (!alpha_noat_on)
- as_warn("Used $at without \".set noat\"");
+ as_warn(_("Used $at without \".set noat\""));
return alpha_register_table[AXP_REG_AT];
}
break;
@@ -1260,6 +1285,9 @@ int
alpha_force_relocation (f)
fixS *f;
{
+ if (alpha_flag_relax)
+ return 1;
+
switch (f->fx_r_type)
{
case BFD_RELOC_ALPHA_GPDISP_HI16:
@@ -1364,14 +1392,14 @@ tc_gen_reloc (sec, fixp)
if (reloc->howto == NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "cannot represent `%s' relocation in object file",
+ _("cannot represent `%s' relocation in object file"),
bfd_get_reloc_code_name (fixp->fx_r_type));
return NULL;
}
if (!fixp->fx_pcrel != !reloc->howto->pc_relative)
{
- as_fatal ("internal error? cannot generate `%s' relocation",
+ as_fatal (_("internal error? cannot generate `%s' relocation"),
bfd_get_reloc_code_name (fixp->fx_r_type));
}
assert (!fixp->fx_pcrel == !reloc->howto->pc_relative);
@@ -1424,7 +1452,7 @@ tc_get_register (frame)
if (sym && (framereg = S_GET_VALUE (sym)) <= 31)
goto found;
}
- as_warn ("frame reg expected, using $%d.", framereg);
+ as_warn (_("frame reg expected, using $%d."), framereg);
found:
note_gpreg (framereg);
@@ -1743,7 +1771,7 @@ insert_operand(insn, operand, val, file, line)
if (val < min || val > max)
{
const char *err =
- "operand out of range (%s not between %d and %d)";
+ _("operand out of range (%s not between %d and %d)");
char buf[sizeof (val) * 3 + 2];
sprint_value(buf, val);
@@ -1840,7 +1868,7 @@ assemble_insn(opcode, tok, ntok, insn)
struct alpha_fixup *fixup;
if (insn->nfixups >= MAX_INSN_FIXUPS)
- as_fatal("too many fixups");
+ as_fatal(_("too many fixups"));
fixup = &insn->fixups[insn->nfixups++];
@@ -1867,7 +1895,7 @@ emit_insn (insn)
/* Take care of alignment duties */
if (alpha_auto_align_on && alpha_current_align < 2)
- alpha_align (2, (char *) NULL, alpha_insn_label);
+ alpha_align (2, (char *) NULL, alpha_insn_label, 0);
if (alpha_current_align > 2)
alpha_current_align = 2;
alpha_insn_label = NULL;
@@ -1954,13 +1982,13 @@ assemble_tokens_to_insn(opname, tok, ntok, insn)
return;
}
else if (cpumatch)
- as_bad ("inappropriate arguments for opcode `%s'", opname);
+ as_bad (_("inappropriate arguments for opcode `%s'"), opname);
else
- as_bad ("opcode `%s' not supported for target %s", opname,
+ as_bad (_("opcode `%s' not supported for target %s"), opname,
alpha_target_name);
}
else
- as_bad ("unknown opcode `%s'", opname);
+ as_bad (_("unknown opcode `%s'"), opname);
}
/* Given an opcode name and a pre-tokenized set of arguments, take the
@@ -2012,12 +2040,12 @@ assemble_tokens (opname, tok, ntok, local_macros_on)
if (found_something)
if (cpumatch)
- as_bad ("inappropriate arguments for opcode `%s'", opname);
+ as_bad (_("inappropriate arguments for opcode `%s'"), opname);
else
- as_bad ("opcode `%s' not supported for target %s", opname,
+ as_bad (_("opcode `%s' not supported for target %s"), opname,
alpha_target_name);
else
- as_bad ("unknown opcode `%s'", opname);
+ as_bad (_("unknown opcode `%s'"), opname);
}
@@ -2206,16 +2234,16 @@ load_expression (targreg, exp, pbasereg, poffset)
}
if (lit >= 0x8000)
- as_fatal ("overflow in literal (.lita) table");
+ as_fatal (_("overflow in literal (.lita) table"));
/* emit "ldq r, lit(gp)" */
if (basereg != alpha_gp_register && targreg == basereg)
{
if (alpha_noat_on)
- as_bad ("macro requires $at register while noat in effect");
+ as_bad (_("macro requires $at register while noat in effect"));
if (targreg == AXP_REG_AT)
- as_bad ("macro requires $at while $at in use");
+ as_bad (_("macro requires $at while $at in use"));
set_tok_reg (newtok[0], AXP_REG_AT);
}
@@ -2235,9 +2263,9 @@ load_expression (targreg, exp, pbasereg, poffset)
if (basereg != alpha_gp_register && targreg == basereg)
{
if (alpha_noat_on)
- as_bad ("macro requires $at register while noat in effect");
+ as_bad (_("macro requires $at register while noat in effect"));
if (targreg == AXP_REG_AT)
- as_bad ("macro requires $at while $at in use");
+ as_bad (_("macro requires $at while $at in use"));
set_tok_reg (newtok[0], AXP_REG_AT);
}
@@ -2344,8 +2372,10 @@ load_expression (targreg, exp, pbasereg, poffset)
return 0;
case O_big:
- as_bad ("%s number invalid; zero assumed",
- exp->X_add_number > 0 ? "bignum" : "floating point");
+ if (exp->X_add_number > 0)
+ as_bad (_("bignum invalid; zero assumed"));
+ else
+ as_bad (_("floating point number invalid; zero assumed"));
addend = 0;
break;
@@ -2379,22 +2409,22 @@ load_expression (targreg, exp, pbasereg, poffset)
alpha_lit8_literal = add_to_literal_pool (alpha_lit8_symbol, 0x8000,
alpha_lita_section, 8);
if (alpha_lit8_literal >= 0x8000)
- as_fatal ("overflow in literal (.lita) table");
+ as_fatal (_("overflow in literal (.lita) table"));
#endif
}
lit = add_to_literal_pool (NULL, addend, alpha_lit8_section, 8) - 0x8000;
if (lit >= 0x8000)
- as_fatal ("overflow in literal (.lit8) table");
+ as_fatal (_("overflow in literal (.lit8) table"));
/* emit "lda litreg, .lit8+0x8000" */
if (targreg == basereg)
{
if (alpha_noat_on)
- as_bad ("macro requires $at register while noat in effect");
+ as_bad (_("macro requires $at register while noat in effect"));
if (targreg == AXP_REG_AT)
- as_bad ("macro requires $at while $at in use");
+ as_bad (_("macro requires $at while $at in use"));
set_tok_reg (newtok[0], AXP_REG_AT);
}
@@ -2614,7 +2644,7 @@ emit_loadstore (tok, ntok, opname)
if (tok[1].X_op != O_constant || !range_signed_16(tok[1].X_add_number))
{
if (alpha_noat_on)
- as_bad ("macro requires $at register while noat in effect");
+ as_bad (_("macro requires $at register while noat in effect"));
lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, &newtok[1]);
}
@@ -2661,7 +2691,7 @@ emit_ldXu (tok, ntok, vlgsize)
expressionS newtok[3];
if (alpha_noat_on)
- as_bad ("macro requires $at register while noat in effect");
+ as_bad (_("macro requires $at register while noat in effect"));
/* emit "lda $at, exp" */
@@ -2709,7 +2739,7 @@ emit_uldXu (tok, ntok, vlgsize)
expressionS newtok[3];
if (alpha_noat_on)
- as_bad ("macro requires $at register while noat in effect");
+ as_bad (_("macro requires $at register while noat in effect"));
/* emit "lda $at, exp" */
@@ -2798,7 +2828,7 @@ emit_stX (tok, ntok, vlgsize)
expressionS newtok[3];
if (alpha_noat_on)
- as_bad("macro requires $at register while noat in effect");
+ as_bad(_("macro requires $at register while noat in effect"));
/* emit "lda $at, exp" */
@@ -2999,7 +3029,7 @@ emit_division (tok, ntok, symname)
/* They are in exactly the wrong order -- swap through AT */
if (alpha_noat_on)
- as_bad ("macro requires $at register while noat in effect");
+ as_bad (_("macro requires $at register while noat in effect"));
set_tok_reg (newtok[0], AXP_REG_R16);
set_tok_reg (newtok[1], AXP_REG_AT);
@@ -3100,7 +3130,7 @@ emit_division (tok, ntok, symname)
/* They are in exactly the wrong order -- swap through AT */
if (alpha_noat_on)
- as_bad ("macro requires $at register while noat in effect");
+ as_bad (_("macro requires $at register while noat in effect"));
set_tok_reg (newtok[0], AXP_REG_T10);
set_tok_reg (newtok[1], AXP_REG_AT);
@@ -3334,7 +3364,7 @@ s_alpha_comm (ignore)
}
if ((temp = get_absolute_expression ()) < 0)
{
- as_warn (".COMMon length (%ld.) <0! Ignored.", (long) temp);
+ as_warn (_(".COMMon length (%ld.) <0! Ignored."), (long) temp);
ignore_rest_of_line ();
return;
}
@@ -3350,7 +3380,7 @@ s_alpha_comm (ignore)
if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
{
- as_bad ("Ignoring attempt to re-define symbol");
+ as_bad (_("Ignoring attempt to re-define symbol"));
ignore_rest_of_line ();
return;
}
@@ -3359,7 +3389,7 @@ s_alpha_comm (ignore)
if (bfd_section_size (stdoutput, new_seg) > 0)
{
if (bfd_section_size (stdoutput, new_seg) != temp)
- as_bad ("Length of .comm \"%s\" is already %ld. Not changed to %ld.",
+ as_bad (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."),
S_GET_NAME (symbolP),
(long) bfd_section_size (stdoutput, new_seg),
(long) temp);
@@ -3368,7 +3398,7 @@ s_alpha_comm (ignore)
if (S_GET_VALUE (symbolP))
{
if (S_GET_VALUE (symbolP) != (valueT) temp)
- as_bad ("Length of .comm \"%s\" is already %ld. Not changed to %ld.",
+ as_bad (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."),
S_GET_NAME (symbolP),
(long) S_GET_VALUE (symbolP),
(long) temp);
@@ -3473,7 +3503,7 @@ s_alpha_section (secid)
if ((secid <= 0) || (secid > EVAX_SECTION_COUNT))
{
- as_fatal ("Unknown section directive");
+ as_fatal (_("Unknown section directive"));
demand_empty_rest_of_line ();
return;
}
@@ -3522,7 +3552,7 @@ s_alpha_ent (ignore)
if (symexpr.X_op != O_symbol)
{
- as_fatal (".ent directive has no symbol");
+ as_fatal (_(".ent directive has no symbol"));
demand_empty_rest_of_line ();
return;
}
@@ -3550,7 +3580,7 @@ s_alpha_frame (ignore)
if (*input_line_pointer++ != ','
|| get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn ("Bad .frame directive 1./2. param");
+ as_warn (_("Bad .frame directive 1./2. param"));
--input_line_pointer;
demand_empty_rest_of_line ();
return;
@@ -3562,7 +3592,7 @@ s_alpha_frame (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer++ != ',')
{
- as_warn ("Bad .frame directive 3./4. param");
+ as_warn (_("Bad .frame directive 3./4. param"));
--input_line_pointer;
demand_empty_rest_of_line ();
return;
@@ -3587,7 +3617,7 @@ s_alpha_pdesc (ignore)
if (now_seg != alpha_link_section)
{
- as_bad (".pdesc directive not in link (.link) section");
+ as_bad (_(".pdesc directive not in link (.link) section"));
demand_empty_rest_of_line ();
return;
}
@@ -3595,7 +3625,7 @@ s_alpha_pdesc (ignore)
if ((alpha_evax_proc.symbol == 0)
|| (!S_IS_DEFINED (alpha_evax_proc.symbol)))
{
- as_fatal (".pdesc has no matching .ent");
+ as_fatal (_(".pdesc has no matching .ent"));
demand_empty_rest_of_line ();
return;
}
@@ -3605,7 +3635,7 @@ s_alpha_pdesc (ignore)
expression (&exp);
if (exp.X_op != O_symbol)
{
- as_warn (".pdesc directive has no entry symbol");
+ as_warn (_(".pdesc directive has no entry symbol"));
demand_empty_rest_of_line ();
return;
}
@@ -3617,7 +3647,7 @@ s_alpha_pdesc (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer++ != ',')
{
- as_warn ("No comma after .pdesc <entryname>");
+ as_warn (_("No comma after .pdesc <entryname>"));
demand_empty_rest_of_line ();
return;
}
@@ -3640,7 +3670,7 @@ s_alpha_pdesc (ignore)
}
else
{
- as_fatal ("unknown procedure kind");
+ as_fatal (_("unknown procedure kind"));
demand_empty_rest_of_line ();
return;
}
@@ -3735,7 +3765,7 @@ s_alpha_name (ignore)
if (now_seg != alpha_link_section)
{
- as_bad (".name directive not in link (.link) section");
+ as_bad (_(".name directive not in link (.link) section"));
demand_empty_rest_of_line ();
return;
}
@@ -3743,7 +3773,7 @@ s_alpha_name (ignore)
expression (&exp);
if (exp.X_op != O_symbol)
{
- as_warn (".name directive has no symbol");
+ as_warn (_(".name directive has no symbol"));
demand_empty_rest_of_line ();
return;
}
@@ -3778,7 +3808,7 @@ s_alpha_linkage (ignore)
expression (&exp);
if (exp.X_op != O_symbol)
{
- as_fatal ("No symbol after .linkage");
+ as_fatal (_("No symbol after .linkage"));
}
else
{
@@ -3807,7 +3837,7 @@ s_alpha_code_address (ignore)
expression (&exp);
if (exp.X_op != O_symbol)
{
- as_fatal ("No symbol after .code_address");
+ as_fatal (_("No symbol after .code_address"));
}
else
{
@@ -3842,7 +3872,7 @@ s_alpha_mask (ignore)
if (get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn ("Bad .mask directive");
+ as_warn (_("Bad .mask directive"));
--input_line_pointer;
}
else
@@ -3864,7 +3894,7 @@ s_alpha_fmask (ignore)
if (get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn ("Bad .fmask directive");
+ as_warn (_("Bad .fmask directive"));
--input_line_pointer;
}
else
@@ -3959,7 +3989,7 @@ s_alpha_gprel32 (ignore)
#endif
if (alpha_auto_align_on && alpha_current_align < 2)
- alpha_align (2, (char *) NULL, alpha_insn_label);
+ alpha_align (2, (char *) NULL, alpha_insn_label, 0);
if (alpha_current_align > 2)
alpha_current_align = 2;
alpha_insn_label = NULL;
@@ -4003,7 +4033,7 @@ s_alpha_float_cons (type)
}
if (alpha_auto_align_on && alpha_current_align < log_size)
- alpha_align (log_size, (char *) NULL, alpha_insn_label);
+ alpha_align (log_size, (char *) NULL, alpha_insn_label, 0);
if (alpha_current_align > log_size)
alpha_current_align = log_size;
alpha_insn_label = NULL;
@@ -4035,7 +4065,7 @@ s_alpha_proc (is_static)
if (*input_line_pointer != ',')
{
*p = 0;
- as_warn ("Expected comma after name \"%s\"", name);
+ as_warn (_("Expected comma after name \"%s\""), name);
*p = c;
temp = 0;
ignore_rest_of_line ();
@@ -4046,7 +4076,7 @@ s_alpha_proc (is_static)
temp = get_absolute_expression ();
}
/* symbolP->sy_other = (signed char) temp; */
- as_warn ("unhandled: .proc %s,%d", name, temp);
+ as_warn (_("unhandled: .proc %s,%d"), name, temp);
demand_empty_rest_of_line ();
}
@@ -4081,7 +4111,7 @@ s_alpha_set (x)
else if (!strcmp ("volatile", s))
/* ignore */ ;
else
- as_warn ("Tried to .set unrecognized mode `%s'", name);
+ as_warn (_("Tried to .set unrecognized mode `%s'"), name);
*input_line_pointer = ch;
demand_empty_rest_of_line ();
@@ -4098,7 +4128,7 @@ s_alpha_base (ignore)
if (first_32bit_quadrant)
{
/* not fatal, but it might not work in the end */
- as_warn ("File overrides no-base-register option.");
+ as_warn (_("File overrides no-base-register option."));
first_32bit_quadrant = 0;
}
#endif
@@ -4115,7 +4145,7 @@ s_alpha_base (ignore)
if (alpha_gp_register < 0 || alpha_gp_register > 31)
{
alpha_gp_register = AXP_REG_GP;
- as_warn ("Bad base register, using $%d.", alpha_gp_register);
+ as_warn (_("Bad base register, using $%d."), alpha_gp_register);
}
demand_empty_rest_of_line ();
@@ -4137,11 +4167,11 @@ s_alpha_align (ignore)
if (align > max_alignment)
{
align = max_alignment;
- as_bad ("Alignment too large: %d. assumed", align);
+ as_bad (_("Alignment too large: %d. assumed"), align);
}
else if (align < 0)
{
- as_warn ("Alignment negative: 0 assumed");
+ as_warn (_("Alignment negative: 0 assumed"));
align = 0;
}
@@ -4157,7 +4187,7 @@ s_alpha_align (ignore)
if (align != 0)
{
alpha_auto_align_on = 1;
- alpha_align (align, pfill, alpha_insn_label);
+ alpha_align (align, pfill, alpha_insn_label, 1);
}
else
{
@@ -4202,7 +4232,7 @@ alpha_cons_align (size)
++log_size;
if (alpha_auto_align_on && alpha_current_align < log_size)
- alpha_align (log_size, (char *) NULL, alpha_insn_label);
+ alpha_align (log_size, (char *) NULL, alpha_insn_label, 0);
if (alpha_current_align > log_size)
alpha_current_align = log_size;
alpha_insn_label = NULL;
@@ -4283,7 +4313,6 @@ alpha_print_token(f, exp)
const pseudo_typeS md_pseudo_table[] =
{
- {"common", s_comm, 0}, /* is this used? */
#ifdef OBJ_ECOFF
{"comm", s_alpha_comm, 0}, /* osf1 compiler does this */
{"rdata", s_alpha_rdata, 0},
@@ -4434,7 +4463,7 @@ select_gp_value ()
S_SET_VALUE (alpha_gp_symbol, alpha_gp_value);
#ifdef DEBUG1
- printf ("Chose GP value of %lx\n", alpha_gp_value);
+ printf (_("Chose GP value of %lx\n"), alpha_gp_value);
#endif
}
#endif /* OBJ_ECOFF */
@@ -4445,10 +4474,11 @@ select_gp_value ()
feature wrt labels. */
static void
-alpha_align (n, pfill, label)
+alpha_align (n, pfill, label, force)
int n;
char *pfill;
symbolS *label;
+ int force;
{
if (alpha_current_align >= n)
return;
@@ -4458,7 +4488,11 @@ alpha_align (n, pfill, label)
if (n > 2
&& (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
{
- static char const nop[4] = { 0x1f, 0x04, 0xff, 0x47 };
+ static char const unop[4] = { 0x00, 0x00, 0xe0, 0x2f };
+ static char const nopunop[8] = {
+ 0x1f, 0x04, 0xff, 0x47,
+ 0x00, 0x00, 0xe0, 0x2f
+ };
/* First, make sure we're on a four-byte boundary, in case
someone has been putting .byte values into the text
@@ -4467,7 +4501,10 @@ alpha_align (n, pfill, label)
with proper alignment. */
if (alpha_current_align < 2)
frag_align (2, 0, 0);
- frag_align_pattern (n, nop, sizeof nop, 0);
+ if (alpha_current_align < 3)
+ frag_align_pattern (3, unop, sizeof unop, 0);
+ if (n > 3)
+ frag_align_pattern (n, nopunop, sizeof nopunop, 0);
}
else
frag_align (n, 0, 0);
@@ -4485,6 +4522,9 @@ alpha_align (n, pfill, label)
}
record_alignment(now_seg, n);
+
+ /* ??? if alpha_flag_relax && force && elf, record the requested alignment
+ in a reloc for the linker to see. */
}
/* The Alpha has support for some VAX floating point types, as well as for
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 2a530bc..a8919ba 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -1,5 +1,5 @@
/* tc-arm.c -- Assemble for the ARM
- Copyright (C) 1994, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 95, 96, 97, 1998 Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modified by David Taylor (dtaylor@armltd.co.uk)
@@ -35,9 +35,9 @@
/* ??? This is currently unused. */
#ifdef __STDC__
#define internalError() \
- as_fatal ("ARM Internal Error, line %d, %s", __LINE__, __FILE__)
+ as_fatal (_("ARM Internal Error, line %d, %s"), __LINE__, __FILE__)
#else
-#define internalError() as_fatal ("ARM Internal Error")
+#define internalError() as_fatal (_("ARM Internal Error"))
#endif
/* Types of processor to assemble for. */
@@ -363,19 +363,36 @@ struct asm_psr
unsigned long number;
};
-#define PSR_ALL 0x00010000
+#define PSR_FIELD_MASK 0x000f0000
+
+#define PSR_FLAGS 0x00080000
+#define PSR_CONTROL 0x00010000 /* Undocumented instruction, its use is discouraged by ARM */
+#define PSR_ALL 0x00090000
+
+#define CPSR_ALL 0
+#define SPSR_ALL 1
+#define CPSR_FLG 2
+#define SPSR_FLG 3
+#define CPSR_CTL 4
+#define SPSR_CTL 5
static CONST struct asm_psr psrs[] =
{
/* Valid <psr>'s */
- {"cpsr", 0},
- {"cpsr_all", 0},
- {"spsr", 1},
- {"spsr_all", 1},
+ {"cpsr", CPSR_ALL},
+ {"cpsr_all", CPSR_ALL},
+ {"spsr", SPSR_ALL},
+ {"spsr_all", SPSR_ALL},
/* Valid <psrf>'s */
- {"cpsr_flg", 2},
- {"spsr_flg", 3}
+ {"cpsr_flg", CPSR_FLG},
+ {"spsr_flg", SPSR_FLG},
+
+ /* Valid <psrc>'s */
+ {"cpsr_c", CPSR_CTL},
+ {"cpsr_ctl", CPSR_CTL},
+ {"spsr_c", SPSR_CTL},
+ {"spsr_ctl", SPSR_CTL}
};
/* Functions called by parser */
@@ -429,8 +446,7 @@ static int validate_offset_imm PARAMS ((int, int));
static void opcode_select PARAMS ((int));
static void end_of_line PARAMS ((char *));
static int reg_required_here PARAMS ((char **, int));
-static int psr_required_here PARAMS ((char **, int));
-static int psrf_required_here PARAMS ((char **, int));
+static int psr_required_here PARAMS ((char **, int, int));
static int co_proc_number PARAMS ((char **));
static int cp_opc_expr PARAMS ((char **, int, int));
static int cp_reg_required_here PARAMS ((char **, int));
@@ -519,7 +535,7 @@ static CONST struct asm_opcode insns[] =
/* ARM 6 Coprocessor instructions */
{"mrs", 0x010f0000, NULL, NULL, ARM_6UP, do_mrs},
- {"msr", 0x0128f000, NULL, NULL, ARM_6UP, do_msr},
+ {"msr", 0x0120f000, NULL, NULL, ARM_6UP, do_msr},
/* ARM 7M long multiplies - need signed/unsigned flags! */
{"smull", 0x00c00090, NULL, s_flag, ARM_LONGMUL, do_mull},
@@ -836,8 +852,8 @@ static CONST struct reg_entry reg_table[] =
{NULL, 0}
};
-static CONST char *bad_args = "Bad arguments to instruction";
-static CONST char *bad_pc = "r15 not allowed here";
+#define bad_args _("Bad arguments to instruction");
+#define bad_pc _("r15 not allowed here");
static struct hash_control *arm_ops_hsh = NULL;
static struct hash_control *arm_tops_hsh = NULL;
@@ -938,7 +954,7 @@ add_to_lit_pool ()
{
if (next_literal_pool_place > MAX_LITERAL_POOL_SIZE)
{
- inst.error = "Literal Pool Overflow";
+ inst.error = _("Literal Pool Overflow");
return FAIL;
}
@@ -1059,7 +1075,7 @@ static void
s_req (a)
int a;
{
- as_bad ("Invalid syntax for .req directive.");
+ as_bad (_("Invalid syntax for .req directive."));
}
static void
@@ -1093,7 +1109,7 @@ s_ltorg (internal)
{
/* Nothing to do */
if (!internal)
- as_tsktsk ("Nothing to put in the pool\n");
+ as_tsktsk (_("Nothing to put in the pool\n"));
return;
}
@@ -1105,7 +1121,7 @@ s_ltorg (internal)
record_alignment (now_seg, 2);
if (internal)
- as_tsktsk ("Inserting implicit pool at change of section");
+ as_tsktsk (_("Inserting implicit pool at change of section"));
sprintf (sym_name, "$$lit_\002%x", lit_pool_num++);
@@ -1150,10 +1166,10 @@ s_align (unused) /* Same as s_align_ptwo but align 0 => align 2 */
temp = get_absolute_expression ();
if (temp > max_alignment)
- as_bad ("Alignment too large: %d. assumed.", temp = max_alignment);
+ as_bad (_("Alignment too large: %d. assumed."), temp = max_alignment);
else if (temp < 0)
{
- as_bad ("Alignment negative. 0 assumed.");
+ as_bad (_("Alignment negative. 0 assumed."));
temp = 0;
}
@@ -1218,7 +1234,7 @@ opcode_select (width)
if (! thumb_mode)
{
if (! (cpu_variant & ARM_THUMB))
- as_bad ("selected processor does not support THUMB opcodes");
+ as_bad (_("selected processor does not support THUMB opcodes"));
thumb_mode = 1;
/* No need to force the alignment, since we will have been
coming from ARM mode, which is word-aligned. */
@@ -1230,7 +1246,7 @@ opcode_select (width)
if (thumb_mode)
{
if ((cpu_variant & ARM_ANY) == ARM_THUMB)
- as_bad ("selected processor does not support ARM opcodes");
+ as_bad (_("selected processor does not support ARM opcodes"));
thumb_mode = 0;
if (!need_pass_2)
frag_align (2, 0, 0);
@@ -1239,7 +1255,7 @@ opcode_select (width)
break;
default:
- as_bad ("invalid instruction size selected (%d)", width);
+ as_bad (_("invalid instruction size selected (%d)"), width);
}
}
@@ -1274,7 +1290,7 @@ s_code (unused)
break;
default:
- as_bad ("invalid operand to .code directive (%d) (expecting 16 or 32)", temp);
+ as_bad (_("invalid operand to .code directive (%d) (expecting 16 or 32)"), temp);
}
}
@@ -1286,7 +1302,7 @@ end_of_line (str)
str++;
if (*str != '\0')
- inst.error = "Garbage following instruction";
+ inst.error = _("Garbage following instruction");
}
static int
@@ -1329,7 +1345,7 @@ reg_required_here (str, shift)
/* In the few cases where we might be able to accept something else
this error can be overridden */
- inst.error = "Register expected";
+ inst.error = _("Register expected");
/* Restore the start point, we may have got a reg of the wrong class. */
*str = start;
@@ -1337,47 +1353,26 @@ reg_required_here (str, shift)
}
static int
-psr_required_here (str, shift)
- char **str;
- int shift;
-{
- int psr;
- char *start = *str;
-
- if ((psr = arm_psr_parse (str)) != FAIL && psr < 2)
- {
- if (psr == 1)
- inst.instruction |= 1 << shift; /* Should be bit 22 */
- return psr;
- }
-
- /* In the few cases where we might be able to accept something else
- this error can be overridden */
- inst.error = "<psr> expected";
-
- /* Restore the start point. */
- *str = start;
- return FAIL;
-}
-
-static int
-psrf_required_here (str, shift)
- char **str;
- int shift;
-{
- int psrf;
- char *start = *str;
-
- if ((psrf = arm_psr_parse (str)) != FAIL && psrf > 1)
+psr_required_here (str, cpsr, spsr)
+ char ** str;
+ int cpsr;
+ int spsr;
+{
+ int psr;
+ char * start = *str;
+ psr = arm_psr_parse (str);
+
+ if (psr == cpsr || psr == spsr)
{
- if (psrf == 1 || psrf == 3)
- inst.instruction |= 1 << shift; /* Should be bit 22 */
- return psrf;
+ if (psr == spsr)
+ inst.instruction |= 1 << 22;
+
+ return SUCCESS;
}
/* In the few cases where we might be able to accept something else
this error can be overridden */
- inst.error = "<psrf> expected";
+ inst.error = _("<psr(f)> expected");
/* Restore the start point. */
*str = start;
@@ -1408,14 +1403,14 @@ co_proc_number (str)
processor = processor * 10 + *(*str)++ - '0';
if (processor > 15)
{
- inst.error = "Illegal co-processor number";
+ inst.error = _("Illegal co-processor number");
return FAIL;
}
}
}
else
{
- inst.error = "Bad or missing co-processor number";
+ inst.error = _("Bad or missing co-processor number");
return FAIL;
}
@@ -1440,13 +1435,13 @@ cp_opc_expr (str, where, length)
return FAIL;
if (expr.X_op != O_constant)
{
- inst.error = "bad or missing expression";
+ inst.error = _("bad or missing expression");
return FAIL;
}
if ((expr.X_add_number & ((1 << length) - 1)) != expr.X_add_number)
{
- inst.error = "immediate co-processor expression too large";
+ inst.error = _("immediate co-processor expression too large");
return FAIL;
}
@@ -1471,7 +1466,7 @@ cp_reg_required_here (str, where)
/* In the few cases where we might be able to accept something else
this error can be overridden */
- inst.error = "Co-processor register expected";
+ inst.error = _("Co-processor register expected");
/* Restore the start point */
*str = start;
@@ -1495,7 +1490,7 @@ fp_reg_required_here (str, where)
/* In the few cases where we might be able to accept something else
this error can be overridden */
- inst.error = "Floating point register expected";
+ inst.error = _("Floating point register expected");
/* Restore the start point */
*str = start;
@@ -1513,7 +1508,7 @@ cp_address_offset (str)
if (**str != '#')
{
- inst.error = "immediate expression expected";
+ inst.error = _("immediate expression expected");
return FAIL;
}
@@ -1525,13 +1520,13 @@ cp_address_offset (str)
offset = inst.reloc.exp.X_add_number;
if (offset & 3)
{
- inst.error = "co-processor address must be word aligned";
+ inst.error = _("co-processor address must be word aligned");
return FAIL;
}
if (offset > 1023 || offset < -1023)
{
- inst.error = "offset too large";
+ inst.error = _("offset too large");
return FAIL;
}
@@ -1566,7 +1561,7 @@ cp_address_required_here (str)
if ((reg = reg_required_here (&p, 16)) == FAIL)
{
- inst.error = "Register required";
+ inst.error = _("Register required");
return FAIL;
}
@@ -1582,7 +1577,7 @@ cp_address_required_here (str)
write_back = WRITE_BACK;
if (reg == REG_PC)
{
- inst.error = "pc may not be used in post-increment";
+ inst.error = _("pc may not be used in post-increment");
return FAIL;
}
@@ -1598,7 +1593,7 @@ cp_address_required_here (str)
if (skip_past_comma (&p) == FAIL)
{
- inst.error = "pre-indexed expression expected";
+ inst.error = _("pre-indexed expression expected");
return FAIL;
}
@@ -1611,7 +1606,7 @@ cp_address_required_here (str)
if (*p++ != ']')
{
- inst.error = "missing ]";
+ inst.error = _("missing ]");
return FAIL;
}
@@ -1622,7 +1617,7 @@ cp_address_required_here (str)
{
if (reg == REG_PC)
{
- inst.error = "pc may not be used with write-back";
+ inst.error = _("pc may not be used with write-back");
return FAIL;
}
@@ -1675,9 +1670,9 @@ do_mrs (str, flags)
}
if (skip_past_comma (&str) == FAIL
- || psr_required_here (&str, 22) == FAIL)
+ || psr_required_here (& str, CPSR_ALL, SPSR_ALL) == FAIL)
{
- inst.error = "<psr> expected";
+ inst.error = _("<psr> expected");
return;
}
@@ -1686,20 +1681,21 @@ do_mrs (str, flags)
return;
}
+/* Three possible forms: "<psr>, Rm", "<psrf>, Rm", "<psrf>, #expression" */
static void
do_msr (str, flags)
char *str;
unsigned long flags;
{
- int psr, psrf, reg;
- /* Three possible forms: "<psr>, Rm", "<psrf>, Rm", "<psrf>, #expression" */
+ int reg;
while (*str == ' ')
- str++;
+ str ++;
- if ((psr = psr_required_here (&str, 22)) != FAIL)
+ if (psr_required_here (&str, CPSR_ALL, SPSR_ALL) == SUCCESS)
{
inst.instruction |= PSR_ALL;
+
/* Sytax should be "<psr>, Rm" */
if (skip_past_comma (&str) == FAIL
|| (reg = reg_required_here (&str, 0)) == FAIL)
@@ -1708,14 +1704,30 @@ do_msr (str, flags)
return;
}
}
- else if ((psrf = psrf_required_here (&str, 22)) != FAIL)
- /* Syntax could be "<psrf>, rm", "<psrf>, #expression" */
+ else
{
+ if (psr_required_here (& str, CPSR_FLG, SPSR_FLG) == SUCCESS)
+ {
+ inst.instruction |= PSR_FLAGS;
+ }
+ else if (psr_required_here (& str, CPSR_CTL, SPSR_CTL) == SUCCESS)
+ {
+ inst.instruction |= PSR_CONTROL;
+ }
+ else
+ {
+ inst.error = bad_args;
+ return;
+ }
+
if (skip_past_comma (&str) == FAIL)
{
inst.error = bad_args;
return;
}
+
+ /* Syntax could be "<psrf>, rm", "<psrf>, #expression" */
+
if ((reg = reg_required_here (&str, 0)) != FAIL)
;
/* Immediate expression */
@@ -1724,7 +1736,7 @@ do_msr (str, flags)
inst.error = NULL;
if (my_get_expression (&inst.reloc.exp, &str))
{
- inst.error = "Register or shift expression expected";
+ inst.error = _("Register or shift expression expected");
return;
}
@@ -1738,7 +1750,7 @@ do_msr (str, flags)
unsigned value = validate_immediate (inst.reloc.exp.X_add_number);
if (value == FAIL)
{
- inst.error = "Invalid constant";
+ inst.error = _("Invalid constant");
return;
}
@@ -1749,16 +1761,11 @@ do_msr (str, flags)
}
else
{
- inst.error = "Error: the other";
+ inst.error = _("Error: unrecognised syntax for second argument to msr instruction");
return;
}
}
- else
- {
- inst.error = bad_args;
- return;
- }
-
+
inst.error = NULL;
inst.instruction |= flags;
end_of_line (str);
@@ -1804,7 +1811,7 @@ do_mull (str, flags)
/* rdhi, rdlo and rm must all be different */
if (rdlo == rdhi || rdlo == rm || rdhi == rm)
- as_tsktsk ("rdhi, rdlo and rm must all be different");
+ as_tsktsk (_("rdhi, rdlo and rm must all be different"));
if (skip_past_comma (&str) == FAIL
|| (rs = reg_required_here (&str, 8)) == FAIL)
@@ -1861,7 +1868,7 @@ do_mul (str, flags)
}
if (rm == rd)
- as_tsktsk ("rd and rm should be different in mul");
+ as_tsktsk (_("rd and rm should be different in mul"));
if (skip_past_comma (&str) == FAIL
|| (rm = reg_required_here (&str, 8)) == FAIL)
@@ -1918,7 +1925,7 @@ do_mla (str, flags)
}
if (rm == rd)
- as_tsktsk ("rd and rm should be different in mla");
+ as_tsktsk (_("rd and rm should be different in mla"));
if (skip_past_comma (&str) == FAIL
|| (rd = reg_required_here (&str, 8)) == FAIL
@@ -2044,7 +2051,7 @@ my_get_expression (ep, str)
&& seg != bss_section
&& seg != undefined_section)
{
- inst.error = "bad_segment";
+ inst.error = _("bad_segment");
*str = input_line_pointer;
input_line_pointer = save_in;
return 1;
@@ -2060,7 +2067,7 @@ my_get_expression (ep, str)
|| (ep->X_op_symbol
&& walk_no_bignums (ep->X_op_symbol)))))
{
- inst.error = "Invalid constant";
+ inst.error = _("Invalid constant");
*str = input_line_pointer;
input_line_pointer = save_in;
return 1;
@@ -2091,7 +2098,7 @@ decode_shift (str, unrestrict)
if (p == *str)
{
- inst.error = "Shift expression expected";
+ inst.error = _("Shift expression expected");
return FAIL;
}
@@ -2133,7 +2140,7 @@ decode_shift (str, unrestrict)
/* Reject operations greater than 32, or lsl #32 */
if (num > 32 || (num == 32 && shft->value == 0))
{
- inst.error = "Invalid immediate shift";
+ inst.error = _("Invalid immediate shift");
return FAIL;
}
@@ -2162,14 +2169,14 @@ decode_shift (str, unrestrict)
}
else
{
- inst.error = unrestrict ? "shift requires register or #expression"
- : "shift requires #expression";
+ inst.error = unrestrict ? _("shift requires register or #expression")
+ : _("shift requires #expression");
*str = p;
return FAIL;
}
}
- inst.error = "Shift expression expected";
+ inst.error = _("Shift expression expected");
return FAIL;
}
@@ -2305,7 +2312,7 @@ data_op2 (str)
if (expr.X_op != O_constant)
{
- inst.error = "Constant expression expected";
+ inst.error = _("Constant expression expected");
return FAIL;
}
@@ -2314,7 +2321,7 @@ data_op2 (str)
|| (expr.X_add_number & 1) != 0
|| ((unsigned) inst.reloc.exp.X_add_number) > 255)
{
- inst.error = "Invalid constant";
+ inst.error = _("Invalid constant");
return FAIL;
}
inst.instruction |= INST_IMMEDIATE;
@@ -2334,7 +2341,7 @@ data_op2 (str)
inst.reloc.exp.X_add_number))
== FAIL)
{
- inst.error = "Invalid constant";
+ inst.error = _("Invalid constant");
return FAIL;
}
}
@@ -2346,7 +2353,7 @@ data_op2 (str)
return SUCCESS;
}
- inst.error = "Register or shift expression expected";
+ inst.error = _("Register or shift expression expected");
return FAIL;
}
}
@@ -2400,10 +2407,10 @@ fp_op2 (str)
return SUCCESS;
}
- inst.error = "Invalid floating point immediate expression";
+ inst.error = _("Invalid floating point immediate expression");
return FAIL;
}
- inst.error = "Floating point register or immediate expression expected";
+ inst.error = _("Floating point register or immediate expression expected");
return FAIL;
}
}
@@ -2541,7 +2548,7 @@ ldst_extend (str, hwse)
if ((hwse && (value < -255 || value > 255))
|| (value < -4095 || value > 4095))
{
- inst.error = "address offset too large";
+ inst.error = _("address offset too large");
return FAIL;
}
@@ -2578,7 +2585,7 @@ ldst_extend (str, hwse)
default:
if (reg_required_here (str, 0) == FAIL)
{
- inst.error = "Register expected";
+ inst.error = _("Register expected");
return FAIL;
}
@@ -2615,7 +2622,7 @@ do_ldst (str, flags)
if ((cpu_variant & ARM_HALFWORD) == 0)
{
inst.error
- = "Processor does not support halfwords or signed bytes";
+ = _("Processor does not support halfwords or signed bytes");
return;
}
@@ -2637,7 +2644,7 @@ do_ldst (str, flags)
if (skip_past_comma (&str) == FAIL)
{
- inst.error = "Address expected";
+ inst.error = _("Address expected");
return;
}
@@ -2651,7 +2658,7 @@ do_ldst (str, flags)
if ((reg = reg_required_here (&str, 16)) == FAIL)
{
- inst.error = "Register required";
+ inst.error = _("Register required");
return;
}
@@ -2671,7 +2678,7 @@ do_ldst (str, flags)
if (ldst_extend (&str, halfword) == FAIL)
return;
if (conflict_reg)
- as_warn ("destination register same as write-back base\n");
+ as_warn (_("destination register same as write-back base\n"));
}
else
{
@@ -2685,7 +2692,7 @@ do_ldst (str, flags)
if (*str == '!')
{
if (conflict_reg)
- as_warn ("destination register same as write-back base\n");
+ as_warn (_("destination register same as write-back base\n"));
str++;
inst.instruction |= WRITE_BACK;
}
@@ -2700,7 +2707,7 @@ do_ldst (str, flags)
/* [Rn,...] */
if (skip_past_comma (&str) == FAIL)
{
- inst.error = "pre-indexed expression expected";
+ inst.error = _("pre-indexed expression expected");
return;
}
@@ -2713,7 +2720,7 @@ do_ldst (str, flags)
if (*str++ != ']')
{
- inst.error = "missing ]";
+ inst.error = _("missing ]");
return;
}
@@ -2723,7 +2730,7 @@ do_ldst (str, flags)
if (*str == '!')
{
if (conflict_reg)
- as_tsktsk ("destination register same as write-back base\n");
+ as_tsktsk (_("destination register same as write-back base\n"));
str++;
inst.instruction |= WRITE_BACK;
}
@@ -2743,7 +2750,7 @@ do_ldst (str, flags)
if (inst.reloc.exp.X_op != O_constant
&& inst.reloc.exp.X_op != O_symbol)
{
- inst.error = "Constant expression expected";
+ inst.error = _("Constant expression expected");
return;
}
@@ -2763,7 +2770,7 @@ do_ldst (str, flags)
if (add_to_lit_pool () == FAIL)
{
if (!inst.error)
- inst.error = "literal pool insertion failed";
+ inst.error = _("literal pool insertion failed");
return;
}
@@ -2799,7 +2806,7 @@ do_ldst (str, flags)
}
if (pre_inc && (flags & TRANS_BIT))
- inst.error = "Pre-increment instruction with translate";
+ inst.error = _("Pre-increment instruction with translate");
inst.instruction |= flags | (pre_inc ? PRE_INDEX : 0);
end_of_line (str);
@@ -2834,7 +2841,7 @@ reg_list (strp)
if ((reg = arm_reg_parse (&str)) == FAIL || !int_register (reg))
{
- inst.error = "Register expected";
+ inst.error = _("Register expected");
return FAIL;
}
@@ -2844,7 +2851,7 @@ reg_list (strp)
if (reg <= cur_reg)
{
- inst.error = "Bad range in register list";
+ inst.error = _("Bad range in register list");
return FAIL;
}
@@ -2852,7 +2859,7 @@ reg_list (strp)
{
if (range & (1 << i))
as_tsktsk
- ("Warning: Duplicated register (r%d) in register list",
+ (_("Warning: Duplicated register (r%d) in register list"),
i);
else
range |= 1 << i;
@@ -2861,10 +2868,10 @@ reg_list (strp)
}
if (range & (1 << reg))
- as_tsktsk ("Warning: Duplicated register (r%d) in register list",
+ as_tsktsk (_("Warning: Duplicated register (r%d) in register list"),
reg);
else if (reg <= cur_reg)
- as_tsktsk ("Warning: Register range not in ascending order");
+ as_tsktsk (_("Warning: Register range not in ascending order"));
range |= 1 << reg;
cur_reg = reg;
@@ -2876,7 +2883,7 @@ reg_list (strp)
if (*str++ != '}')
{
- inst.error = "Missing `}'";
+ inst.error = _("Missing `}'");
return FAIL;
}
}
@@ -2892,7 +2899,7 @@ reg_list (strp)
if (expr.X_add_number
!= (expr.X_add_number & 0x0000ffff))
{
- inst.error = "invalid register mask";
+ inst.error = _("invalid register mask");
return FAIL;
}
@@ -2903,7 +2910,7 @@ reg_list (strp)
regno &= -regno;
regno = (1 << regno) - 1;
as_tsktsk
- ("Warning: Duplicated register (r%d) in register list",
+ (_("Warning: Duplicated register (r%d) in register list"),
regno);
}
@@ -2913,7 +2920,7 @@ reg_list (strp)
{
if (inst.reloc.type != 0)
{
- inst.error = "expression too complex";
+ inst.error = _("expression too complex");
return FAIL;
}
@@ -2957,7 +2964,7 @@ do_ldmstm (str, flags)
if (base_reg == REG_PC)
{
- inst.error = "r15 not allowed as base register";
+ inst.error = _("r15 not allowed as base register");
return;
}
@@ -3024,7 +3031,7 @@ do_swap (str, flags)
if (reg == REG_PC)
{
- inst.error = "r15 not allowed in swap";
+ inst.error = _("r15 not allowed in swap");
return;
}
@@ -3038,7 +3045,7 @@ do_swap (str, flags)
if (reg == REG_PC)
{
- inst.error = "r15 not allowed in swap";
+ inst.error = _("r15 not allowed in swap");
return;
}
@@ -3066,7 +3073,7 @@ do_swap (str, flags)
if (*str++ != ']')
{
- inst.error = "missing ]";
+ inst.error = _("missing ]");
return;
}
@@ -3102,7 +3109,7 @@ do_bx (str, flags)
return;
if (reg == REG_PC)
- as_tsktsk ("Use of r15 in bx has undefined behaviour");
+ as_tsktsk (_("Use of r15 in bx has undefined behaviour"));
end_of_line (str);
return;
@@ -3361,13 +3368,13 @@ do_fp_ldmstm (str, flags)
|| my_get_expression (&inst.reloc.exp, &str))
{
if (! inst.error)
- inst.error = "constant expression expected";
+ inst.error = _("constant expression expected");
return;
}
if (inst.reloc.exp.X_op != O_constant)
{
- inst.error = "Constant value required for number of registers";
+ inst.error = _("Constant value required for number of registers");
return;
}
@@ -3375,7 +3382,7 @@ do_fp_ldmstm (str, flags)
if (num_regs < 1 || num_regs > 4)
{
- inst.error = "number of registers must be in the range [1:4]";
+ inst.error = _("number of registers must be in the range [1:4]");
return;
}
@@ -3420,7 +3427,7 @@ do_fp_ldmstm (str, flags)
if ((reg = reg_required_here (&str, 16)) == FAIL)
{
- inst.error = "Register required";
+ inst.error = _("Register required");
return;
}
@@ -3440,7 +3447,7 @@ do_fp_ldmstm (str, flags)
str++;
if (reg == REG_PC)
{
- inst.error = "R15 not allowed as base register with write-back";
+ inst.error = _("R15 not allowed as base register with write-back");
return;
}
}
@@ -3690,7 +3697,7 @@ thumb_reg (strp, hi_lo)
if ((reg = arm_reg_parse (strp)) == FAIL || ! int_register (reg))
{
- inst.error = "Register expected";
+ inst.error = _("Register expected");
return FAIL;
}
@@ -3699,7 +3706,7 @@ thumb_reg (strp, hi_lo)
case THUMB_REG_LO:
if (reg > 7)
{
- inst.error = "lo register required";
+ inst.error = _("lo register required");
return FAIL;
}
break;
@@ -3707,7 +3714,7 @@ thumb_reg (strp, hi_lo)
case THUMB_REG_HI:
if (reg < 8)
{
- inst.error = "hi register required";
+ inst.error = _("hi register required");
return FAIL;
}
break;
@@ -3777,14 +3784,14 @@ thumb_add_sub (str, subtract)
{
if (Rs != Rd)
{
- inst.error = "dest and source1 must be the same register";
+ inst.error = _("dest and source1 must be the same register");
return;
}
/* Can't do this for SUB */
if (subtract)
{
- inst.error = "subtract valid only on lo regs";
+ inst.error = _("subtract valid only on lo regs");
return;
}
@@ -3808,7 +3815,7 @@ thumb_add_sub (str, subtract)
if ((Rd > 7 && (Rd != REG_SP || Rs != REG_SP))
|| (Rs > 7 && Rs != REG_SP && Rs != REG_PC))
{
- inst.error = "invalid Hi register with immediate";
+ inst.error = _("invalid Hi register with immediate");
return;
}
@@ -3835,7 +3842,7 @@ thumb_add_sub (str, subtract)
/* Quick check, in case offset is MIN_INT */
if (offset < 0)
{
- inst.error = "immediate value out of range";
+ inst.error = _("immediate value out of range");
return;
}
}
@@ -3846,7 +3853,7 @@ thumb_add_sub (str, subtract)
{
if (offset & ~0x1fc)
{
- inst.error = "invalid immediate value for stack adjust";
+ inst.error = _("invalid immediate value for stack adjust");
return;
}
inst.instruction = subtract ? T_OPCODE_SUB_ST : T_OPCODE_ADD_ST;
@@ -3857,7 +3864,7 @@ thumb_add_sub (str, subtract)
if (subtract
|| (offset & ~0x3fc))
{
- inst.error = "invalid immediate for address calculation";
+ inst.error = _("invalid immediate for address calculation");
return;
}
inst.instruction = (Rs == REG_PC ? T_OPCODE_ADD_PC
@@ -3868,7 +3875,7 @@ thumb_add_sub (str, subtract)
{
if (offset & ~0xff)
{
- inst.error = "immediate value out of range";
+ inst.error = _("immediate value out of range");
return;
}
inst.instruction = subtract ? T_OPCODE_SUB_I8 : T_OPCODE_ADD_I8;
@@ -3878,7 +3885,7 @@ thumb_add_sub (str, subtract)
{
if (offset & ~0x7)
{
- inst.error = "immediate value out of range";
+ inst.error = _("immediate value out of range");
return;
}
inst.instruction = subtract ? T_OPCODE_SUB_I3 : T_OPCODE_ADD_I3;
@@ -3944,7 +3951,7 @@ thumb_shift (str, shift)
{
if (Rs != Rd)
{
- inst.error = "source1 and dest must be same register";
+ inst.error = _("source1 and dest must be same register");
return;
}
@@ -3979,7 +3986,7 @@ thumb_shift (str, shift)
if (shift_value > 32 || (shift_value == 32 && shift == THUMB_LSL))
{
- inst.error = "Invalid immediate for shift";
+ inst.error = _("Invalid immediate for shift");
return;
}
@@ -4058,7 +4065,7 @@ thumb_mov_compare (str, move)
{
if (Rd > 7)
{
- inst.error = "only lo regs allowed with immediate";
+ inst.error = _("only lo regs allowed with immediate");
return;
}
@@ -4077,7 +4084,7 @@ thumb_mov_compare (str, move)
if (value > 255)
{
- inst.error = "invalid immediate";
+ inst.error = _("invalid immediate");
return;
}
@@ -4132,7 +4139,7 @@ thumb_load_store (str, load_store, size)
if (*str != ']')
{
- inst.error = "expected ']'";
+ inst.error = _("expected ']'");
return;
}
str++;
@@ -4199,17 +4206,17 @@ thumb_load_store (str, load_store, size)
{
if (size != THUMB_WORD)
{
- inst.error = "byte or halfword not valid for base register";
+ inst.error = _("byte or halfword not valid for base register");
return;
}
else if (Rb == REG_PC && load_store != THUMB_LOAD)
{
- inst.error = "R15 based store not allowed";
+ inst.error = _("R15 based store not allowed");
return;
}
else if (Ro != FAIL)
{
- inst.error = "Invalid base register for register offset";
+ inst.error = _("Invalid base register for register offset");
return;
}
@@ -4227,7 +4234,7 @@ thumb_load_store (str, load_store, size)
if (offset & ~0x3fc)
{
- inst.error = "invalid offset";
+ inst.error = _("invalid offset");
return;
}
@@ -4238,7 +4245,7 @@ thumb_load_store (str, load_store, size)
}
else if (Rb > 7)
{
- inst.error = "invalid base register in load/store";
+ inst.error = _("invalid base register in load/store");
return;
}
else if (Ro == FAIL)
@@ -4262,7 +4269,7 @@ thumb_load_store (str, load_store, size)
if (offset & ~(0x1f << size))
{
- inst.error = "Invalid offset";
+ inst.error = _("Invalid offset");
return;
}
inst.instruction |= (offset >> size) << 6;
@@ -4340,7 +4347,7 @@ do_t_arit (str)
if (Rs != Rd)
{
- inst.error = "dest and source1 one must be the same register";
+ inst.error = _("dest and source1 one must be the same register");
return;
}
Rs = Rn;
@@ -4348,7 +4355,7 @@ do_t_arit (str)
if (inst.instruction == T_OPCODE_MUL
&& Rs == Rd)
- as_tsktsk ("Rs and Rd must be different in MUL");
+ as_tsktsk (_("Rs and Rd must be different in MUL"));
inst.instruction |= Rd | (Rs << 3);
end_of_line (str);
@@ -4481,7 +4488,7 @@ do_t_ldmstm (str)
return;
if (*str != '!')
- as_warn ("Inserted missing '!': load/store multiple always writes back base register");
+ as_warn (_("Inserted missing '!': load/store multiple always writes back base register"));
else
str++;
@@ -4497,13 +4504,13 @@ do_t_ldmstm (str)
{
/* This really doesn't seem worth it. */
inst.reloc.type = BFD_RELOC_NONE;
- inst.error = "Expression too complex";
+ inst.error = _("Expression too complex");
return;
}
if (range & ~0xff)
{
- inst.error = "only lo-regs valid in load/store multiple";
+ inst.error = _("only lo-regs valid in load/store multiple");
return;
}
@@ -4550,7 +4557,7 @@ do_t_lds (str)
|| *str++ != ']')
{
if (! inst.error)
- inst.error = "Syntax: ldrs[b] Rd, [Rb, Ro]";
+ inst.error = _("Syntax: ldrs[b] Rd, [Rb, Ro]");
return;
}
@@ -4599,7 +4606,7 @@ do_t_push_pop (str)
{
/* This really doesn't seem worth it. */
inst.reloc.type = BFD_RELOC_NONE;
- inst.error = "Expression too complex";
+ inst.error = _("Expression too complex");
return;
}
@@ -4615,7 +4622,7 @@ do_t_push_pop (str)
}
else
{
- inst.error = "invalid register list to push/pop instruction";
+ inst.error = _("invalid register list to push/pop instruction");
return;
}
}
@@ -4753,7 +4760,7 @@ md_begin ()
|| (arm_shift_hsh = hash_new ()) == NULL
|| (arm_reg_hsh = hash_new ()) == NULL
|| (arm_psr_hsh = hash_new ()) == NULL)
- as_fatal ("Virtual memory exhausted");
+ as_fatal (_("Virtual memory exhausted"));
for (i = 0; i < sizeof (insns) / sizeof (struct asm_opcode); i++)
hash_insert (arm_ops_hsh, insns[i].template, (PTR) (insns + i));
@@ -4924,7 +4931,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "Bad call to MD_ATOF()";
+ return _("Bad call to MD_ATOF()");
}
t = atof_ieee (input_line_pointer, type, words);
@@ -5121,7 +5128,7 @@ md_apply_fix3 (fixP, val, seg)
&& (newimm = negate_data_op (&temp, value)) == (unsigned int) FAIL)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- "invalid constant after fixup\n");
+ _("invalid constant after fixup\n"));
break;
}
@@ -5133,7 +5140,7 @@ md_apply_fix3 (fixP, val, seg)
sign = value >= 0;
if ((value = validate_offset_imm (value, 0)) == FAIL)
{
- as_bad ("bad immediate value for offset (%d)", val);
+ as_bad (_("bad immediate value for offset (%d)"), val);
break;
}
if (value < 0)
@@ -5152,9 +5159,9 @@ md_apply_fix3 (fixP, val, seg)
{
if (fixP->fx_r_type == BFD_RELOC_ARM_HWLITERAL)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "invalid literal constant: pool needs to be closer\n");
+ _("invalid literal constant: pool needs to be closer\n"));
else
- as_bad ("bad immediate value for offset (%d)", value);
+ as_bad (_("bad immediate value for offset (%d)"), value);
break;
}
@@ -5175,7 +5182,7 @@ md_apply_fix3 (fixP, val, seg)
if ((value = validate_offset_imm (value, 0)) == FAIL)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- "invalid literal constant: pool needs to be closer\n");
+ _("invalid literal constant: pool needs to be closer\n"));
break;
}
@@ -5192,7 +5199,7 @@ md_apply_fix3 (fixP, val, seg)
&& (((newval & 0x60) == 0) || (newval & 0x60) == 0x60)))
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- "shift expression is too large");
+ _("shift expression is too large"));
break;
}
@@ -5210,7 +5217,7 @@ md_apply_fix3 (fixP, val, seg)
{
if (((unsigned long) value) > 0xff)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid swi expression");
+ _("Invalid swi expression"));
newval = md_chars_to_number (buf, THUMB_SIZE) & 0xff00;
newval |= value;
md_number_to_chars (buf, newval, THUMB_SIZE);
@@ -5219,7 +5226,7 @@ md_apply_fix3 (fixP, val, seg)
{
if (((unsigned long) value) > 0x00ffffff)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid swi expression");
+ _("Invalid swi expression"));
newval = md_chars_to_number (buf, INSN_SIZE) & 0xff000000;
newval |= value;
md_number_to_chars (buf, newval , INSN_SIZE);
@@ -5229,7 +5236,7 @@ md_apply_fix3 (fixP, val, seg)
case BFD_RELOC_ARM_MULTI:
if (((unsigned long) value) > 0xffff)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid expression in load/store multiple");
+ _("Invalid expression in load/store multiple"));
newval = value | md_chars_to_number (buf, INSN_SIZE);
md_number_to_chars (buf, newval, INSN_SIZE);
break;
@@ -5252,7 +5259,7 @@ md_apply_fix3 (fixP, val, seg)
value += diff;
if ((value & ~0xff) && ((value & ~0xff) != ~0xff))
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Branch out of range");
+ _("Branch out of range"));
newval = (newval & 0xff00) | ((value & 0x1ff) >> 1);
}
md_number_to_chars (buf, newval, THUMB_SIZE);
@@ -5268,7 +5275,7 @@ md_apply_fix3 (fixP, val, seg)
value += diff;
if ((value & ~0x7ff) && ((value & ~0x7ff) != ~0x7ff))
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Branch out of range");
+ _("Branch out of range"));
newval = (newval & 0xf800) | ((value & 0xfff) >> 1);
}
md_number_to_chars (buf, newval, THUMB_SIZE);
@@ -5287,7 +5294,7 @@ md_apply_fix3 (fixP, val, seg)
value += diff;
if ((value & ~0x3fffff) && ((value & ~0x3fffff) != ~0x3fffff))
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Branch with link out of range");
+ _("Branch with link out of range"));
newval = (newval & 0xf800) | ((value & 0x7fffff) >> 12);
newval2 = (newval2 & 0xf800) | ((value & 0xfff) >> 1);
@@ -5316,7 +5323,7 @@ md_apply_fix3 (fixP, val, seg)
sign = value >= 0;
if (value < -1023 || value > 1023 || (value & 3))
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Illegal value for co-processor offset");
+ _("Illegal value for co-processor offset"));
if (value < 0)
value = -value;
newval = md_chars_to_number (buf, INSN_SIZE) & 0xff7fff00;
@@ -5339,12 +5346,12 @@ md_apply_fix3 (fixP, val, seg)
if ((fixP->fx_frag->fr_address + fixP->fx_where + value) & 3)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid offset, target not word aligned (0x%08X)",
+ _("Invalid offset, target not word aligned (0x%08X)"),
(unsigned int)(fixP->fx_frag->fr_address + fixP->fx_where + value));
if ((value + 2) & ~0x3fe)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid offset");
+ _("Invalid offset"));
/* Round up, since pc will be rounded down. */
newval |= (value + 2) >> 2;
@@ -5353,28 +5360,28 @@ md_apply_fix3 (fixP, val, seg)
case 9: /* SP load/store */
if (value & ~0x3fc)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid offset");
+ _("Invalid offset"));
newval |= value >> 2;
break;
case 6: /* Word load/store */
if (value & ~0x7c)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid offset");
+ _("Invalid offset"));
newval |= value << 4; /* 6 - 2 */
break;
case 7: /* Byte load/store */
if (value & ~0x1f)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid offset");
+ _("Invalid offset"));
newval |= value << 6;
break;
case 8: /* Halfword load/store */
if (value & ~0x3e)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid offset");
+ _("Invalid offset"));
newval |= value << 5; /* 6 - 1 */
break;
@@ -5410,7 +5417,7 @@ md_apply_fix3 (fixP, val, seg)
{
if (value & ~0x1fc)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid immediate for stack address calculation");
+ _("Invalid immediate for stack address calculation"));
newval = subtract ? T_OPCODE_SUB_ST : T_OPCODE_ADD_ST;
newval |= value >> 2;
}
@@ -5419,7 +5426,7 @@ md_apply_fix3 (fixP, val, seg)
if (subtract ||
value & ~0x3fc)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid immediate for address calculation (value = 0x%08X)", value);
+ _("Invalid immediate for address calculation (value = 0x%08X)"), value);
newval = (rs == REG_PC ? T_OPCODE_ADD_PC : T_OPCODE_ADD_SP);
newval |= rd << 8;
newval |= value >> 2;
@@ -5428,7 +5435,7 @@ md_apply_fix3 (fixP, val, seg)
{
if (value & ~0xff)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid 8bit immediate");
+ _("Invalid 8bit immediate"));
newval = subtract ? T_OPCODE_SUB_I8 : T_OPCODE_ADD_I8;
newval |= (rd << 8) | value;
}
@@ -5436,7 +5443,7 @@ md_apply_fix3 (fixP, val, seg)
{
if (value & ~0x7)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid 3bit immediate");
+ _("Invalid 3bit immediate"));
newval = subtract ? T_OPCODE_SUB_I3 : T_OPCODE_ADD_I3;
newval |= rd | (rs << 3) | (value << 6);
}
@@ -5452,7 +5459,7 @@ md_apply_fix3 (fixP, val, seg)
case 0x05: /* 8bit immediate CMP */
if (value < 0 || value > 255)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid immediate: %d is too large", value);
+ _("Invalid immediate: %d is too large"), value);
newval |= value;
break;
@@ -5466,7 +5473,7 @@ md_apply_fix3 (fixP, val, seg)
/* 5bit shift value (0..31) */
if (value < 0 || value > 31)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Illegal Thumb shift value: %d", value);
+ _("Illegal Thumb shift value: %d"), value);
newval = md_chars_to_number (buf, THUMB_SIZE) & 0xf03f;
newval |= value << 6;
md_number_to_chars (buf, newval , THUMB_SIZE);
@@ -5475,7 +5482,7 @@ md_apply_fix3 (fixP, val, seg)
case BFD_RELOC_NONE:
default:
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Bad relocation fixup type (%d)\n", fixP->fx_r_type);
+ _("Bad relocation fixup type (%d)\n"), fixP->fx_r_type);
}
return 1;
@@ -5538,7 +5545,19 @@ tc_gen_reloc (section, fixp)
/* If this is called then the a literal has been referenced across
a section boundry - possibly due to an implicit dump */
as_bad_where (fixp->fx_file, fixp->fx_line,
- "Literal referenced across section boundry (Implicit dump?)");
+ _("Literal referenced across section boundry (Implicit dump?)"));
+ return NULL;
+
+ case BFD_RELOC_ARM_IMMEDIATE:
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("Internal_relocation (type %d) not fixed up (IMMEDIATE)"),
+ fixp->fx_r_type);
+ return NULL;
+
+ case BFD_RELOC_ARM_OFFSET_IMM:
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("Internal_relocation (type %d) not fixed up (OFFSET_IMM)"),
+ fixp->fx_r_type);
return NULL;
default:
@@ -5560,7 +5579,7 @@ tc_gen_reloc (section, fixp)
default: type = "<unknown>"; break;
}
as_bad_where (fixp->fx_file, fixp->fx_line,
- "Can not represent %s relocation in this object file format (%d)",
+ _("Can not represent %s relocation in this object file format (%d)"),
type, fixp->fx_pcrel);
return NULL;
}
@@ -5571,7 +5590,7 @@ tc_gen_reloc (section, fixp)
if (reloc->howto == NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "Can not represent %s relocation in this object file format",
+ _("Can not represent %s relocation in this object file format"),
bfd_get_reloc_code_name (code));
return NULL;
}
@@ -5590,7 +5609,7 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
fragS *frag;
symbolS *to_symbol;
{
- as_fatal ("md_create_long_jump\n");
+ as_fatal (_("md_create_long_jump\n"));
}
void
@@ -5600,7 +5619,7 @@ md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
fragS *frag;
symbolS *to_symbol;
{
- as_fatal ("md_create_short_jump\n");
+ as_fatal (_("md_create_short_jump\n"));
}
int
@@ -5608,7 +5627,7 @@ md_estimate_size_before_relax (fragP, segtype)
fragS *fragP;
segT segtype;
{
- as_fatal ("md_estimate_size_before_relax\n");
+ as_fatal (_("md_estimate_size_before_relax\n"));
return (1);
}
@@ -5676,7 +5695,7 @@ md_assemble (str)
if (p == str)
{
- as_bad ("No operator -- statement `%s'\n", str);
+ as_bad (_("No operator -- statement `%s'\n"), str);
return;
}
@@ -5726,7 +5745,7 @@ md_assemble (str)
if (q == p) /* Just a simple opcode */
{
if (opcode->comp_suffix != 0)
- as_bad ("Opcode `%s' must have suffix from <%s>\n", str,
+ as_bad (_("Opcode `%s' must have suffix from <%s>\n"), str,
opcode->comp_suffix);
else
{
@@ -5751,7 +5770,7 @@ md_assemble (str)
{
if (cond->value == 0xf0000000)
as_tsktsk (
-"Warning: Use of the 'nv' conditional is deprecated\n");
+_("Warning: Use of the 'nv' conditional is deprecated\n"));
inst.instruction |= cond->value;
r += 2;
@@ -5778,7 +5797,7 @@ md_assemble (str)
if (*s == '\0')
{
- as_bad ("Opcode `%s' must have suffix from <%s>\n", str,
+ as_bad (_("Opcode `%s' must have suffix from <%s>\n"), str,
opcode->comp_suffix);
return;
}
@@ -5870,29 +5889,29 @@ md_assemble (str)
}
else
{
- as_warn ("register '%s' does not exist\n", q);
+ as_warn (_("register '%s' does not exist\n"), q);
}
}
else if (regnum != FAIL)
{
if (reg != regnum)
- as_warn ("ignoring redefinition of register alias '%s'", copy_of_str );
+ as_warn (_("ignoring redefinition of register alias '%s'"), copy_of_str );
/* Do not warn abpout redefinitions to the same alias. */
}
else
- as_warn ("ignoring redefinition of register alias '%s' to non-existant register '%s'",
+ as_warn (_("ignoring redefinition of register alias '%s' to non-existant register '%s'"),
copy_of_str, q);
}
else
- as_warn ("ignoring incomplete .req pseuso op");
+ as_warn (_("ignoring incomplete .req pseuso op"));
*p = c;
return;
}
*p = c;
- as_bad ("bad instruction `%s'", start);
+ as_bad (_("bad instruction `%s'"), start);
}
/*
@@ -6048,7 +6067,7 @@ md_parse_option (c, arg)
return 1;
}
- as_bad ("Unrecognised APCS switch -m%s", arg);
+ as_bad (_("Unrecognised APCS switch -m%s"), arg);
return 0;
}
#endif
@@ -6144,7 +6163,7 @@ md_parse_option (c, arg)
{
case 'a': cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_3; break;
case 0: cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_2; break;
- default: as_bad ("Invalid architecture variant -m%s", arg); break;
+ default: as_bad (_("Invalid architecture variant -m%s"), arg); break;
}
break;
@@ -6155,7 +6174,7 @@ md_parse_option (c, arg)
{
case 'm': cpu_variant |= ARM_LONGMUL; break;
case 0: break;
- default: as_bad ("Invalid architecture variant -m%s", arg); break;
+ default: as_bad (_("Invalid architecture variant -m%s"), arg); break;
}
break;
@@ -6166,19 +6185,19 @@ md_parse_option (c, arg)
{
case 't': cpu_variant |= ARM_THUMB; break;
case 0: break;
- default: as_bad ("Invalid architecture variant -m%s", arg); break;
+ default: as_bad (_("Invalid architecture variant -m%s"), arg); break;
}
break;
default:
- as_bad ("Invalid architecture variant -m%s", arg);
+ as_bad (_("Invalid architecture variant -m%s"), arg);
break;
}
break;
default:
bad:
- as_bad ("Invalid processor variant -m%s", arg);
+ as_bad (_("Invalid processor variant -m%s"), arg);
return 0;
}
}
@@ -6196,26 +6215,26 @@ md_show_usage (fp)
FILE *fp;
{
fprintf (fp,
-"-m[arm][<processor name>] select processor variant\n\
+_("-m[arm][<processor name>] select processor variant\n\
-m[arm]v[2|2a|3|3m|4|4t] select architecture variant\n\
-mthumb\t\t\tonly allow Thumb instructions\n\
-mthumb-interwork\tmark the assembled code as supporting interworking\n\
-mall\t\t\tallow any instruction\n\
-mfpa10, -mfpa11\tselect floating point architecture\n\
-mfpe-old\t\tdon't allow floating-point multiple instructions\n\
--mno-fpu\t\tdon't allow any floating-point instructions.\n");
+-mno-fpu\t\tdon't allow any floating-point instructions.\n"));
#ifdef OBJ_COFF
fprintf (fp,
-"-mapcs-32, -mapcs-26\tspecify which ARM Procedure Calling Standard is in use\n");
+_("-mapcs-32, -mapcs-26\tspecify which ARM Procedure Calling Standard is in use\n"));
fprintf (fp,
-"-mapcs-float\t\tfloating point args are passed in floating point regs\n");
+_("-mapcs-float\t\tfloating point args are passed in floating point regs\n"));
fprintf (fp,
-"-mapcs-reentrant\tposition independent/reentrant code has been generated\n");
+_("-mapcs-reentrant\tposition independent/reentrant code has been generated\n"));
#endif
#ifdef ARM_BI_ENDIAN
fprintf (fp,
-"-EB\t\t\tassemble code for a big endian cpu\n\
--EL\t\t\tassemble code for a little endian cpu\n");
+_("-EB\t\t\tassemble code for a big endian cpu\n\
+-EL\t\t\tassemble code for a little endian cpu\n"));
#endif
}
@@ -6326,7 +6345,7 @@ arm_adjust_symtab ()
else if (S_GET_STORAGE_CLASS (sym) == C_EXT)
S_SET_STORAGE_CLASS (sym, C_THUMBEXTFUNC);
else
- as_bad ("%s: unexpected function type: %d", S_GET_NAME (sym), S_GET_STORAGE_CLASS (sym));
+ as_bad (_("%s: unexpected function type: %d"), S_GET_NAME (sym), S_GET_STORAGE_CLASS (sym));
}
else switch (S_GET_STORAGE_CLASS (sym))
{
diff --git a/gas/config/tc-d30v.c b/gas/config/tc-d30v.c
index 1b217b9..848144d 100644
--- a/gas/config/tc-d30v.c
+++ b/gas/config/tc-d30v.c
@@ -224,10 +224,10 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf(stream, "\nD30V options:\n\
+ fprintf(stream, (_"\nD30V options:\n\
-O Make adjacent short instructions parallel if possible.\n\
-n Warn about all NOPs inserted by the assembler.\n\
--N Warn about NOPs inserted after word multiplies.\n");
+-N Warn about NOPs inserted after word multiplies.\n"));
}
int
@@ -291,7 +291,7 @@ md_atof (type, litP, sizeP)
break;
default:
*sizeP = 0;
- return "bad call to md_atof";
+ return _("bad call to md_atof");
}
t = atof_ieee (input_line_pointer, type, words);
@@ -386,14 +386,14 @@ get_reloc (op, rel_flag)
break;
case 12:
if (!(op->flags & OPERAND_SHIFT))
- as_warn("unexpected 12-bit reloc type");
+ as_warn(_("unexpected 12-bit reloc type"));
if (rel_flag == RELOC_PCREL)
return BFD_RELOC_D30V_15_PCREL;
else
return BFD_RELOC_D30V_15;
case 18:
if (!(op->flags & OPERAND_SHIFT))
- as_warn("unexpected 18-bit reloc type");
+ as_warn(_("unexpected 18-bit reloc type"));
if (rel_flag == RELOC_PCREL)
return BFD_RELOC_D30V_21_PCREL;
else
@@ -474,9 +474,9 @@ get_operands (exp, cmp_hack)
}
if (exp[numops].X_op == O_illegal)
- as_bad ("illegal operand");
+ as_bad (_("illegal operand"));
else if (exp[numops].X_op == O_absent)
- as_bad ("missing operand");
+ as_bad (_("missing operand"));
numops++;
p = input_line_pointer;
@@ -559,7 +559,7 @@ build_insn (opcode, opers)
/* now create a fixup */
if (fixups->fc >= MAX_INSN_FIXUPS)
- as_fatal ("too many fixups");
+ as_fatal (_("too many fixups"));
fixups->fix[fixups->fc].reloc =
get_reloc((struct d30v_operand *)&d30v_operand_table[form->operands[i]], op->reloc_flag);
@@ -575,7 +575,7 @@ build_insn (opcode, opers)
/* truncate to the proper number of bits */
if ((opers[i].X_op == O_constant) && check_range (number, bits, flags))
- as_bad("operand out of range: %d",number);
+ as_bad(_("operand out of range: %d"),number);
if (bits < 31)
number &= 0x7FFFFFFF >> (31 - bits);
if (flags & OPERAND_SHIFT)
@@ -636,7 +636,7 @@ write_1_short (opcode, insn, fx)
int i, where;
if (warn_nops == NOP_ALL)
- as_warn ("NOP inserted");
+ as_warn (_("NOP inserted"));
/* the other container needs to be NOP */
/* according to 4.3.1: for FM=00, sub-instructions performed only
@@ -677,7 +677,8 @@ write_2_short (opcode1, insn1, opcode2, insn2, exec_type, fx)
char *f;
int i,j, where;
- if(exec_type != EXEC_PARALLEL && (opcode1->op->flags_used == FLAG_JSR))
+ if(exec_type != EXEC_PARALLEL &&
+ ((opcode1->op->flags_used & (FLAG_JSR | FLAG_DELAY)) == FLAG_JSR))
{
/* subroutines must be called from 32-bit boundaries */
/* so the return address will be correct */
@@ -720,19 +721,19 @@ write_2_short (opcode1, insn1, opcode2, insn2, exec_type, fx)
case EXEC_PARALLEL: /* parallel */
flag_explicitly_parallel = flag_xp_state;
if (! parallel_ok (opcode1, insn1, opcode2, insn2, exec_type))
- as_fatal ("Instructions may not be executed in parallel");
+ as_fatal (_("Instructions may not be executed in parallel"));
else if (opcode1->op->unit == IU)
{
if (opcode2->op->unit == IU)
- as_fatal ("Two IU instructions may not be executed in parallel");
- as_warn ("Swapping instruction order");
+ as_fatal (_("Two IU instructions may not be executed in parallel"));
+ as_warn (_("Swapping instruction order"));
insn = FM00 | (insn2 << 32) | insn1;
}
else if (opcode2->op->unit == MU)
{
if (opcode1->op->unit == MU)
- as_fatal ("Two MU instructions may not be executed in parallel");
- as_warn ("Swapping instruction order");
+ as_fatal (_("Two MU instructions may not be executed in parallel"));
+ as_warn (_("Swapping instruction order"));
insn = FM00 | (insn2 << 32) | insn1;
}
else
@@ -745,20 +746,20 @@ write_2_short (opcode1, insn1, opcode2, insn2, exec_type, fx)
case EXEC_SEQ: /* sequential */
if (opcode1->op->unit == IU)
- as_fatal ("IU instruction may not be in the left container");
+ as_fatal (_("IU instruction may not be in the left container"));
insn = FM01 | (insn1 << 32) | insn2;
fx = fx->next;
break;
case EXEC_REVSEQ: /* reverse sequential */
if (opcode2->op->unit == MU)
- as_fatal ("MU instruction may not be in the right container");
+ as_fatal (_("MU instruction may not be in the right container"));
insn = FM10 | (insn1 << 32) | insn2;
fx = fx->next;
break;
default:
- as_fatal("unknown execution type passed to write_2_short()");
+ as_fatal(_("unknown execution type passed to write_2_short()"));
}
/* printf("writing out %llx\n",insn); */
@@ -1090,9 +1091,9 @@ md_assemble (str)
/* assemble first instruction and save it */
prev_insn = do_assemble (str, &prev_opcode);
if (prev_insn == -1)
- as_fatal ("cannot assemble instruction ");
+ as_fatal (_("cannot assemble instruction "));
if (prev_opcode.form->form >= LONG)
- as_fatal ("First opcode is long. Unable to mix instructions as specified.");
+ as_fatal (_("First opcode is long. Unable to mix instructions as specified."));
fixups = fixups->next;
str = str2 + 2;
}
@@ -1106,7 +1107,7 @@ md_assemble (str)
etype = extype;
return;
}
- as_fatal ("cannot assemble instruction ");
+ as_fatal (_("cannot assemble instruction "));
}
if (etype)
@@ -1145,10 +1146,12 @@ md_assemble (str)
f = frag_more(8);
d30v_number_to_chars (f, NOP2, 8);
if (warn_nops == NOP_ALL || warn_nops == NOP_MULTIPLY)
- as_warn ("word of NOPs added between word multiply and %s",
- ((opcode.op->flags_used & FLAG_MEM)
- ? "load"
- : "16-bit multiply"));
+ {
+ if ((opcode.op->flags_used & FLAG_MEM))
+ as_warn (_("word of NOPs added between word multiply and load"));
+ else
+ as_warn (_("word of NOPs added between word multiply and 16-bit multiply"));
+ }
}
}
@@ -1156,7 +1159,7 @@ md_assemble (str)
if (opcode.form->form >= LONG)
{
if (extype)
- as_fatal("Unable to mix instructions as specified");
+ as_fatal(_("Unable to mix instructions as specified"));
d30v_cleanup();
write_long (&opcode, insn, fixups);
prev_insn = -1;
@@ -1173,7 +1176,7 @@ md_assemble (str)
else
{
if (extype)
- as_fatal("Unable to mix instructions as specified");
+ as_fatal(_("Unable to mix instructions as specified"));
/* save off last instruction so it may be packed on next pass */
memcpy(&prev_opcode, &opcode, sizeof(prev_opcode));
prev_insn = insn;
@@ -1232,7 +1235,7 @@ do_assemble (str, opcode)
char tmp[4];
strncpy(tmp,op_end+1,2);
tmp[2] = 0;
- as_fatal ("unknown condition code: %s",tmp);
+ as_fatal (_("unknown condition code: %s"),tmp);
return -1;
}
/* printf("condition code=%d\n",i); */
@@ -1262,14 +1265,14 @@ do_assemble (str, opcode)
if (i < 3 || i > 6)
{
name[p+2]=0;
- as_fatal ("cmpu doesn't support condition code %s",&name[p]);
+ as_fatal (_("cmpu doesn't support condition code %s"),&name[p]);
}
}
if (!*str)
{
name[p+2]=0;
- as_fatal ("unknown condition code: %s",&name[p]);
+ as_fatal (_("unknown condition code: %s"),&name[p]);
}
cmp_hack = i;
@@ -1298,7 +1301,7 @@ do_assemble (str, opcode)
/* find the first opcode with the proper name */
opcode->op = (struct d30v_opcode *)hash_find (d30v_hash, name);
if (opcode->op == NULL)
- as_fatal ("unknown opcode: %s",name);
+ as_fatal (_("unknown opcode: %s"),name);
save = input_line_pointer;
input_line_pointer = op_end;
@@ -1453,7 +1456,7 @@ tc_gen_reloc (seg, fixp)
if (reloc->howto == (reloc_howto_type *) NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "reloc %d not supported by object file format", (int)fixp->fx_r_type);
+ _("reloc %d not supported by object file format"), (int)fixp->fx_r_type);
return NULL;
}
reloc->addend = fixp->fx_addnumber;
@@ -1510,7 +1513,7 @@ md_apply_fix3 (fixp, valuep, seg)
{
/* We don't actually support subtracting a symbol. */
as_bad_where (fixp->fx_file, fixp->fx_line,
- "expression too complex");
+ _("expression too complex"));
}
}
}
@@ -1602,7 +1605,7 @@ md_apply_fix3 (fixp, valuep, seg)
break;
default:
- as_fatal ("line %d: unknown relocation type: 0x%x",fixp->fx_line,fixp->fx_r_type);
+ as_fatal (_("line %d: unknown relocation type: 0x%x"),fixp->fx_line,fixp->fx_r_type);
}
return 0;
}
diff --git a/gas/config/tc-h8500.c b/gas/config/tc-h8500.c
index e8d6c7b..68e7757 100644
--- a/gas/config/tc-h8500.c
+++ b/gas/config/tc-h8500.c
@@ -1,5 +1,5 @@
/* tc-h8500.c -- Assemble code for the Hitachi H8/500
- Copyright (C) 1993 Free Software Foundation.
+ Copyright (C) 1993, 1998 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@@ -293,7 +293,7 @@ parse_exp (s, op, page)
expression (op);
if (op->X_op == O_absent)
- as_bad ("missing operand");
+ as_bad (_("missing operand"));
new = input_line_pointer;
input_line_pointer = save;
return new;
@@ -333,14 +333,14 @@ skip_colonthing (sign, ptr, exp, def, size8, size16, size24)
{
if (!size24)
{
- as_bad (":24 not valid for this opcode");
+ as_bad (_(":24 not valid for this opcode"));
}
ptr += 2;
exp->type = size24;
}
else
{
- as_bad ("expect :8,:16 or :24");
+ as_bad (_("expect :8,:16 or :24"));
exp->type = size16;
}
}
@@ -397,7 +397,7 @@ parse_reglist (src, op)
}
else
{
- as_bad ("syntax error in reg list");
+ as_bad (_("syntax error in reg list"));
return 0;
}
if (src[idx] == '-')
@@ -415,7 +415,7 @@ parse_reglist (src, op)
}
else
{
- as_bad ("missing final register in range");
+ as_bad (_("missing final register in range"));
}
}
if (src[idx] == ',')
@@ -502,20 +502,20 @@ get_operand (ptr, op, ispage)
if (*src != ',')
{
- as_bad ("expected @(exp, Rn)");
+ as_bad (_("expected @(exp, Rn)"));
return;
}
src++;
len = parse_reg (src, &mode, &op->reg);
if (len == 0 || mode != RN)
{
- as_bad ("expected @(exp, Rn)");
+ as_bad (_("expected @(exp, Rn)"));
return;
}
src += len;
if (*src != ')')
{
- as_bad ("expected @(exp, Rn)");
+ as_bad (_("expected @(exp, Rn)"));
return;
}
*ptr = src + 1;
@@ -531,7 +531,7 @@ get_operand (ptr, op, ispage)
src++;
if (mode != RN)
{
- as_bad ("@Rn+ needs word register");
+ as_bad (_("@Rn+ needs word register"));
return;
}
op->type = RNINC;
@@ -541,7 +541,7 @@ get_operand (ptr, op, ispage)
}
if (mode != RN)
{
- as_bad ("@Rn needs word register");
+ as_bad (_("@Rn needs word register"));
return;
}
op->type = RNIND;
@@ -841,7 +841,7 @@ get_specific (opcode, operands)
}
break;
default:
- printf ("unhandled %d\n", this_try->arg_type[i]);
+ printf (_("unhandled %d\n"), this_try->arg_type[i]);
break;
}
@@ -869,7 +869,7 @@ check (operand, low, high)
|| operand->X_add_number < low
|| operand->X_add_number > high)
{
- as_bad ("operand must be absolute in range %d..%d", low, high);
+ as_bad (_("operand must be absolute in range %d..%d"), low, high);
}
return operand->X_add_number;
}
@@ -959,7 +959,7 @@ build_bytes (opcode, operand)
switch (opcode->bytes[index].insert)
{
default:
- printf ("failed for %d\n", opcode->bytes[index].insert);
+ printf (_("failed for %d\n"), opcode->bytes[index].insert);
break;
case 0:
break;
@@ -1118,14 +1118,14 @@ DEFUN (md_assemble, (str),
if (op_end == op_start)
{
- as_bad ("can't find opcode ");
+ as_bad (_("can't find opcode "));
}
opcode = (h8500_opcode_info *) hash_find (opcode_hash_control, name);
if (opcode == NULL)
{
- as_bad ("unknown opcode");
+ as_bad (_("unknown opcode"));
return;
}
@@ -1141,7 +1141,7 @@ DEFUN (md_assemble, (str),
where[0] = 0x0;
where[1] = 0x0;
- as_bad ("invalid operands for opcode");
+ as_bad (_("invalid operands for opcode"));
return;
}
@@ -1153,7 +1153,7 @@ void
DEFUN (tc_crawl_symbol_chain, (headers),
object_headers * headers)
{
- printf ("call to tc_crawl_symbol_chain \n");
+ printf (_("call to tc_crawl_symbol_chain \n"));
}
symbolS *
@@ -1167,7 +1167,7 @@ void
DEFUN (tc_headers_hook, (headers),
object_headers * headers)
{
- printf ("call to tc_headers_hook \n");
+ printf (_("call to tc_headers_hook \n"));
}
/* Various routines to kill one day */
@@ -1218,7 +1218,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "Bad call to MD_ATOF()";
+ return _("Bad call to MD_ATOF()");
}
t = atof_ieee (input_line_pointer, type, words);
if (t)
@@ -1258,7 +1258,7 @@ int md_short_jump_size;
void
tc_aout_fix_to_chars ()
{
- printf ("call to tc_aout_fix_to_chars \n");
+ printf (_("call to tc_aout_fix_to_chars \n"));
abort ();
}
@@ -1270,7 +1270,7 @@ md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
fragS *frag;
symbolS *to_symbol;
{
- as_fatal ("failed sanity check.");
+ as_fatal (_("failed sanity check."));
}
void
@@ -1280,7 +1280,7 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
fragS *frag;
symbolS *to_symbol;
{
- as_fatal ("failed sanity check.");
+ as_fatal (_("failed sanity check."));
}
static
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index 4053b2f..ccc56bc 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -1,11 +1,11 @@
/* tc-hppa.c -- Assemble for the PA
- Copyright (C) 1989, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
GAS 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 1, or (at your option)
+ the Free Software Foundation; either version 2, or (at your option)
any later version.
GAS is distributed in the hope that it will be useful,
@@ -538,7 +538,7 @@ static void pa_ip PARAMS ((char *));
static void fix_new_hppa PARAMS ((fragS *, int, int, symbolS *,
long, expressionS *, int,
bfd_reloc_code_real_type,
- enum hppa_reloc_field_selector_type,
+ enum hppa_reloc_field_selector_type_alt,
int, long, int *));
static int is_end_of_statement PARAMS ((void));
static int reg_name_search PARAMS ((char *));
@@ -1058,7 +1058,7 @@ static struct default_space_dict pa_def_spaces[] =
if ((FIELD) > (HIGH) || (FIELD) < (LOW)) \
{ \
if (! IGNORE) \
- as_bad ("Field out of range [%d..%d] (%d).", (LOW), (HIGH), \
+ as_bad (_("Field out of range [%d..%d] (%d)."), (LOW), (HIGH), \
(int) (FIELD));\
break; \
} \
@@ -1087,10 +1087,10 @@ void
pa_check_eof ()
{
if (within_entry_exit)
- as_fatal ("Missing .exit\n");
+ as_fatal (_("Missing .exit\n"));
if (within_procedure)
- as_fatal ("Missing .procend\n");
+ as_fatal (_("Missing .procend\n"));
}
/* Check to make sure we have a valid space and subspace. */
@@ -1099,10 +1099,10 @@ static void
pa_check_current_space_and_subspace ()
{
if (current_space == NULL)
- as_fatal ("Not in a space.\n");
+ as_fatal (_("Not in a space.\n"));
if (current_subspace == NULL)
- as_fatal ("Not in a subspace.\n");
+ as_fatal (_("Not in a subspace.\n"));
}
/* Returns a pointer to the label_symbol_struct for the current space.
@@ -1264,7 +1264,7 @@ cons_fix_new_hppa (frag, where, size, exp)
rel_type = R_HPPA;
if (hppa_field_selector != e_psel && hppa_field_selector != e_fsel)
- as_warn ("Invalid field selector. Assuming F%%.");
+ as_warn (_("Invalid field selector. Assuming F%%."));
fix_new_hppa (frag, where, size,
(symbolS *) NULL, (offsetT) 0, exp, 0, rel_type,
@@ -1289,13 +1289,13 @@ md_begin ()
/* Set the default machine type. */
if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, 10))
- as_warn ("could not set architecture and machine");
+ as_warn (_("could not set architecture and machine"));
/* Folding of text and data segments fails miserably on the PA.
Warn user and disable "-R" option. */
if (flag_readonly_data_in_text)
{
- as_warn ("-R option not supported on this target.");
+ as_warn (_("-R option not supported on this target."));
flag_readonly_data_in_text = 0;
}
@@ -1309,7 +1309,7 @@ md_begin ()
retval = hash_insert (op_hash, name, (struct pa_opcode *) &pa_opcodes[i]);
if (retval != NULL && *retval != '\0')
{
- as_fatal ("Internal error: can't hash `%s': %s\n", name, retval);
+ as_fatal (_("Internal error: can't hash `%s': %s\n"), name, retval);
lose = 1;
}
do
@@ -1317,7 +1317,7 @@ md_begin ()
if ((pa_opcodes[i].match & pa_opcodes[i].mask)
!= pa_opcodes[i].match)
{
- fprintf (stderr, "internal error: losing opcode: `%s' \"%s\"\n",
+ fprintf (stderr, _("internal error: losing opcode: `%s' \"%s\"\n"),
pa_opcodes[i].name, pa_opcodes[i].args);
lose = 1;
}
@@ -1327,7 +1327,7 @@ md_begin ()
}
if (lose)
- as_fatal ("Broken assembler. No assembly attempted.");
+ as_fatal (_("Broken assembler. No assembly attempted."));
/* SOM will change text_section. To make sure we never put
anything into the old one switch to the new one now. */
@@ -1379,10 +1379,10 @@ md_assemble (str)
#endif
}
else
- as_bad ("Missing function name for .PROC (corrupted label chain)");
+ as_bad (_("Missing function name for .PROC (corrupted label chain)"));
}
else
- as_bad ("Missing function name for .PROC");
+ as_bad (_("Missing function name for .PROC"));
}
/* Assemble the instruction. Results are saved into "the_insn". */
@@ -1441,7 +1441,7 @@ pa_ip (str)
break;
default:
- as_fatal ("Unknown opcode: `%s'", str);
+ as_fatal (_("Unknown opcode: `%s'"), str);
}
save_s = str;
@@ -1482,7 +1482,7 @@ pa_ip (str)
if (bfd_get_mach (stdoutput) < insn->arch)
{
if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, insn->arch))
- as_warn ("could not update architecture and machine");
+ as_warn (_("could not update architecture and machine"));
}
/* Build the opcode, checking as we go to make
@@ -1608,12 +1608,12 @@ pa_ip (str)
else if (strncasecmp (s, "s", 1) == 0)
uu = 1;
else
- as_bad ("Invalid Indexed Load Completer.");
+ as_bad (_("Invalid Indexed Load Completer."));
s++;
i++;
}
if (i > 2)
- as_bad ("Invalid Indexed Load Completer Syntax.");
+ as_bad (_("Invalid Indexed Load Completer Syntax."));
opcode |= m << 5;
INSERT_FIELD_AND_CONTINUE (opcode, uu, 13);
}
@@ -1637,7 +1637,7 @@ pa_ip (str)
m = 1;
}
else
- as_bad ("Invalid Short Load/Store Completer.");
+ as_bad (_("Invalid Short Load/Store Completer."));
s += 2;
}
opcode |= m << 5;
@@ -1660,12 +1660,12 @@ pa_ip (str)
else if (strncasecmp (s, "e", 1) == 0)
a = 1;
else
- as_bad ("Invalid Store Bytes Short Completer");
+ as_bad (_("Invalid Store Bytes Short Completer"));
s++;
i++;
}
if (i > 2)
- as_bad ("Invalid Store Bytes Short Completer");
+ as_bad (_("Invalid Store Bytes Short Completer"));
opcode |= m << 5;
INSERT_FIELD_AND_CONTINUE (opcode, a, 13);
}
@@ -1675,7 +1675,7 @@ pa_ip (str)
cmpltr = pa_parse_nonneg_cmpsub_cmpltr (&s, 1);
if (cmpltr < 0)
{
- as_bad ("Invalid Compare/Subtract Condition: %c", *s);
+ as_bad (_("Invalid Compare/Subtract Condition: %c"), *s);
cmpltr = 0;
}
INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
@@ -1690,7 +1690,7 @@ pa_ip (str)
cmpltr = pa_parse_neg_cmpsub_cmpltr (&s, 1);
if (cmpltr < 0)
{
- as_bad ("Invalid Compare/Subtract Condition.");
+ as_bad (_("Invalid Compare/Subtract Condition."));
cmpltr = 0;
}
else
@@ -1706,7 +1706,7 @@ pa_ip (str)
cmpltr = pa_parse_nonneg_add_cmpltr (&s, 1);
if (cmpltr < 0)
{
- as_bad ("Invalid Compare/Subtract Condition: %c", *s);
+ as_bad (_("Invalid Compare/Subtract Condition: %c"), *s);
cmpltr = 0;
}
INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
@@ -1721,7 +1721,7 @@ pa_ip (str)
cmpltr = pa_parse_neg_add_cmpltr (&s, 1);
if (cmpltr < 0)
{
- as_bad ("Invalid Compare/Subtract Condition");
+ as_bad (_("Invalid Compare/Subtract Condition"));
cmpltr = 0;
}
else
@@ -1747,7 +1747,7 @@ pa_ip (str)
cmpltr = pa_parse_neg_cmpsub_cmpltr (&s, 0);
if (cmpltr < 0)
{
- as_bad ("Invalid Compare/Subtract Condition");
+ as_bad (_("Invalid Compare/Subtract Condition"));
}
}
}
@@ -1824,7 +1824,7 @@ pa_ip (str)
flag = 1;
}
else
- as_bad ("Invalid Add Condition: %s", name);
+ as_bad (_("Invalid Add Condition: %s"), name);
*s = c;
}
nullif = pa_parse_nullif (&s);
@@ -1878,7 +1878,7 @@ pa_ip (str)
flag = 1;
}
else
- as_bad ("Invalid Logical Instruction Condition.");
+ as_bad (_("Invalid Logical Instruction Condition."));
*s = c;
}
opcode |= cmpltr << 13;
@@ -1953,7 +1953,7 @@ pa_ip (str)
s += 3;
}
else
- as_bad ("Invalid Logical Instruction Condition.");
+ as_bad (_("Invalid Logical Instruction Condition."));
}
opcode |= cmpltr << 13;
INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
@@ -1993,7 +1993,7 @@ pa_ip (str)
continue;
}
else
- as_bad ("Invalid Shift/Extract/Deposit Condition.");
+ as_bad (_("Invalid Shift/Extract/Deposit Condition."));
*s = c;
}
INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
@@ -2015,7 +2015,7 @@ pa_ip (str)
s += 2;
}
else
- as_bad ("Invalid Bit Branch Condition: %c", *s);
+ as_bad (_("Invalid Bit Branch Condition: %c"), *s);
}
INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
@@ -2126,7 +2126,7 @@ pa_ip (str)
num = evaluate_absolute (&the_insn);
if (num % 4)
{
- as_bad ("Branch to unaligned address");
+ as_bad (_("Branch to unaligned address"));
break;
}
CHECK_FIELD (num, 8199, -8184, 0);
@@ -2159,7 +2159,7 @@ pa_ip (str)
num = evaluate_absolute (&the_insn);
if (num % 4)
{
- as_bad ("Branch to unaligned address");
+ as_bad (_("Branch to unaligned address"));
break;
}
CHECK_FIELD (num, 262143, -262144, 0);
@@ -2196,7 +2196,7 @@ pa_ip (str)
num = evaluate_absolute (&the_insn);
if (num % 4)
{
- as_bad ("Branch to unaligned address");
+ as_bad (_("Branch to unaligned address"));
break;
}
CHECK_FIELD (num, 262143, -262144, 0);
@@ -2256,7 +2256,7 @@ pa_ip (str)
/* Handle a 3 bit SFU identifier at 25. */
case 'f':
if (*s++ != ',')
- as_bad ("Invalid SFU identifier");
+ as_bad (_("Invalid SFU identifier"));
num = pa_get_absolute_expression (&the_insn, &s);
s = expr_end;
CHECK_FIELD (num, 7, 0, 0);
@@ -2296,7 +2296,7 @@ pa_ip (str)
/* Handle a 3-bit co-processor ID field. */
case 'u':
if (*s++ != ',')
- as_bad ("Invalid COPR identifier");
+ as_bad (_("Invalid COPR identifier"));
num = pa_get_absolute_expression (&the_insn, &s);
s = expr_end;
CHECK_FIELD (num, 7, 0, 0);
@@ -2391,7 +2391,7 @@ pa_ip (str)
{
if (result.number_part < 16)
{
- as_bad ("Invalid register for single precision fmpyadd or fmpysub");
+ as_bad (_("Invalid register for single precision fmpyadd or fmpysub"));
break;
}
@@ -2412,7 +2412,7 @@ pa_ip (str)
{
if (result.number_part < 16)
{
- as_bad ("Invalid register for single precision fmpyadd or fmpysub");
+ as_bad (_("Invalid register for single precision fmpyadd or fmpysub"));
break;
}
result.number_part &= 0xF;
@@ -2432,7 +2432,7 @@ pa_ip (str)
{
if (result.number_part < 16)
{
- as_bad ("Invalid register for single precision fmpyadd or fmpysub");
+ as_bad (_("Invalid register for single precision fmpyadd or fmpysub"));
break;
}
result.number_part &= 0xF;
@@ -2452,7 +2452,7 @@ pa_ip (str)
{
if (result.number_part < 16)
{
- as_bad ("Invalid register for single precision fmpyadd or fmpysub");
+ as_bad (_("Invalid register for single precision fmpyadd or fmpysub"));
break;
}
result.number_part &= 0xF;
@@ -2472,7 +2472,7 @@ pa_ip (str)
{
if (result.number_part < 16)
{
- as_bad ("Invalid register for single precision fmpyadd or fmpysub");
+ as_bad (_("Invalid register for single precision fmpyadd or fmpysub"));
break;
}
result.number_part &= 0xF;
@@ -2496,7 +2496,7 @@ pa_ip (str)
case QUAD:
case ILLEGAL_FMT:
default:
- as_bad ("Invalid Floating Point Operand Format.");
+ as_bad (_("Invalid Floating Point Operand Format."));
}
break;
@@ -2518,7 +2518,7 @@ pa_ip (str)
}
else
{
- as_bad ("Invalid operands %s", error_message);
+ as_bad (_("Invalid operands %s"), error_message);
return;
}
}
@@ -2574,7 +2574,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "Bad call to MD_ATOF()";
+ return _("Bad call to MD_ATOF()");
}
t = atof_ieee (input_line_pointer, type, words);
if (t)
@@ -2845,7 +2845,7 @@ md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
fragS *frag;
symbolS *to_symbol;
{
- fprintf (stderr, "pa_create_short_jmp\n");
+ fprintf (stderr, _("pa_create_short_jmp\n"));
abort ();
}
@@ -2857,7 +2857,7 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
fragS *frag;
symbolS *to_symbol;
{
- fprintf (stderr, "pa_create_long_jump\n");
+ fprintf (stderr, _("pa_create_long_jump\n"));
abort ();
}
@@ -3047,16 +3047,27 @@ md_apply_fix (fixP, valp)
/* Handle some of the opcodes with the 'W' operand type. */
case 17:
- CHECK_FIELD (new_val, 262143, -262144, 0);
-
- /* Mask off 17 bits to be changed. */
- bfd_put_32 (stdoutput,
- bfd_get_32 (stdoutput, buf) & 0xffe0e002,
- buf);
- sign_unext ((new_val - 8) >> 2, 17, &resulti);
- dis_assemble_17 (resulti, &w1, &w2, &w);
- result = ((w2 << 2) | (w1 << 16) | w);
- break;
+ {
+ int distance = *valp;
+
+ CHECK_FIELD (new_val, 262143, -262144, 0);
+
+ /* If this is an absolute branch (ie no link) with an out of
+ range target, then we want to complain. */
+ if (fixP->fx_r_type == R_HPPA_PCREL_CALL
+ && (distance > 262143 || distance < -262144)
+ && (bfd_get_32 (stdoutput, buf) & 0xffe00000) == 0xe8000000)
+ CHECK_FIELD (distance, 262143, -262144, 0);
+
+ /* Mask off 17 bits to be changed. */
+ bfd_put_32 (stdoutput,
+ bfd_get_32 (stdoutput, buf) & 0xffe0e002,
+ buf);
+ sign_unext ((new_val - 8) >> 2, 17, &resulti);
+ dis_assemble_17 (resulti, &w1, &w2, &w);
+ result = ((w2 << 2) | (w1 << 16) | w);
+ break;
+ }
case 32:
result = 0;
@@ -3064,7 +3075,7 @@ md_apply_fix (fixP, valp)
break;
default:
- as_bad ("Unknown relocation encountered in md_apply_fix.");
+ as_bad (_("Unknown relocation encountered in md_apply_fix."));
return 0;
}
@@ -3074,7 +3085,7 @@ md_apply_fix (fixP, valp)
}
else
{
- printf ("no hppa_fixup entry for this fixup (fixP = 0x%x, type = 0x%x)\n",
+ printf (_("no hppa_fixup entry for this fixup (fixP = 0x%x, type = 0x%x)\n"),
(unsigned int) fixP, fixP->fx_r_type);
return 0;
}
@@ -3216,7 +3227,7 @@ pa_parse_number (s, result)
else if (!isdigit (*p))
{
if (print_errors)
- as_bad ("Undefined register: '%s'.", name);
+ as_bad (_("Undefined register: '%s'."), name);
num = -1;
}
else
@@ -3241,7 +3252,7 @@ pa_parse_number (s, result)
else
{
if (print_errors)
- as_bad ("Undefined register: '%s'.", name);
+ as_bad (_("Undefined register: '%s'."), name);
num = -1;
}
*p = c;
@@ -3279,7 +3290,7 @@ pa_parse_number (s, result)
else
{
if (print_errors)
- as_bad ("Non-absolute symbol: '%s'.", name);
+ as_bad (_("Non-absolute symbol: '%s'."), name);
num = -1;
}
}
@@ -3294,7 +3305,7 @@ pa_parse_number (s, result)
else
{
if (print_errors)
- as_bad ("Undefined absolute constant: '%s'.", name);
+ as_bad (_("Undefined absolute constant: '%s'."), name);
num = -1;
}
}
@@ -3364,7 +3375,7 @@ need_pa11_opcode (insn, result)
if (bfd_get_mach (stdoutput) < pa11)
{
if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, pa11))
- as_warn ("could not update architecture and machine");
+ as_warn (_("could not update architecture and machine"));
}
return TRUE;
}
@@ -3403,7 +3414,7 @@ pa_parse_fp_cmp_cond (s)
}
}
- as_bad ("Invalid FP Compare Condition: %s", *s);
+ as_bad (_("Invalid FP Compare Condition: %s"), *s);
/* Advance over the bogus completer. */
while (**s != ',' && **s != ' ' && **s != '\t')
@@ -3443,7 +3454,7 @@ pa_parse_fp_format (s)
else
{
format = ILLEGAL_FMT;
- as_bad ("Invalid FP Operand Format: %3s", *s);
+ as_bad (_("Invalid FP Operand Format: %3s"), *s);
}
}
@@ -3524,7 +3535,7 @@ get_expression (str)
|| seg == undefined_section
|| SEG_NORMAL (seg)))
{
- as_warn ("Bad segment in expression.");
+ as_warn (_("Bad segment in expression."));
expr_end = input_line_pointer;
input_line_pointer = save_in;
return 1;
@@ -3548,7 +3559,7 @@ pa_get_absolute_expression (insn, strp)
expression (&insn->exp);
if (insn->exp.X_op != O_constant)
{
- as_bad ("Bad segment (should be absolute).");
+ as_bad (_("Bad segment (should be absolute)."));
expr_end = input_line_pointer;
input_line_pointer = save_in;
return 0;
@@ -3647,7 +3658,7 @@ pa_build_arg_reloc (type_name)
else if (strncasecmp (type_name, "fu", 2) == 0)
return 3;
else
- as_bad ("Invalid argument location: %s\n", type_name);
+ as_bad (_("Invalid argument location: %s\n"), type_name);
return 0;
}
@@ -3678,7 +3689,7 @@ pa_align_arg_reloc (reg, arg_reloc)
new_reloc <<= 2;
break;
default:
- as_bad ("Invalid argument description: %d", reg);
+ as_bad (_("Invalid argument description: %d"), reg);
}
return new_reloc;
@@ -3701,7 +3712,7 @@ pa_parse_nullif (s)
nullif = 1;
else
{
- as_bad ("Invalid Nullification: (%c)", **s);
+ as_bad (_("Invalid Nullification: (%c)"), **s);
nullif = 0;
}
*s = *s + 1;
@@ -4163,7 +4174,7 @@ pa_call_args (call_desc)
}
else
{
- as_bad ("Invalid .CALL argument: %s", name);
+ as_bad (_("Invalid .CALL argument: %s"), name);
}
p = input_line_pointer;
*p = c;
@@ -4282,7 +4293,7 @@ pa_callinfo (unused)
/* .CALLINFO must appear within a procedure definition. */
if (!within_procedure)
- as_bad (".callinfo is not within a procedure definition");
+ as_bad (_(".callinfo is not within a procedure definition"));
/* Mark the fact that we found the .CALLINFO for the
current procedure. */
@@ -4302,7 +4313,7 @@ pa_callinfo (unused)
temp = get_absolute_expression ();
if ((temp & 0x3) != 0)
{
- as_bad ("FRAME parameter must be a multiple of 8: %d\n", temp);
+ as_bad (_("FRAME parameter must be a multiple of 8: %d\n"), temp);
temp = 0;
}
@@ -4321,7 +4332,7 @@ pa_callinfo (unused)
even though %r19 is caller saved. I think this is a bug in
the HP assembler, and we are not going to emulate it. */
if (temp < 3 || temp > 18)
- as_bad ("Value for ENTRY_GR must be in the range 3..18\n");
+ as_bad (_("Value for ENTRY_GR must be in the range 3..18\n"));
last_call_info->ci_unwind.descriptor.entry_gr = temp - 2;
}
else if ((strncasecmp (name, "entry_fr", 8) == 0))
@@ -4333,7 +4344,7 @@ pa_callinfo (unused)
/* Similarly the HP assembler takes 31 as the high bound even
though %fr21 is the last callee saved floating point register. */
if (temp < 12 || temp > 21)
- as_bad ("Value for ENTRY_FR must be in the range 12..21\n");
+ as_bad (_("Value for ENTRY_FR must be in the range 12..21\n"));
last_call_info->ci_unwind.descriptor.entry_fr = temp - 11;
}
else if ((strncasecmp (name, "entry_sr", 8) == 0))
@@ -4343,7 +4354,7 @@ pa_callinfo (unused)
input_line_pointer++;
temp = get_absolute_expression ();
if (temp != 3)
- as_bad ("Value for ENTRY_SR must be 3\n");
+ as_bad (_("Value for ENTRY_SR must be 3\n"));
}
/* Note whether or not this function performs any calls. */
else if ((strncasecmp (name, "calls", 5) == 0) ||
@@ -4399,7 +4410,7 @@ pa_callinfo (unused)
}
else
{
- as_bad ("Invalid .CALLINFO argument: %s", name);
+ as_bad (_("Invalid .CALLINFO argument: %s"), name);
*input_line_pointer = c;
}
if (!is_end_of_statement ())
@@ -4502,11 +4513,11 @@ pa_entry (unused)
pa_check_current_space_and_subspace ();
if (!within_procedure)
- as_bad ("Misplaced .entry. Ignored.");
+ as_bad (_("Misplaced .entry. Ignored."));
else
{
if (!callinfo_found)
- as_bad ("Missing .callinfo.");
+ as_bad (_("Missing .callinfo."));
}
demand_empty_rest_of_line ();
within_entry_exit = TRUE;
@@ -4554,9 +4565,9 @@ pa_equ (reg)
else
{
if (reg)
- as_bad (".REG must use a label");
+ as_bad (_(".REG must use a label"));
else
- as_bad (".EQU must use a label");
+ as_bad (_(".EQU must use a label"));
}
pa_undefine_label ();
@@ -4607,15 +4618,15 @@ pa_exit (unused)
pa_check_current_space_and_subspace ();
if (!within_procedure)
- as_bad (".EXIT must appear within a procedure");
+ as_bad (_(".EXIT must appear within a procedure"));
else
{
if (!callinfo_found)
- as_bad ("Missing .callinfo");
+ as_bad (_("Missing .callinfo"));
else
{
if (!within_entry_exit)
- as_bad ("No .ENTRY for this .EXIT");
+ as_bad (_("No .ENTRY for this .EXIT"));
else
{
within_entry_exit = FALSE;
@@ -4642,7 +4653,7 @@ pa_export (unused)
/* Make sure the given symbol exists. */
if ((symbol = symbol_find_or_make (name)) == NULL)
{
- as_bad ("Cannot define export symbol: %s\n", name);
+ as_bad (_("Cannot define export symbol: %s\n"), name);
p = input_line_pointer;
*p = c;
input_line_pointer++;
@@ -4695,7 +4706,7 @@ pa_type_args (symbolP, is_export)
if (symbolP->bsym->flags & BSF_FUNCTION)
{
if (is_export)
- as_tsktsk ("Using ENTRY rather than CODE in export directive for %s", symbolP->bsym->name);
+ as_tsktsk (_("Using ENTRY rather than CODE in export directive for %s"), symbolP->bsym->name);
symbolP->bsym->flags |= BSF_FUNCTION;
type = SYMBOL_TYPE_ENTRY;
@@ -4795,7 +4806,7 @@ pa_type_args (symbolP, is_export)
}
else
{
- as_bad ("Undefined .EXPORT/.IMPORT argument (ignored): %s", name);
+ as_bad (_("Undefined .EXPORT/.IMPORT argument (ignored): %s"), name);
p = input_line_pointer;
*p = c;
}
@@ -4877,12 +4888,12 @@ pa_label (unused)
}
else
{
- as_warn ("Missing label name on .LABEL");
+ as_warn (_("Missing label name on .LABEL"));
}
if (!is_end_of_statement ())
{
- as_warn ("extra .LABEL arguments ignored.");
+ as_warn (_("extra .LABEL arguments ignored."));
ignore_rest_of_line ();
}
demand_empty_rest_of_line ();
@@ -4913,17 +4924,17 @@ pa_level (unused)
{
input_line_pointer += 3;
if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, 10))
- as_warn ("could not set architecture and machine");
+ as_warn (_("could not set architecture and machine"));
}
else if (strncmp (level, "1.1", 3) == 0)
{
input_line_pointer += 3;
if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, 11))
- as_warn ("could not set architecture and machine");
+ as_warn (_("could not set architecture and machine"));
}
else
{
- as_bad ("Unrecognized .LEVEL argument\n");
+ as_bad (_("Unrecognized .LEVEL argument\n"));
ignore_rest_of_line ();
}
demand_empty_rest_of_line ();
@@ -4957,7 +4968,7 @@ pa_param (unused)
if ((symbol = symbol_find_or_make (name)) == NULL)
{
- as_bad ("Cannot define static symbol: %s\n", name);
+ as_bad (_("Cannot define static symbol: %s\n"), name);
p = input_line_pointer;
*p = c;
input_line_pointer++;
@@ -4990,7 +5001,7 @@ pa_proc (unused)
pa_check_current_space_and_subspace ();
if (within_procedure)
- as_fatal ("Nested procedures");
+ as_fatal (_("Nested procedures"));
/* Reset global variables for new procedure. */
callinfo_found = FALSE;
@@ -5000,7 +5011,7 @@ pa_proc (unused)
call_info = (struct call_info *) xmalloc (sizeof (struct call_info));
if (!call_info)
- as_fatal ("Cannot allocate unwind descriptor\n");
+ as_fatal (_("Cannot allocate unwind descriptor\n"));
bzero (call_info, sizeof (struct call_info));
@@ -5036,7 +5047,7 @@ pa_proc (unused)
label_symbol->lss_label->bsym->flags |= BSF_FUNCTION;
}
else
- as_bad ("Missing function name for .PROC (corrupted label chain)");
+ as_bad (_("Missing function name for .PROC (corrupted label chain)"));
}
else
last_call_info->start_symbol = NULL;
@@ -5088,20 +5099,20 @@ pa_procend (unused)
#endif
}
else
- as_bad ("Missing function name for .PROC (corrupted label chain)");
+ as_bad (_("Missing function name for .PROC (corrupted label chain)"));
}
else
- as_bad ("Missing function name for .PROC");
+ as_bad (_("Missing function name for .PROC"));
}
if (!within_procedure)
- as_bad ("misplaced .procend");
+ as_bad (_("misplaced .procend"));
if (!callinfo_found)
- as_bad ("Missing .callinfo for this procedure");
+ as_bad (_("Missing .callinfo for this procedure"));
if (within_entry_exit)
- as_bad ("Missing .EXIT for a .ENTRY");
+ as_bad (_("Missing .EXIT for a .ENTRY"));
#ifdef OBJ_ELF
/* ELF needs to mark the end of each function so that it can compute
@@ -5201,7 +5212,7 @@ pa_parse_space_stmt (space_name, create_flag)
}
else
{
- as_bad ("Invalid .SPACE argument");
+ as_bad (_("Invalid .SPACE argument"));
*input_line_pointer = c;
if (!is_end_of_statement ())
input_line_pointer++;
@@ -5249,7 +5260,7 @@ pa_space (unused)
if (within_procedure)
{
- as_bad ("Can\'t change spaces within a procedure definition. Ignored");
+ as_bad (_("Can\'t change spaces within a procedure definition. Ignored"));
ignore_rest_of_line ();
}
else
@@ -5376,7 +5387,7 @@ pa_spnum (unused)
md_number_to_chars (p, SPACE_SPNUM (space), 4);
}
else
- as_warn ("Undefined space: '%s' Assuming space number = 0.", name);
+ as_warn (_("Undefined space: '%s' Assuming space number = 0."), name);
*input_line_pointer = c;
demand_empty_rest_of_line ();
@@ -5418,11 +5429,11 @@ pa_subspace (create_new)
asection *section;
if (current_space == NULL)
- as_fatal ("Must be in a space before changing or declaring subspaces.\n");
+ as_fatal (_("Must be in a space before changing or declaring subspaces.\n"));
if (within_procedure)
{
- as_bad ("Can\'t change subspaces within a procedure definition. Ignored");
+ as_bad (_("Can\'t change subspaces within a procedure definition. Ignored"));
ignore_rest_of_line ();
}
else
@@ -5458,7 +5469,7 @@ pa_subspace (create_new)
subseg_set (ssd->ssd_seg, ssd->ssd_subseg);
current_subspace = ssd;
if (!is_end_of_statement ())
- as_warn ("Parameters of an existing subspace can\'t be modified");
+ as_warn (_("Parameters of an existing subspace can\'t be modified"));
demand_empty_rest_of_line ();
return;
}
@@ -5511,7 +5522,7 @@ pa_subspace (create_new)
alignment = get_absolute_expression ();
if (log2 (alignment) == -1)
{
- as_bad ("Alignment must be a power of 2");
+ as_bad (_("Alignment must be a power of 2"));
alignment = 1;
}
}
@@ -5553,9 +5564,9 @@ pa_subspace (create_new)
zero = 1;
}
else if ((strncasecmp (name, "first", 5) == 0))
- as_bad ("FIRST not supported as a .SUBSPACE argument");
+ as_bad (_("FIRST not supported as a .SUBSPACE argument"));
else
- as_bad ("Invalid .SUBSPACE argument");
+ as_bad (_("Invalid .SUBSPACE argument"));
if (!is_end_of_statement ())
input_line_pointer++;
}
@@ -5595,7 +5606,7 @@ pa_subspace (create_new)
section = subseg_new (alias, 0);
else if (!alias && USE_ALIASES)
{
- as_warn ("Ignoring subspace decl due to ELF BFD bugs.");
+ as_warn (_("Ignoring subspace decl due to ELF BFD bugs."));
demand_empty_rest_of_line ();
return;
}
@@ -5758,7 +5769,7 @@ pa_spaces_begin ()
def_space_index].segment);
if (space == NULL)
{
- as_fatal ("Internal error: Unable to find containing space for %s.",
+ as_fatal (_("Internal error: Unable to find containing space for %s."),
pa_def_subspaces[i].name);
}
@@ -5799,7 +5810,7 @@ create_new_space (name, spnum, loadable, defined, private,
chain_entry = (sd_chain_struct *) xmalloc (sizeof (sd_chain_struct));
if (!chain_entry)
- as_fatal ("Out of memory: could not allocate new space chain entry: %s\n",
+ as_fatal (_("Out of memory: could not allocate new space chain entry: %s\n"),
name);
SPACE_NAME (chain_entry) = (char *) xmalloc (strlen (name) + 1);
@@ -5885,7 +5896,7 @@ create_new_subspace (space, name, loadable, code_only, common,
chain_entry = (ssd_chain_struct *) xmalloc (sizeof (ssd_chain_struct));
if (!chain_entry)
- as_fatal ("Out of memory: could not allocate new subspace chain entry: %s\n", name);
+ as_fatal (_("Out of memory: could not allocate new subspace chain entry: %s\n"), name);
SUBSPACE_NAME (chain_entry) = (char *) xmalloc (strlen (name) + 1);
strcpy (SUBSPACE_NAME (chain_entry), name);
@@ -6113,6 +6124,7 @@ pa_subspace_start (space, quadrant)
sd_chain_struct *space;
int quadrant;
{
+#ifdef OBJ_SOM
/* FIXME. Assumes everyone puts read/write data at 0x4000000, this
is not correct for the PA OSF1 port. */
if ((strcmp (SPACE_NAME (space), "$PRIVATE$") == 0) && quadrant == 1)
@@ -6121,6 +6133,8 @@ pa_subspace_start (space, quadrant)
return 0x40000000;
else
return 0;
+#endif
+ return 0;
}
/* FIXME. Needs documentation. */
@@ -6414,6 +6428,10 @@ hppa_fix_adjustable (fixp)
if (fixp->fx_addsy && fixp->fx_addsy->bsym->flags & BSF_GLOBAL)
return 0;
+ /* Reject absolute calls (jumps). */
+ if (hppa_fix->fx_r_type == R_HPPA_ABS_CALL)
+ return 0;
+
/* Reject reductions of function symbols. */
if (fixp->fx_addsy == 0
|| (fixp->fx_addsy->bsym->flags & BSF_FUNCTION) == 0)
@@ -6464,6 +6482,8 @@ hppa_force_relocation (fixp)
&& (distance > 262143 || distance < -262144))
return 1;
+ if (fixp->fx_r_type == R_HPPA_ABS_CALL)
+ return 1;
#undef arg_reloc_stub_needed
/* No need (yet) to force another relocations to be emitted. */
@@ -6518,11 +6538,11 @@ hppa_elf_mark_end_of_function ()
if (symbolP)
last_call_info->end_symbol = symbolP;
else
- as_bad ("Symbol '%s' could not be created.", name);
+ as_bad (_("Symbol '%s' could not be created."), name);
}
else
- as_bad ("No memory for symbol name.");
+ as_bad (_("No memory for symbol name."));
}
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 10c97f5..e119f69 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -171,8 +171,6 @@ static char digit_chars[256];
/* put here all non-digit non-letter charcters that may occur in an operand */
static char operand_special_chars[] = "%$-+(,)*._~/<>|&^!:[@]";
-static char *ordinal_names[] = {"first", "second", "third"}; /* for printfs */
-
/* md_assemble() always leaves the strings it's passed unaltered. To
effect this we maintain a stack of saved characters that we've smashed
with '\0's (indicating end of strings for various sub-fields of the
@@ -588,7 +586,7 @@ md_begin ()
if (hash_err)
{
hash_error:
- as_fatal ("Internal Error: Can't hash %s: %s", prev_name,
+ as_fatal (_("Internal Error: Can't hash %s: %s"), prev_name,
hash_err);
}
prev_name = optab->name;
@@ -838,7 +836,7 @@ pt (t)
if (t == Unknown)
{
- fprintf (stdout, "Unknown");
+ fprintf (stdout, _("Unknown"));
}
else
{
@@ -875,8 +873,11 @@ reloc (size, pcrel, other)
case 4: return BFD_RELOC_32;
}
- as_bad ("Can not do %d byte %srelocation", size,
- pcrel ? "pc-relative " : "");
+ if (pcrel)
+ as_bad (_("Can not do %d byte pc-relative relocation"), size);
+ else
+ as_bad (_("Can not do %d byte relocation"), size);
+
return BFD_RELOC_NONE;
}
@@ -955,7 +956,7 @@ md_assemble (line)
{
if (!is_opcode_char (*l))
{
- as_bad ("invalid character %s in opcode", output_invalid (*l));
+ as_bad (_("invalid character %s in opcode"), output_invalid (*l));
return;
}
else if (*l != PREFIX_SEPERATOR)
@@ -971,14 +972,14 @@ md_assemble (line)
if (l == token_start)
{
- as_bad ("expecting prefix; got nothing");
+ as_bad (_("expecting prefix; got nothing"));
return;
}
END_STRING_AND_SAVE (l);
prefix = (prefix_entry *) hash_find (prefix_hash, token_start);
if (!prefix)
{
- as_bad ("no such opcode prefix `%s'", token_start);
+ as_bad (_("no such opcode prefix `%s'"), token_start);
RESTORE_END_STRING (l);
return;
}
@@ -1004,7 +1005,7 @@ md_assemble (line)
END_STRING_AND_SAVE (l);
if (token_start == l)
{
- as_bad ("expecting opcode; got nothing");
+ as_bad (_("expecting opcode; got nothing"));
RESTORE_END_STRING (l);
return;
}
@@ -1028,7 +1029,7 @@ md_assemble (line)
}
if (!current_templates)
{
- as_bad ("no such 386 instruction: `%s'", token_start);
+ as_bad (_("no such 386 instruction: `%s'"), token_start);
RESTORE_END_STRING (l);
return;
}
@@ -1039,7 +1040,7 @@ md_assemble (line)
if (expecting_string_instruction &&
!(current_templates->start->opcode_modifier & IsString))
{
- as_bad ("expecting string instruction after `%s'",
+ as_bad (_("expecting string instruction after `%s'"),
expecting_string_instruction);
return;
}
@@ -1055,9 +1056,8 @@ md_assemble (line)
{
if (!is_space_char (*l))
{
- as_bad ("invalid character %s before %s operand",
- output_invalid (*l),
- ordinal_names[i.operands]);
+ as_bad (_("invalid character %s before operand %d"),
+ output_invalid (*l), i.operands);
return;
}
l++;
@@ -1070,8 +1070,8 @@ md_assemble (line)
{
if (paren_not_balanced)
{
- as_bad ("unbalanced parenthesis in %s operand.",
- ordinal_names[i.operands]);
+ as_bad (_("unbalanced parenthesis in operand %d."),
+ i.operands);
return;
}
else
@@ -1079,9 +1079,8 @@ md_assemble (line)
}
else if (!is_operand_char (*l) && !is_space_char (*l))
{
- as_bad ("invalid character %s in %s operand",
- output_invalid (*l),
- ordinal_names[i.operands]);
+ as_bad (_("invalid character %s in operand %d"),
+ output_invalid (*l), i.operands);
return;
}
if (*l == '(')
@@ -1096,7 +1095,7 @@ md_assemble (line)
this_operand = i.operands++;
if (i.operands > MAX_OPERANDS)
{
- as_bad ("spurious operands; (%d operands/instruction max)",
+ as_bad (_("spurious operands; (%d operands/instruction max)"),
MAX_OPERANDS);
return;
}
@@ -1112,12 +1111,12 @@ md_assemble (line)
if (expecting_operand)
{
expecting_operand_after_comma:
- as_bad ("expecting operand after ','; got nothing");
+ as_bad (_("expecting operand after ','; got nothing"));
return;
}
if (*l == ',')
{
- as_bad ("expecting operand before ','; got nothing");
+ as_bad (_("expecting operand before ','; got nothing"));
return;
}
}
@@ -1242,7 +1241,7 @@ md_assemble (line)
} /* for (t = ... */
if (t == current_templates->end)
{ /* we found no match */
- as_bad ("suffix or operands invalid for `%s'",
+ as_bad (_("suffix or operands invalid for `%s'"),
current_templates->start->name);
return;
}
@@ -1294,7 +1293,7 @@ md_assemble (line)
{
if (i.suffix)
{
- as_bad ("extraneous opcode suffix given");
+ as_bad (_("extraneous opcode suffix given"));
return;
}
if (i.tm.opcode_modifier & Data16)
@@ -1350,7 +1349,7 @@ md_assemble (line)
bad = 1;
}
if (bad)
- as_bad ("register does not match opcode suffix");
+ as_bad (_("register does not match opcode suffix"));
}
/* Make still unresolved immediate matches conform to size of immediate
@@ -1362,7 +1361,7 @@ md_assemble (line)
{
if (!i.suffix)
{
- as_bad ("no opcode suffix given; can't determine immediate size");
+ as_bad (_("no opcode suffix given; can't determine immediate size"));
return;
}
overlap0 &= (i.suffix == BYTE_OPCODE_SUFFIX ? (Imm8 | Imm8S) :
@@ -1374,7 +1373,7 @@ md_assemble (line)
{
if (!i.suffix)
{
- as_bad ("no opcode suffix given; can't determine immediate size");
+ as_bad (_("no opcode suffix given; can't determine immediate size"));
return;
}
overlap1 &= (i.suffix == BYTE_OPCODE_SUFFIX ? (Imm8 | Imm8S) :
@@ -1400,7 +1399,7 @@ md_assemble (line)
if (!i.suffix && (i.tm.opcode_modifier & W))
{
- as_bad ("no opcode suffix given and no register operands; can't size instruction");
+ as_bad (_("no opcode suffix given and no register operands; can't size instruction"));
return;
}
@@ -1772,7 +1771,7 @@ md_assemble (line)
int jmp_size = flag_16bit_code ? 2 : 4;
if (flag_16bit_code && !fits_in_signed_word (n))
{
- as_bad ("16-bit jump out of range");
+ as_bad (_("16-bit jump out of range"));
return;
}
@@ -1886,7 +1885,7 @@ md_assemble (line)
md_number_to_chars (p, (valueT) n, size);
if (size == 1 && !fits_in_signed_byte (n))
{
- as_bad ("loop/jecx only takes byte displacement; %lu shortened to %d",
+ as_bad (_("loop/jecx only takes byte displacement; %lu shortened to %d"),
n, *p);
}
}
@@ -1917,7 +1916,7 @@ md_assemble (line)
fix_new_exp (frag_now, p + 1 - frag_now->fr_literal, 4,
i.imms[1], 0, BFD_RELOC_32);
if (i.imms[0]->X_op != O_constant)
- as_bad ("can't handle non absolute segment in long call/jmp");
+ as_bad (_("can't handle non absolute segment in long call/jmp"));
md_number_to_chars (p + 5, (valueT) i.imms[0]->X_add_number, 2);
}
else
@@ -2161,7 +2160,7 @@ i386_operand (operand_string)
register reg_entry *r;
if (!(r = parse_register (op_string)))
{
- as_bad ("bad register name `%s'", op_string);
+ as_bad (_("bad register name `%s'"), op_string);
return 0;
}
/* Check for segment override, rather than segment register by
@@ -2194,7 +2193,7 @@ i386_operand (operand_string)
if (!is_digit_char (*op_string) && !is_identifier_char (*op_string)
&& *op_string != '(' && *op_string != ABSOLUTE_PREFIX)
{
- as_bad ("bad memory operand `%s'", op_string);
+ as_bad (_("bad memory operand `%s'"), op_string);
return 0;
}
/* Handle case of %es:*foo. */
@@ -2217,7 +2216,7 @@ i386_operand (operand_string)
if (i.imm_operands == MAX_IMMEDIATE_OPERANDS)
{
- as_bad ("only 1 or 2 immediate operands are allowed");
+ as_bad (_("only 1 or 2 immediate operands are allowed"));
return 0;
}
@@ -2234,7 +2233,7 @@ i386_operand (operand_string)
in certain cases. Oddly, the code in question turns out
to work correctly anyhow, so we make this just a warning
until those versions of gcc are obsolete. */
- as_warn ("unrecognized characters `%s' in expression",
+ as_warn (_("unrecognized characters `%s' in expression"),
input_line_pointer);
}
input_line_pointer = save_input_line_pointer;
@@ -2242,7 +2241,7 @@ i386_operand (operand_string)
if (exp->X_op == O_absent)
{
/* missing or bad expr becomes absolute 0 */
- as_bad ("missing or invalid immediate expression `%s' taken as 0",
+ as_bad (_("missing or invalid immediate expression `%s' taken as 0"),
operand_string);
exp->X_op = O_constant;
exp->X_add_number = 0;
@@ -2266,7 +2265,7 @@ i386_operand (operand_string)
)
{
seg_unimplemented:
- as_bad ("Unimplemented segment type %d in parse_operand", exp_seg);
+ as_bad (_("Unimplemented segment type %d in parse_operand"), exp_seg);
return 0;
}
#endif
@@ -2302,7 +2301,7 @@ i386_operand (operand_string)
&& (current_templates->start->opcode_modifier & IsString) == 0)
|| i.mem_operands == 2)
{
- as_bad ("too many memory references for `%s'",
+ as_bad (_("too many memory references for `%s'"),
current_templates->start->name);
return 0;
}
@@ -2379,14 +2378,14 @@ i386_operand (operand_string)
base_string++;
if (base_string == base_reg_name + 1)
{
- as_bad ("can't find base register name after `(%c'",
+ as_bad (_("can't find base register name after `(%c'"),
REGISTER_PREFIX);
return 0;
}
END_STRING_AND_SAVE (base_string);
if (!(i.base_reg = parse_register (base_reg_name)))
{
- as_bad ("bad base register name `%s'", base_reg_name);
+ as_bad (_("bad base register name `%s'"), base_reg_name);
RESTORE_END_STRING (base_string);
return 0;
}
@@ -2398,7 +2397,7 @@ i386_operand (operand_string)
OR ')' ==> end. (scale factor = 1) */
if (*base_string != ',' && *base_string != ')')
{
- as_bad ("expecting `,' or `)' after base register in `%s'",
+ as_bad (_("expecting `,' or `)' after base register in `%s'"),
operand_string);
return 0;
}
@@ -2411,7 +2410,7 @@ i386_operand (operand_string)
END_STRING_AND_SAVE (base_string);
if (!(i.index_reg = parse_register (index_reg_name)))
{
- as_bad ("bad index register name `%s'", index_reg_name);
+ as_bad (_("bad index register name `%s'"), index_reg_name);
RESTORE_END_STRING (base_string);
return 0;
}
@@ -2426,14 +2425,14 @@ i386_operand (operand_string)
base_string++;
if (base_string == num_string)
{
- as_bad ("can't find a scale factor after `,'");
+ as_bad (_("can't find a scale factor after `,'"));
return 0;
}
END_STRING_AND_SAVE (base_string);
/* We've got a scale factor. */
if (!sscanf (num_string, "%d", &num))
{
- as_bad ("can't parse scale factor from `%s'", num_string);
+ as_bad (_("can't parse scale factor from `%s'"), num_string);
RESTORE_END_STRING (base_string);
return 0;
}
@@ -2453,7 +2452,7 @@ i386_operand (operand_string)
i.log2_scale_factor = 3;
break;
default:
- as_bad ("expecting scale factor of 1, 2, 4, 8; got %d", num);
+ as_bad (_("expecting scale factor of 1, 2, 4, 8; got %d"), num);
return 0;
}
}
@@ -2461,7 +2460,7 @@ i386_operand (operand_string)
{
if (!i.index_reg && *base_string == ',')
{
- as_bad ("expecting index register or scale factor after `,'; got '%c'",
+ as_bad (_("expecting index register or scale factor after `,'; got '%c'"),
*(base_string + 1));
return 0;
}
@@ -2529,7 +2528,7 @@ i386_operand (operand_string)
*cp = '@';
}
else
- as_bad ("Bad reloc specifier `%s' in expression", cp + 1);
+ as_bad (_("Bad reloc specifier `%s' in expression"), cp + 1);
input_line_pointer = tmpbuf;
}
@@ -2555,13 +2554,14 @@ i386_operand (operand_string)
#endif
if (*input_line_pointer)
- as_bad ("Ignoring junk `%s' after expression", input_line_pointer);
+ as_bad (_("Ignoring junk `%s' after expression"),
+ input_line_pointer);
RESTORE_END_STRING (displacement_string_end);
input_line_pointer = save_input_line_pointer;
if (exp->X_op == O_absent)
{
/* missing expr becomes absolute 0 */
- as_bad ("missing or invalid displacement `%s' taken as 0",
+ as_bad (_("missing or invalid displacement `%s' taken as 0"),
operand_string);
i.types[this_operand] |= (Disp | Abs);
exp->X_op = O_constant;
@@ -2594,7 +2594,7 @@ i386_operand (operand_string)
if (i.base_reg && i.index_reg &&
!(i.base_reg->reg_type & i.index_reg->reg_type & Reg))
{
- as_bad ("register size mismatch in (base,index,scale) expression");
+ as_bad (_("register size mismatch in (base,index,scale) expression"));
return 0;
}
/*
@@ -2610,18 +2610,19 @@ i386_operand (operand_string)
if ((i.base_reg && (i.base_reg->reg_type & Reg32) == 0) ||
(i.index_reg && (i.index_reg->reg_type & Reg32) == 0))
{
- as_bad ("base/index register must be 32 bit register");
+ as_bad (_("base/index register must be 32 bit register"));
return 0;
}
if (i.index_reg && i.index_reg == esp)
{
- as_bad ("`%%s' may not be used as an index register", esp->reg_name);
+ as_bad (_("`%%s' may not be used as an index register"),
+ esp->reg_name);
return 0;
}
}
else
{ /* it's not a memory operand; argh! */
- as_bad ("invalid char %s begining %s operand `%s'",
+ as_bad (_("invalid char %s begining %s operand `%s'"),
output_invalid (*op_string), ordinal_names[this_operand],
op_string);
return 0;
@@ -3007,7 +3008,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "Bad call to md_atof ()";
+ return _("Bad call to md_atof ()");
}
t = atof_ieee (input_line_pointer, type, words);
if (t)
@@ -3104,8 +3105,8 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf (stream, "\
--m do long jump\n");
+ fprintf (stream, _("\
+-m do long jump\n"));
}
#ifdef BFD_ASSEMBLER
@@ -3144,7 +3145,7 @@ md_undefined_symbol (name)
if(!GOT_symbol)
{
if(symbol_find(name))
- as_bad("GOT already in symbol table");
+ as_bad(_("GOT already in symbol table"));
GOT_symbol = symbol_new (name, undefined_section,
(valueT) 0, &zero_address_frag);
};
@@ -3245,8 +3246,11 @@ tc_gen_reloc (section, fixp)
MAP (2, 1, BFD_RELOC_16_PCREL);
MAP (4, 1, BFD_RELOC_32_PCREL);
default:
- as_bad ("Can not do %d byte %srelocation", fixp->fx_size,
- fixp->fx_pcrel ? "pc-relative " : "");
+ if (fixp->fx_pcrel)
+ as_bad (_("Can not do %d byte pc-relative relocation"),
+ fixp->fx_size);
+ else
+ as_bad (_("Can not do %d byte relocation"), fixp->fx_size);
}
}
#undef MAP
@@ -3269,7 +3273,7 @@ tc_gen_reloc (section, fixp)
if (rel->howto == NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "Cannot represent relocation type %s",
+ _("Cannot represent relocation type %s"),
bfd_get_reloc_code_name (code));
/* Set howto to a garbage value so that we can keep going. */
rel->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
diff --git a/gas/config/tc-i960.c b/gas/config/tc-i960.c
index 57158c5..5dae237 100644
--- a/gas/config/tc-i960.c
+++ b/gas/config/tc-i960.c
@@ -1,6 +1,6 @@
-/* to sanitize : grep -v XL */
/* tc-i960.c - All the i80960-specific stuff
- Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+ Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 1997
+ Free Software Foundation, Inc.
This file is part of GAS.
@@ -15,8 +15,9 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
/* See comment on md_parse_option for 80960-specific invocation options. */
@@ -446,8 +447,8 @@ static struct hash_control *areg_hash; /* Abase register hash table */
#define ARCH_KB 2
#define ARCH_MC 3
#define ARCH_CA 4
-#define ARCH_HX 5
-#define ARCH_XL 6
+#define ARCH_JX 5
+#define ARCH_HX 6
int architecture = ARCH_ANY; /* Architecture requested on invocation line */
int iclasses_seen; /* OR of instruction classes (I_* constants)
* for which we've actually assembled
@@ -540,7 +541,7 @@ md_begin ()
(char *) &aregs[i].areg_num);
if (retval)
- as_fatal ("Hashing returned \"%s\".", retval);
+ as_fatal (_("Hashing returned \"%s\"."), retval);
}
/*****************************************************************************
@@ -574,7 +575,7 @@ md_assemble (textP)
int n; /* Offset of last character in opcode mnemonic */
- static const char bp_error_msg[] = "branch prediction invalid on this opcode";
+ static const char bp_error_msg[] = _("branch prediction invalid on this opcode");
/* Parse instruction into opcode and operands */
@@ -617,12 +618,12 @@ md_assemble (textP)
oP = (struct i960_opcode *) hash_find (op_hash, args[0]);
if (!oP || !targ_has_iclass (oP->iclass))
{
- as_bad ("invalid opcode, \"%s\".", args[0]);
+ as_bad (_("invalid opcode, \"%s\"."), args[0]);
}
else if (n_ops != oP->num_ops)
{
- as_bad ("improper number of operands. expecting %d, got %d",
+ as_bad (_("improper number of operands. expecting %d, got %d"),
oP->num_ops, n_ops);
}
else
@@ -767,7 +768,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "Bad call to md_atof()";
+ return _("Bad call to md_atof()");
}
t = atof_ieee (input_line_pointer, type, words);
@@ -857,7 +858,7 @@ md_number_to_field (instrP, val, bfixP)
if (((val < 0) && (sign != -1))
|| ((val > 0) && (sign != 0)))
{
- as_bad ("Fixup of %ld too large for field width of %d",
+ as_bad (_("Fixup of %ld too large for field width of %d"),
val, numbits);
}
else
@@ -939,8 +940,8 @@ static const struct tabentry arch_tab[] =
{"KC", ARCH_MC}, /* Synonym for MC */
{"MC", ARCH_MC},
{"CA", ARCH_CA},
+ {"JX", ARCH_JX},
{"HX", ARCH_HX},
- {"XL", ARCH_XL},
{NULL, 0}
};
@@ -975,7 +976,7 @@ md_parse_option (c, arg)
if (tp->flag == NULL)
{
- as_bad ("invalid architecture %s", p);
+ as_bad (_("invalid architecture %s"), p);
return 0;
}
else
@@ -995,16 +996,16 @@ md_show_usage (stream)
FILE *stream;
{
int i;
- fprintf (stream, "I960 options:\n");
+ fprintf (stream, _("I960 options:\n"));
for (i = 0; arch_tab[i].flag; i++)
fprintf (stream, "%s-A%s", i ? " | " : "", arch_tab[i].flag);
- fprintf (stream, "\n\
+ fprintf (stream, _("\n\
specify variant of 960 architecture\n\
-b add code to collect statistics about branches taken\n\
-link-relax preserve individual alignment directives so linker\n\
can do relaxing (b.out format only)\n\
-no-relax don't alter compare-and-branch instructions for\n\
- long displacements\n");
+ long displacements\n"));
}
@@ -1126,7 +1127,7 @@ md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
fragS *frag;
symbolS *to_symbol;
{
- as_fatal ("failed sanity check.");
+ as_fatal (_("failed sanity check."));
}
void
@@ -1136,7 +1137,7 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
fragS *frag;
symbolS *to_symbol;
{
- as_fatal ("failed sanity check.");
+ as_fatal (_("failed sanity check."));
}
#endif
@@ -1205,7 +1206,7 @@ brtab_emit ()
}
subseg_set (data_section, 0); /* .data */
- frag_align (2, 0); /* .align 2 */
+ frag_align (2, 0, 0); /* .align 2 */
record_alignment (now_seg, 2);
colon (BR_TAB_NAME); /* BR_TAB_NAME: */
emit (0); /* .word 0 #link to next table */
@@ -1222,7 +1223,6 @@ brtab_emit ()
0,
0,
NO_RELOC);
- fixP->fx_im_disp = 2; /* 32-bit displacement fix */
}
}
@@ -1423,7 +1423,7 @@ get_args (p, args)
/* Start of operand */
if (n == 3)
{
- as_bad ("too many operands");
+ as_bad (_("too many operands"));
return -1;
}
*to++ = '\0'; /* Terminate argument */
@@ -1483,7 +1483,7 @@ get_cdisp (dispP, ifmtP, instr, numbits, var_frag, callj)
switch (e.X_op)
{
case O_illegal:
- as_bad ("expression syntax error");
+ as_bad (_("expression syntax error"));
case O_symbol:
if (S_GET_SEGMENT (e.X_add_symbol) == now_seg
@@ -1521,11 +1521,11 @@ get_cdisp (dispP, ifmtP, instr, numbits, var_frag, callj)
}
}
else
- as_bad ("attempt to branch into different segment");
+ as_bad (_("attempt to branch into different segment"));
break;
default:
- as_bad ("target of %s instruction must be a label", ifmtP);
+ as_bad (_("target of %s instruction must be a label"), ifmtP);
break;
}
}
@@ -1565,7 +1565,7 @@ get_ispec (textP)
if (end == NULL)
{
- as_bad ("unmatched '['");
+ as_bad (_("unmatched '['"));
}
else
@@ -1576,7 +1576,7 @@ get_ispec (textP)
*end = '\0';
if (*(end + 1) != '\0')
{
- as_bad ("garbage after index spec ignored");
+ as_bad (_("garbage after index spec ignored"));
}
}
}
@@ -1643,7 +1643,7 @@ i_scan (iP, args)
if (args[0] == iP)
{
/* We never moved: there was no opcode either! */
- as_bad ("missing opcode");
+ as_bad (_("missing opcode"));
return -1;
}
return 0;
@@ -1697,6 +1697,10 @@ mem_fmt (args, oP, callx)
}
}
+ /* Parse the displacement; this must be done before emitting the
+ opcode, in case it is an expression using `.'. */
+ parse_expr (instr.e, &expr);
+
/* Output opcode */
outP = emit (instr.opcode);
@@ -1705,12 +1709,11 @@ mem_fmt (args, oP, callx)
return;
}
- /* Parse and process the displacement */
- parse_expr (instr.e, &expr);
+ /* Process the displacement */
switch (expr.X_op)
{
case O_illegal:
- as_bad ("expression syntax error");
+ as_bad (_("expression syntax error"));
break;
case O_constant:
@@ -1761,7 +1764,6 @@ mem_fmt (args, oP, callx)
&expr,
0,
NO_RELOC);
- fixP->fx_im_disp = 2; /* 32-bit displacement fix */
/* Steve's linker relaxing hack. Mark this 32-bit relocation as
being in the instruction stream, specifically as part of a callx
instruction. */
@@ -1949,7 +1951,7 @@ parse_ldconst (arg)
break;
case O_illegal:
- as_bad ("invalid constant");
+ as_bad (_("invalid constant"));
return -1;
break;
}
@@ -2062,7 +2064,7 @@ parse_memop (memP, argP, optype)
regnum = get_regnum (indexP); /* Get index reg. # */
if (!IS_RG_REG (regnum))
{
- as_bad ("invalid index register");
+ as_bad (_("invalid index register"));
return;
}
@@ -2085,7 +2087,7 @@ parse_memop (memP, argP, optype)
scale = 4 << 7;
break;
default:
- as_bad ("invalid scale factor");
+ as_bad (_("invalid scale factor"));
return;
};
@@ -2268,7 +2270,7 @@ parse_regop (regopP, optext, opdesc)
/* global or local register */
if (!REG_ALIGN (opdesc, n))
{
- as_bad ("unaligned register");
+ as_bad (_("unaligned register"));
}
regopP->n = n;
regopP->mode = 0;
@@ -2291,7 +2293,7 @@ parse_regop (regopP, optext, opdesc)
regopP->special = 1;
if (!targ_has_sfr (regopP->n))
{
- as_bad ("no such sfr in this architecture");
+ as_bad (_("no such sfr in this architecture"));
}
return;
}
@@ -2329,7 +2331,7 @@ parse_regop (regopP, optext, opdesc)
if (e.X_op != O_constant
|| (offs (e) < 0) || (offs (e) > 31))
{
- as_bad ("illegal literal");
+ as_bad (_("illegal literal"));
offs (e) = 0;
}
regopP->n = offs (e);
@@ -2562,7 +2564,7 @@ reloc_callj (fixP)
else if (TC_S_IS_CALLNAME (fixP->fx_addsy))
{
/* Should not happen: see block comment above */
- as_fatal ("Trying to 'bal' to %s", S_GET_NAME (fixP->fx_addsy));
+ as_fatal (_("Trying to 'bal' to %s"), S_GET_NAME (fixP->fx_addsy));
}
else if (TC_S_IS_BALNAME (fixP->fx_addsy))
{
@@ -2573,7 +2575,7 @@ reloc_callj (fixP)
}
else if (TC_S_IS_BADPROC (fixP->fx_addsy))
{
- as_bad ("Looks like a proc, but can't tell what kind.\n");
+ as_bad (_("Looks like a proc, but can't tell what kind.\n"));
} /* switch on proc type */
/* else Symbol is neither a sysproc nor a leafproc */
@@ -2605,7 +2607,7 @@ s_leafproc (n_ops, args)
if ((n_ops != 1) && (n_ops != 2))
{
- as_bad ("should have 1 or 2 operands");
+ as_bad (_("should have 1 or 2 operands"));
return;
} /* Check number of arguments */
@@ -2614,7 +2616,7 @@ s_leafproc (n_ops, args)
if (TC_S_IS_CALLNAME (callP))
{
- as_warn ("Redefining leafproc %s", S_GET_NAME (callP));
+ as_warn (_("Redefining leafproc %s"), S_GET_NAME (callP));
} /* is leafproc */
/* If that was the only argument, use it as the 'bal' entry point.
@@ -2633,7 +2635,7 @@ s_leafproc (n_ops, args)
balP = symbol_find_or_make (args[2]);
if (TC_S_IS_CALLNAME (balP))
{
- as_warn ("Redefining leafproc %s", S_GET_NAME (balP));
+ as_warn (_("Redefining leafproc %s"), S_GET_NAME (balP));
}
TC_S_FORCE_TO_BALNAME (balP);
@@ -2663,7 +2665,7 @@ s_sysproc (n_ops, args)
if (n_ops != 2)
{
- as_bad ("should have two operands");
+ as_bad (_("should have two operands"));
return;
} /* bad arg count */
@@ -2673,7 +2675,7 @@ s_sysproc (n_ops, args)
|| (offs (exp) < 0)
|| (offs (exp) > 31))
{
- as_bad ("'entry_num' must be absolute number in [0,31]");
+ as_bad (_("'entry_num' must be absolute number in [0,31]"));
return;
}
@@ -2682,7 +2684,7 @@ s_sysproc (n_ops, args)
if (TC_S_IS_SYSPROC (symP))
{
- as_warn ("Redefining entrynum for sysproc %s", S_GET_NAME (symP));
+ as_warn (_("Redefining entrynum for sysproc %s"), S_GET_NAME (symP));
} /* redefining */
TC_S_SET_SYSPROC (symP, offs (exp)); /* encode entry number */
@@ -2732,7 +2734,7 @@ shift_ok (n)
static void
syntax ()
{
- as_bad ("syntax error");
+ as_bad (_("syntax error"));
} /* syntax() */
@@ -2751,7 +2753,7 @@ targ_has_sfr (n)
case ARCH_KA:
case ARCH_KB:
case ARCH_MC:
- case ARCH_XL:
+ case ARCH_JX:
return 0;
case ARCH_HX:
return ((0 <= n) && (n <= 4));
@@ -2785,15 +2787,15 @@ targ_has_iclass (ic)
return ic & (I_BASE | I_KX | I_FP | I_DEC | I_MIL);
case ARCH_CA:
return ic & (I_BASE | I_CX | I_CX2 | I_CASIM);
+ case ARCH_JX:
+ return ic & (I_BASE | I_CX2 | I_JX);
case ARCH_HX:
- return ic & (I_BASE | I_CX2 | I_HX | I_HX2);
- case ARCH_XL:
- return ic & (I_BASE | I_CX2 | I_HX2); /* XL */
+ return ic & (I_BASE | I_CX2 | I_JX | I_HX);
default:
if ((iclasses_seen & (I_KX | I_FP | I_DEC | I_MIL))
&& (iclasses_seen & (I_CX | I_CX2)))
{
- as_warn ("architecture of opcode conflicts with that of earlier instruction(s)");
+ as_warn (_("architecture of opcode conflicts with that of earlier instruction(s)"));
iclasses_seen &= ~ic;
}
return 1;
@@ -2814,9 +2816,9 @@ s_endian (ignore)
if (strcasecmp (name, "little") == 0)
;
else if (strcasecmp (name, "big") == 0)
- as_bad ("big endian mode is not supported");
+ as_bad (_("big endian mode is not supported"));
else
- as_warn ("ignoring unrecognized .endian type `%s'", name);
+ as_warn (_("ignoring unrecognized .endian type `%s'"), name);
*input_line_pointer = c;
@@ -2851,31 +2853,15 @@ md_apply_fix (fixP, val)
char *place = fixP->fx_where + fixP->fx_frag->fr_literal;
if (!fixP->fx_bit_fixP)
- switch (fixP->fx_im_disp)
- {
- case 0:
- /* For callx, we always want to write out zero, and emit a
- symbolic relocation. */
- if (fixP->fx_bsr)
- val = 0;
-
- fixP->fx_addnumber = val;
- md_number_to_imm (place, val, fixP->fx_size, fixP);
- break;
- case 1:
- md_number_to_disp (place,
- (fixP->fx_pcrel
- ? val + fixP->fx_pcrel_adjust
- : val),
- fixP->fx_size);
- break;
- case 2: /* fix requested for .long .word etc */
- md_number_to_chars (place, val, fixP->fx_size);
- break;
- default:
- as_fatal ("Internal error in md_apply_fix() in file \"%s\"",
- __FILE__);
- }
+ {
+ /* For callx, we always want to write out zero, and emit a
+ symbolic relocation. */
+ if (fixP->fx_bsr)
+ val = 0;
+
+ fixP->fx_addnumber = val;
+ md_number_to_imm (place, val, fixP->fx_size, fixP);
+ }
else
md_number_to_field (place, val, fixP->fx_bit_fixP);
}
@@ -3005,21 +2991,23 @@ tc_headers_hook (headers)
coff_flags |= F_I960CA;
break;
+ case ARCH_JX:
+ coff_flags |= F_I960JX;
+ break;
+
case ARCH_HX:
coff_flags |= F_I960HX;
break;
- case ARCH_XL:
- coff_flags |= F_I960XL;
- break; /* XL */
-
default:
if (iclasses_seen == I_BASE)
coff_flags |= F_I960CORE;
else if (iclasses_seen & I_CX)
coff_flags |= F_I960CA;
- else if (iclasses_seen & (I_HX | I_HX2))
+ else if (iclasses_seen & I_HX)
coff_flags |= F_I960HX;
+ else if (iclasses_seen & I_JX)
+ coff_flags |= F_I960JX;
else if (iclasses_seen & I_CX2)
coff_flags |= F_I960CA;
else if (iclasses_seen & I_MIL)
@@ -3087,7 +3075,7 @@ tc_crawl_symbol_chain (headers)
if (!S_IS_DEFINED (symbolP))
{
- as_bad ("leafproc symbol '%s' undefined", S_GET_NAME (symbolP));
+ as_bad (_("leafproc symbol '%s' undefined"), S_GET_NAME (symbolP));
} /* undefined leaf */
if (TC_S_IS_CALLNAME (symbolP))
@@ -3097,7 +3085,7 @@ tc_crawl_symbol_chain (headers)
{
S_SET_EXTERNAL (symbolP);
S_SET_EXTERNAL (balP);
- as_warn ("Warning: making leafproc entries %s and %s both global\n",
+ as_warn (_("Warning: making leafproc entries %s and %s both global\n"),
S_GET_NAME (symbolP), S_GET_NAME (balP));
} /* externality mismatch */
} /* if callname */
@@ -3127,7 +3115,7 @@ tc_set_bal_of_call (callP, balP)
#ifdef OBJ_COFF
- callP->sy_symbol.ost_auxent[1].x_bal.x_balntry = (int) balP;
+ callP->sy_tc = balP;
S_SET_NUMBER_AUXILIARY (callP, 2);
#else /* ! OBJ_COFF */
@@ -3148,8 +3136,8 @@ tc_set_bal_of_call (callP, balP)
#endif /* ! OBJ_COFF */
}
-char *
-_tc_get_bal_of_call (callP)
+symbolS *
+tc_get_bal_of_call (callP)
symbolS *callP;
{
symbolS *retval;
@@ -3157,7 +3145,7 @@ _tc_get_bal_of_call (callP)
know (TC_S_IS_CALLNAME (callP));
#ifdef OBJ_COFF
- retval = (symbolS *) (callP->sy_symbol.ost_auxent[1].x_bal.x_balntry);
+ retval = callP->sy_tc;
#else
#ifdef OBJ_ABOUT
retval = symbol_next (callP);
@@ -3167,7 +3155,7 @@ _tc_get_bal_of_call (callP)
#endif /* ! OBJ_COFF */
know (TC_S_IS_BALNAME (retval));
- return ((char *) retval);
+ return retval;
} /* _tc_get_bal_of_call() */
void
@@ -3184,7 +3172,10 @@ tc_coff_symbol_emit_hook (symbolP)
S_SET_NUMBER_AUXILIARY (symbolP, 2);
#endif
symbolP->sy_symbol.ost_auxent[1].x_bal.x_balntry = S_GET_VALUE (balP);
- S_SET_STORAGE_CLASS (symbolP, (!SF_GET_LOCAL (symbolP) ? C_LEAFEXT : C_LEAFSTAT));
+ if (S_GET_STORAGE_CLASS (symbolP) == C_EXT)
+ S_SET_STORAGE_CLASS (symbolP, C_LEAFEXT);
+ else
+ S_SET_STORAGE_CLASS (symbolP, C_LEAFSTAT);
S_SET_DATA_TYPE (symbolP, S_GET_DATA_TYPE (symbolP) | (DT_FCN << N_BTSHFT));
/* fix up the bal symbol */
S_SET_STORAGE_CLASS (balP, C_LABEL);
@@ -3201,7 +3192,7 @@ i960_handle_align (fragp)
#ifndef OBJ_BOUT
- as_bad ("option --link-relax is only supported in b.out format");
+ as_bad (_("option --link-relax is only supported in b.out format"));
linkrelax = 0;
return;
@@ -3233,7 +3224,7 @@ i960_validate_fix (fixP, this_segment_type, add_symbolPP)
if (!TC_S_IS_BALNAME (tc_get_bal_of_call (add_symbolP)))
{
- as_bad ("No 'bal' entry point for leafproc %s",
+ as_bad (_("No 'bal' entry point for leafproc %s"),
S_GET_NAME (add_symbolP));
return 1;
}
@@ -3244,7 +3235,7 @@ i960_validate_fix (fixP, this_segment_type, add_symbolPP)
{
if (fixP->fx_tcbit)
{
- as_bad ("callj to difference of two symbols");
+ as_bad (_("callj to difference of two symbols"));
return 1;
}
reloc_callj (fixP);
@@ -3253,7 +3244,7 @@ i960_validate_fix (fixP, this_segment_type, add_symbolPP)
/* This is a COBR instruction. They have only a 13-bit
displacement and are only to be used for local branches:
flag as error, don't generate relocation. */
- as_bad ("can't use COBR format with external label");
+ as_bad (_("can't use COBR format with external label"));
fixP->fx_addsy = NULL; /* No relocations please. */
return 1;
}
diff --git a/gas/config/tc-m32r.c b/gas/config/tc-m32r.c
index b47d9e4..bdbd198 100644
--- a/gas/config/tc-m32r.c
+++ b/gas/config/tc-m32r.c
@@ -68,6 +68,11 @@ static int enable_m32rx = 0;
/* Non-zero if the programmer should be warned when an explicit parallel
instruction might have constraint violations. */
static int warn_explicit_parallel_conflicts = 1;
+
+/* start-sanitize-phase2-m32rx */
+/* Non-zero if insns can be made parallel. */
+static int optimize;
+/* end-sanitize-phase2-m32rx */
/* end-sanitize-m32rx */
/* stuff for .scomm symbols. */
@@ -118,7 +123,12 @@ allow_m32rx (on)
}
/* end-sanitize-m32rx */
-const char * md_shortopts = "";
+#define M32R_SHORTOPTS ""
+/* start-sanitize-phase2-m32rx */
+#undef M32R_SHORTOPTS
+#define M32R_SHORTOPTS "O"
+/* end-sanitize-phase2-m32rx */
+const char * md_shortopts = M32R_SHORTOPTS;
struct option md_longopts[] =
{
@@ -152,6 +162,12 @@ md_parse_option (c, arg)
switch (c)
{
/* start-sanitize-m32rx */
+/* start-sanitize-phase2-m32rx */
+ case 'O':
+ optimize = 1;
+ break;
+/* end-sanitize-phase2-m32rx */
+
case OPTION_M32RX:
allow_m32rx (1);
break;
@@ -183,26 +199,31 @@ void
md_show_usage (stream)
FILE * stream;
{
- fprintf (stream, "M32R/X options:\n");
/* start-sanitize-m32rx */
- fprintf (stream, "\
---m32rx support the extended m32rx instruction set\n");
-
- fprintf (stream, "\
---warn-explicit-parallel-conflicts Warn when parallel instrucitons violate contraints\n");
- fprintf (stream, "\
---no-warn-explicit-parallel-conflicts Do not warn when parallel instrucitons violate contraints\n");
- fprintf (stream, "\
---Wp Synonym for --warn-explicit-parallel-conflicts\n");
- fprintf (stream, "\
---Wnp Synonym for --no-warn-explicit-parallel-conflicts\n");
+ fprintf (stream, _("M32R/X options:\n"));
+ fprintf (stream, _("\
+--m32rx support the extended m32rx instruction set\n"));
+
+/* start-sanitize-phase2-m32rx */
+ fprintf (stream, _("\
+-O try to combine instructions in parallel\n"));
+/* end-sanitize-phase2-m32rx */
+
+ fprintf (stream, _("\
+--warn-explicit-parallel-conflicts warn when parallel instrucitons violate contraints\n"));
+ fprintf (stream, _("\
+--no-warn-explicit-parallel-conflicts do not warn when parallel instrucitons violate contraints\n"));
+ fprintf (stream, _("\
+--Wp synonym for --warn-explicit-parallel-conflicts\n"));
+ fprintf (stream, _("\
+--Wnp synonym for --no-warn-explicit-parallel-conflicts\n"));
/* end-sanitize-m32rx */
#if 0
- fprintf (stream, "\
---relax create linker relaxable code\n");
- fprintf (stream, "\
---cpu-desc provide runtime cpu description file\n");
+ fprintf (stream, _("\
+--relax create linker relaxable code\n"));
+ fprintf (stream, _("\
+--cpu-desc provide runtime cpu description file\n"));
#endif
}
@@ -312,14 +333,11 @@ int
m32r_fill_insn (done)
int done;
{
- segT seg;
- subsegT subseg;
-
if (prev_seg != NULL)
{
- seg = now_seg;
- subseg = now_subseg;
-
+ segT seg = now_seg;
+ subsegT subseg = now_subseg;
+
subseg_set (prev_seg, prev_subseg);
fill_insn (0);
@@ -403,6 +421,7 @@ md_begin ()
/* 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
checked, otherwise its inputs are examined. */
+
static int
first_writes_to_seconds_operands (a, b, check_outputs)
m32r_insn * a;
@@ -471,6 +490,7 @@ first_writes_to_seconds_operands (a, b, check_outputs)
}
/* Returns true if the insn can (potentially) alter the program counter. */
+
static int
writes_to_pc (a)
m32r_insn * a;
@@ -499,6 +519,7 @@ writes_to_pc (a)
/* Returns NULL if the two 16 bit insns can be executed in parallel,
otherwise it returns a pointer to an error message explaining why not. */
+
static const char *
can_make_parallel (a, b)
m32r_insn * a;
@@ -595,14 +616,14 @@ assemble_parallel_insn (str, str2)
/* Check to see if this is an allowable parallel insn. */
if (CGEN_INSN_ATTR (first.insn, CGEN_INSN_PIPE) == PIPE_NONE)
{
- as_bad ("instruction '%s' cannot be executed in parallel.", str);
+ as_bad (_("instruction '%s' cannot be executed in parallel."), str);
return;
}
if (! enable_m32rx
&& CGEN_INSN_ATTR (first.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
{
- as_bad ("instruction '%s' is for the M32RX only", str);
+ as_bad (_("instruction '%s' is for the M32RX only"), str);
return;
}
@@ -658,7 +679,7 @@ assemble_parallel_insn (str, str2)
first.insn = m32r_cgen_get_insn_operands (first.insn, bfd_getb16 ((char *) first.buffer), 16,
first.indices);
if (first.insn == NULL)
- as_fatal ("internal error: m32r_cgen_get_insn_operands failed for first insn");
+ as_fatal (_("internal error: m32r_cgen_get_insn_operands failed for first insn"));
/* Parse the second instruction. */
if (! (second.insn = CGEN_SYM (assemble_insn)
@@ -672,7 +693,7 @@ assemble_parallel_insn (str, str2)
if (! enable_m32rx
&& CGEN_INSN_ATTR (second.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
{
- as_bad ("instruction '%s' is for the M32RX only", str);
+ as_bad (_("instruction '%s' is for the M32RX only"), str);
return;
}
@@ -681,7 +702,7 @@ assemble_parallel_insn (str, str2)
if ( strcmp (first.insn->name, "nop") != 0
&& strcmp (second.insn->name, "nop") != 0)
{
- as_bad ("'%s': only the NOP instruction can be issued in parallel on the m32r", str2);
+ as_bad (_("'%s': only the NOP instruction can be issued in parallel on the m32r"), str2);
return;
}
}
@@ -716,7 +737,7 @@ assemble_parallel_insn (str, str2)
second.insn = m32r_cgen_get_insn_operands (second.insn, bfd_getb16 ((char *) second.buffer), 16,
second.indices);
if (second.insn == NULL)
- as_fatal ("internal error: m32r_cgen_get_insn_operands failed for second insn");
+ as_fatal (_("internal error: m32r_cgen_get_insn_operands failed for second insn"));
/* We assume that if the first instruction writes to a register that is
read by the second instruction it is because the programmer intended
@@ -729,10 +750,10 @@ assemble_parallel_insn (str, str2)
if (warn_explicit_parallel_conflicts)
{
if (first_writes_to_seconds_operands (& first, & second, false))
- as_warn ("%s: output of 1st instruction is the same as an input to 2nd instruction - is this intentional ?", str2);
+ as_warn (_("%s: output of 1st instruction is the same as an input to 2nd instruction - is this intentional ?"), str2);
if (first_writes_to_seconds_operands (& second, & first, false))
- as_warn ("%s: output of 2nd instruction is the same as an input to 1st instruction - is this intentional ?", str2);
+ as_warn (_("%s: output of 2nd instruction is the same as an input to 1st instruction - is this intentional ?"), str2);
}
if ((errmsg = (char *) can_make_parallel (& first, & second)) == NULL)
@@ -817,7 +838,7 @@ md_assemble (str)
/* start-sanitize-m32rx */
if (! enable_m32rx && CGEN_INSN_ATTR (insn.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
{
- as_bad ("instruction '%s' is for the M32RX only", str);
+ as_bad (_("instruction '%s' is for the M32RX only"), str);
return;
}
/* end-sanitize-m32rx */
@@ -852,7 +873,7 @@ md_assemble (str)
16,
insn.indices);
if (insn.insn == NULL)
- as_fatal ("internal error: m32r_cgen_get_insn_operands failed");
+ as_fatal (_("internal error: m32r_cgen_get_insn_operands failed"));
/* Keep track of whether we've seen a pair of 16 bit insns.
prev_insn.insn is NULL when we're on a 32 bit boundary. */
@@ -870,8 +891,9 @@ md_assemble (str)
input to the current instruction then it cannot be combined.
Otherwise call can_make_parallel() with both orderings of the
instructions to see if they can be combined. */
- if ( enable_m32rx
- && CGEN_INSN_ATTR (insn.insn, CGEN_INSN_RELAXABLE) == 0
+ if ( enable_m32rx
+ && optimize
+ && CGEN_INSN_ATTR (insn.insn, CGEN_INSN_RELAXABLE) == 0
&& ! writes_to_pc (& prev_insn)
&& ! first_writes_to_seconds_operands (& prev_insn, &insn, false)
)
@@ -999,7 +1021,7 @@ m32r_scomm (ignore)
SKIP_WHITESPACE ();
if (* input_line_pointer != ',')
{
- as_bad ("Expected comma after symbol-name: rest of line ignored.");
+ as_bad (_("Expected comma after symbol-name: rest of line ignored."));
ignore_rest_of_line ();
return;
}
@@ -1007,7 +1029,7 @@ m32r_scomm (ignore)
input_line_pointer ++; /* skip ',' */
if ((size = get_absolute_expression ()) < 0)
{
- as_warn (".SCOMMon length (%ld.) <0! Ignored.", (long) size);
+ as_warn (_(".SCOMMon length (%ld.) <0! Ignored."), (long) size);
ignore_rest_of_line ();
return;
}
@@ -1021,7 +1043,7 @@ m32r_scomm (ignore)
align = get_absolute_expression ();
if (align <= 0)
{
- as_warn ("ignoring bad alignment");
+ as_warn (_("ignoring bad alignment"));
align = 8;
}
}
@@ -1032,7 +1054,7 @@ m32r_scomm (ignore)
continue;
if (align != 1)
{
- as_bad ("Common alignment not a power of 2");
+ as_bad (_("Common alignment not a power of 2"));
ignore_rest_of_line ();
return;
}
@@ -1046,7 +1068,7 @@ m32r_scomm (ignore)
if (S_IS_DEFINED (symbolP))
{
- as_bad ("Ignoring attempt to re-define symbol `%s'.",
+ as_bad (_("Ignoring attempt to re-define symbol `%s'."),
S_GET_NAME (symbolP));
ignore_rest_of_line ();
return;
@@ -1054,7 +1076,7 @@ m32r_scomm (ignore)
if (S_GET_VALUE (symbolP) && S_GET_VALUE (symbolP) != (valueT) size)
{
- as_bad ("Length of .scomm \"%s\" is already %ld. Not changed to %ld.",
+ as_bad (_("Length of .scomm \"%s\" is already %ld. Not changed to %ld."),
S_GET_NAME (symbolP),
(long) S_GET_VALUE (symbolP),
(long) size);
@@ -1299,7 +1321,7 @@ md_convert_frag (abfd, sec, fragP)
{
/* symbol must be resolved by linker */
if (fragP->fr_offset & 3)
- as_warn ("Addend to unresolved symbol not on word boundary.");
+ as_warn (_("Addend to unresolved symbol not on word boundary."));
addend = fragP->fr_offset >> 2;
}
else
@@ -1521,7 +1543,7 @@ m32r_frob_file ()
if (pass == 1)
as_warn_where (l->fixp->fx_file, l->fixp->fx_line,
- "Unmatched high/shigh reloc");
+ _("Unmatched high/shigh reloc"));
}
}
}
@@ -1596,7 +1618,7 @@ md_atof (type, litP, sizeP)
default:
* sizeP = 0;
- return "Bad call to md_atof()";
+ return _("Bad call to md_atof()");
}
t = atof_ieee (input_line_pointer, type, words);
@@ -1625,3 +1647,14 @@ md_atof (type, litP, sizeP)
return 0;
}
+
+void
+m32r_elf_section_change_hook ()
+{
+ /* If we have reached the end of a section and we have just emitted a
+ 16 bit insn, then emit a nop to make sure that the section ends on
+ a 32 bit boundary. */
+
+ if (prev_insn.insn || seen_relaxable_p)
+ (void) m32r_fill_insn (0);
+}
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index b24c487..496d29e 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -1,5 +1,5 @@
/* tc-m68k.c -- Assemble for the m68k family
- Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -267,7 +267,7 @@ static struct m68k_it the_ins; /* the instruction being assembled */
/* Static functions. */
-static void insop PARAMS ((int, struct m68k_incant *));
+static void insop PARAMS ((int, const struct m68k_incant *));
static void add_fix PARAMS ((int, struct m68k_exp *, int, int));
static void add_frag PARAMS ((symbolS *, offsetT, int));
@@ -275,7 +275,7 @@ static void add_frag PARAMS ((symbolS *, offsetT, int));
static void
insop (w, opcode)
int w;
- struct m68k_incant *opcode;
+ const struct m68k_incant *opcode;
{
int z;
for(z=the_ins.numo;z>opcode->m_codenum;--z)
@@ -633,7 +633,7 @@ make_pcrel_absolute(fixP, add_number)
opcode[1] = 0xb9;
}
else
- as_fatal ("Unknown PC relative instruction");
+ as_fatal (_("Unknown PC relative instruction"));
*add_number -= 4;
return 0;
}
@@ -756,9 +756,21 @@ get_reloc_code (size, pcrel, pic)
}
}
- as_bad ("Can not do %d byte %s%srelocation", size,
- pcrel ? "pc-relative " : "",
- pic == pic_none ? "" : "pic ");
+ if (pcrel)
+ {
+ if (pic == pic_none)
+ as_bad (_("Can not do %d byte pc-relative relocation"), size);
+ else
+ as_bad (_("Can not do %d byte pc-relative pic relocation"), size);
+ }
+ else
+ {
+ if (pic == pic_none)
+ as_bad (_("Can not do %d byte relocation"), size);
+ else
+ as_bad (_("Can not do %d byte pic relocation"), size);
+ }
+
return BFD_RELOC_NONE;
}
@@ -855,7 +867,7 @@ tc_gen_reloc (section, fixp)
break;
default:
as_bad_where (fixp->fx_file, fixp->fx_line,
- "Cannot make %s relocation PC relative",
+ _("Cannot make %s relocation PC relative"),
bfd_get_reloc_code_name (code));
}
}
@@ -918,7 +930,7 @@ m68k_ip (instring)
{
register char *p;
register struct m68k_op *opP;
- register struct m68k_incant *opcode;
+ register const struct m68k_incant *opcode;
register const char *s;
register int tmpreg = 0, baseo = 0, outro = 0, nextword;
char *pdot, *pdotmove;
@@ -946,7 +958,7 @@ m68k_ip (instring)
if (p == instring)
{
- the_ins.error = "No operator";
+ the_ins.error = _("No operator");
return;
}
@@ -963,7 +975,7 @@ m68k_ip (instring)
c = *p;
*p = '\0';
- opcode = (struct m68k_incant *) hash_find (op_hash, instring);
+ opcode = (const struct m68k_incant *) hash_find (op_hash, instring);
*p = c;
if (pdot != NULL)
@@ -976,7 +988,7 @@ m68k_ip (instring)
if (opcode == NULL)
{
- the_ins.error = "Unknown operator";
+ the_ins.error = _("Unknown operator");
return;
}
@@ -1517,14 +1529,6 @@ m68k_ip (instring)
opP->mode = REGLST;
}
}
- else if (opP->mode == ABSL
- && opP->disp.size == SIZE_UNSPEC
- && opP->disp.exp.X_op == O_constant)
- {
- /* This is what the MRI REG pseudo-op generates. */
- opP->mode = REGLST;
- opP->mask = opP->disp.exp.X_add_number;
- }
else if (opP->mode != REGLST)
losing++;
else if (s[1] == '8' && (opP->mask & 0x0ffffff) != 0)
@@ -1731,24 +1735,24 @@ m68k_ip (instring)
char buf[200], *cp;
strcpy (buf,
- "invalid instruction for this architecture; needs ");
+ _("invalid instruction for this architecture; needs "));
cp = buf + strlen (buf);
switch (ok_arch)
{
case mfloat:
- strcpy (cp, "fpu (68040, 68060 or 68881/68882)");
+ strcpy (cp, _("fpu (68040, 68060 or 68881/68882)"));
break;
case mmmu:
- strcpy (cp, "mmu (68030 or 68851)");
+ strcpy (cp, _("mmu (68030 or 68851)"));
break;
case m68020up:
- strcpy (cp, "68020 or higher");
+ strcpy (cp, _("68020 or higher"));
break;
case m68000up:
- strcpy (cp, "68000 or higher");
+ strcpy (cp, _("68000 or higher"));
break;
case m68010up:
- strcpy (cp, "68010 or higher");
+ strcpy (cp, _("68010 or higher"));
break;
default:
{
@@ -1776,7 +1780,7 @@ m68k_ip (instring)
the_ins.error = cp;
}
else
- the_ins.error = "operands mismatch";
+ the_ins.error = _("operands mismatch");
return;
} /* Fell off the end */
@@ -1833,19 +1837,19 @@ m68k_ip (instring)
{
case 'b':
if (!isbyte (nextword))
- opP->error = "operand out of range";
+ opP->error = _("operand out of range");
addword (nextword);
baseo = 0;
break;
case 'w':
if (!isword (nextword))
- opP->error = "operand out of range";
+ opP->error = _("operand out of range");
addword (nextword);
baseo = 0;
break;
case 'W':
if (!issword (nextword))
- opP->error = "operand out of range";
+ opP->error = _("operand out of range");
addword (nextword);
baseo = 0;
break;
@@ -1902,7 +1906,7 @@ m68k_ip (instring)
{
if (offs (&opP->disp) > baseo)
{
- as_warn ("Bignum too big for %c format; truncated",
+ as_warn (_("Bignum too big for %c format; truncated"),
s[1]);
offs (&opP->disp) = baseo;
}
@@ -1963,12 +1967,14 @@ m68k_ip (instring)
|| (isvar (&opP->disp)
&& ((opP->disp.size == SIZE_UNSPEC
&& flag_short_refs == 0
- && cpu_of_arch (current_architecture) >= m68020)
+ && cpu_of_arch (current_architecture) >= m68020
+ && cpu_of_arch (current_architecture) != mcf5200)
|| opP->disp.size == SIZE_LONG)))
{
- if (cpu_of_arch (current_architecture) < m68020)
+ if (cpu_of_arch (current_architecture) < m68020
+ || cpu_of_arch (current_architecture) == mcf5200)
opP->error =
- "displacement too large for this architecture; needs 68020 or higher";
+ _("displacement too large for this architecture; needs 68020 or higher");
if (opP->reg == PC)
tmpreg = 0x3B; /* 7.3 */
else
@@ -2078,7 +2084,7 @@ m68k_ip (instring)
&& current_architecture == mcf5200))
{
opP->error =
- "scale factor invalid on this architecture; needs cpu32 or 68020 or higher";
+ _("scale factor invalid on this architecture; needs cpu32 or 68020 or higher");
}
switch (opP->index.scale)
@@ -2112,6 +2118,7 @@ m68k_ip (instring)
{
if (siz1 == SIZE_BYTE
|| cpu_of_arch (current_architecture) < m68020
+ || cpu_of_arch (current_architecture) == mcf5200
|| (siz1 == SIZE_UNSPEC
&& ! isvar (&opP->disp)
&& issbyte (baseo)))
@@ -2131,9 +2138,9 @@ m68k_ip (instring)
else if (siz1 != SIZE_BYTE)
{
if (siz1 != SIZE_UNSPEC)
- as_warn ("Forcing byte displacement");
+ as_warn (_("Forcing byte displacement"));
if (! issbyte (baseo))
- opP->error = "byte displacement out of range";
+ opP->error = _("byte displacement out of range");
}
break;
@@ -2177,9 +2184,10 @@ m68k_ip (instring)
/* It isn't simple. */
- if (cpu_of_arch (current_architecture) < m68020)
+ if (cpu_of_arch (current_architecture) < m68020
+ || cpu_of_arch (current_architecture) == mcf5200)
opP->error =
- "invalid operand mode for this architecture; needs 68020 or higher";
+ _("invalid operand mode for this architecture; needs 68020 or higher");
nextword |= 0x100;
/* If the guy specified a width, we assume that it is
@@ -2203,7 +2211,7 @@ m68k_ip (instring)
}
break;
case SIZE_BYTE:
- as_warn (":b not permitted; defaulting to :w");
+ as_warn (_(":b not permitted; defaulting to :w"));
/* Fall through. */
case SIZE_WORD:
nextword |= 0x20;
@@ -2217,7 +2225,7 @@ m68k_ip (instring)
if (opP->mode == POST || opP->mode == PRE)
{
if (cpu_of_arch (current_architecture) & cpu32)
- opP->error = "invalid operand mode for this architecture; needs 68020 or higher";
+ opP->error = _("invalid operand mode for this architecture; needs 68020 or higher");
switch (siz2)
{
case SIZE_UNSPEC:
@@ -2237,7 +2245,7 @@ m68k_ip (instring)
}
break;
case 1:
- as_warn (":b not permitted; defaulting to :w");
+ as_warn (_(":b not permitted; defaulting to :w"));
/* Fall through. */
case 2:
nextword |= 0x2;
@@ -2318,7 +2326,7 @@ m68k_ip (instring)
break;
case SIZE_BYTE:
- as_bad ("unsupported byte value; use a different suffix");
+ as_bad (_("unsupported byte value; use a different suffix"));
/* Fall through. */
case SIZE_WORD: /* Word */
if (isvar (&opP->disp))
@@ -2332,7 +2340,7 @@ m68k_ip (instring)
case CONTROL:
case FPREG:
default:
- as_bad ("unknown/incorrect operand");
+ as_bad (_("unknown/incorrect operand"));
/* abort(); */
}
install_gen_operand (s[1], tmpreg);
@@ -2365,7 +2373,7 @@ m68k_ip (instring)
certain types of overflow.
user beware! */
if (!isbyte (tmpreg))
- opP->error = "out of range";
+ opP->error = _("out of range");
insop (tmpreg, opcode);
if (isvar (&opP->disp))
the_ins.reloc[the_ins.nrel - 1].n =
@@ -2373,21 +2381,21 @@ m68k_ip (instring)
break;
case 'B':
if (!issbyte (tmpreg))
- opP->error = "out of range";
- opcode->m_opcode |= tmpreg;
+ opP->error = _("out of range");
+ the_ins.opcode[the_ins.numo - 1] |= tmpreg & 0xff;
if (isvar (&opP->disp))
the_ins.reloc[the_ins.nrel - 1].n = opcode->m_codenum * 2 - 1;
break;
case 'w':
if (!isword (tmpreg))
- opP->error = "out of range";
+ opP->error = _("out of range");
insop (tmpreg, opcode);
if (isvar (&opP->disp))
the_ins.reloc[the_ins.nrel - 1].n = (opcode->m_codenum) * 2;
break;
case 'W':
if (!issword (tmpreg))
- opP->error = "out of range";
+ opP->error = _("out of range");
insop (tmpreg, opcode);
if (isvar (&opP->disp))
the_ins.reloc[the_ins.nrel - 1].n = (opcode->m_codenum) * 2;
@@ -2437,7 +2445,7 @@ m68k_ip (instring)
case 'L':
long_branch:
if (!HAVE_LONG_BRANCH(current_architecture))
- as_warn ("Can't use long branches on 68000/68010/5200");
+ as_warn (_("Can't use long branches on 68000/68010/5200"));
the_ins.opcode[the_ins.numo - 1] |= 0xff;
add_fix ('l', &opP->disp, 1, 0);
addword (0);
@@ -2525,7 +2533,7 @@ m68k_ip (instring)
tmpreg = get_num (&opP->disp, 80);
if (!issword (tmpreg))
{
- as_warn ("Expression out of range, using 0");
+ as_warn (_("Expression out of range, using 0"));
tmpreg = 0;
}
addword (tmpreg);
@@ -2630,13 +2638,13 @@ m68k_ip (instring)
if (s[1] == 'w')
{
if (tmpreg & 0x7FF0000)
- as_bad ("Floating point register in register list");
+ as_bad (_("Floating point register in register list"));
insop (reverse_16_bits (tmpreg), opcode);
}
else
{
if (tmpreg & 0x700FFFF)
- as_bad ("Wrong register in floating-point reglist");
+ as_bad (_("Wrong register in floating-point reglist"));
install_operand (s[1], reverse_8_bits (tmpreg >> 16));
}
break;
@@ -2646,19 +2654,19 @@ m68k_ip (instring)
if (s[1] == 'w')
{
if (tmpreg & 0x7FF0000)
- as_bad ("Floating point register in register list");
+ as_bad (_("Floating point register in register list"));
insop (tmpreg, opcode);
}
else if (s[1] == '8')
{
if (tmpreg & 0x0FFFFFF)
- as_bad ("incorrect register in reglist");
+ as_bad (_("incorrect register in reglist"));
install_operand (s[1], tmpreg >> 24);
}
else
{
if (tmpreg & 0x700FFFF)
- as_bad ("wrong register in floating-point reglist");
+ as_bad (_("wrong register in floating-point reglist"));
else
install_operand (s[1], tmpreg >> 16);
}
@@ -2734,7 +2742,7 @@ m68k_ip (instring)
tmpreg = 3;
break;
default:
- as_fatal ("failed sanity check");
+ as_fatal (_("failed sanity check"));
} /* switch on cache token */
install_operand (s[1], tmpreg);
break;
@@ -2860,6 +2868,8 @@ m68k_ip (instring)
install_operand (s[1], tmpreg);
break;
case '_': /* used only for move16 absolute 32-bit address */
+ if (isvar (&opP->disp))
+ add_fix ('l', &opP->disp, 0, 0);
tmpreg = get_num (&opP->disp, 80);
addword (tmpreg >> 16);
addword (tmpreg & 0xFFFF);
@@ -3005,7 +3015,7 @@ install_operand (mode, val)
break;
case 'c':
default:
- as_fatal ("failed sanity check.");
+ as_fatal (_("failed sanity check."));
}
} /* install_operand() */
@@ -3034,7 +3044,7 @@ install_gen_operand (mode, val)
break;
/* more stuff goes here */
default:
- as_fatal ("failed sanity check.");
+ as_fatal (_("failed sanity check."));
}
} /* install_gen_operand() */
@@ -3068,7 +3078,7 @@ crack_operand (str, opP)
{
if (!parens)
{ /* ERROR */
- opP->error = "Extra )";
+ opP->error = _("Extra )");
return str;
}
--parens;
@@ -3079,7 +3089,7 @@ crack_operand (str, opP)
}
if (!*str && parens)
{ /* ERROR */
- opP->error = "Missing )";
+ opP->error = _("Missing )");
return str;
}
c = *str;
@@ -3096,8 +3106,17 @@ crack_operand (str, opP)
{
c = *++str;
if (!c)
- as_bad ("Missing operand");
+ as_bad (_("Missing operand"));
+ }
+
+ /* Detect MRI REG symbols and convert them to REGLSTs. */
+ if (opP->mode == CONTROL && (int)opP->reg < 0)
+ {
+ opP->mode = REGLST;
+ opP->mask = ~(int)opP->reg;
+ opP->reg = 0;
}
+
return str;
}
@@ -3378,7 +3397,7 @@ md_assemble (str)
}
if (er)
{
- as_bad ("%s -- statement `%s' ignored", er, str);
+ as_bad (_("%s -- statement `%s' ignored"), er, str);
return;
}
@@ -3422,7 +3441,7 @@ md_assemble (str)
n = 4;
break;
default:
- as_fatal ("Don't know how to figure width of %c in md_assemble()",
+ as_fatal (_("Don't know how to figure width of %c in md_assemble()"),
the_ins.reloc[m].wid);
}
@@ -3581,7 +3600,7 @@ md_begin ()
retval = hash_insert (op_hash, ins->name, (char *) hack);
if (retval)
- as_fatal ("Internal Error: Can't hash %s: %s", ins->name, retval);
+ as_fatal (_("Internal Error: Can't hash %s: %s"), ins->name, retval);
}
for (i = 0; i < m68k_numaliases; i++)
@@ -3590,10 +3609,10 @@ md_begin ()
const char *alias = m68k_opcode_aliases[i].alias;
PTR val = hash_find (op_hash, name);
if (!val)
- as_fatal ("Internal Error: Can't find %s in hash table", name);
+ as_fatal (_("Internal Error: Can't find %s in hash table"), name);
retval = hash_insert (op_hash, alias, val);
if (retval)
- as_fatal ("Internal Error: Can't hash %s: %s", alias, retval);
+ as_fatal (_("Internal Error: Can't hash %s: %s"), alias, retval);
}
/* In MRI mode, all unsized branches are variable sized. Normally,
@@ -3626,10 +3645,10 @@ md_begin ()
const char *alias = mri_aliases[i].alias;
PTR val = hash_find (op_hash, name);
if (!val)
- as_fatal ("Internal Error: Can't find %s in hash table", name);
+ as_fatal (_("Internal Error: Can't find %s in hash table"), name);
retval = hash_jam (op_hash, alias, val);
if (retval)
- as_fatal ("Internal Error: Can't hash %s: %s", alias, retval);
+ as_fatal (_("Internal Error: Can't hash %s: %s"), alias, retval);
}
}
@@ -3755,7 +3774,7 @@ m68k_init_after_args ()
break;
if (i == n_archs)
{
- as_bad ("unrecognized default cpu `%s' ???", TARGET_CPU);
+ as_bad (_("unrecognized default cpu `%s' ???"), TARGET_CPU);
current_architecture |= m68020;
}
else
@@ -3767,7 +3786,7 @@ m68k_init_after_args ()
{
if (current_architecture & m68040)
{
- as_warn ("68040 and 68851 specified; mmu instructions may assemble incorrectly");
+ as_warn (_("68040 and 68851 specified; mmu instructions may assemble incorrectly"));
}
}
/* What other incompatibilities could we check for? */
@@ -3787,9 +3806,9 @@ m68k_init_after_args ()
current_architecture |= m68851;
}
if (no_68881 && (current_architecture & m68881))
- as_bad ("options for 68881 and no-68881 both given");
+ as_bad (_("options for 68881 and no-68881 both given"));
if (no_68851 && (current_architecture & m68851))
- as_bad ("options for 68851 and no-68851 both given");
+ as_bad (_("options for 68851 and no-68851 both given"));
#ifdef OBJ_AOUT
/* Work out the magic number. This isn't very general. */
@@ -3806,7 +3825,8 @@ m68k_init_after_args ()
/* Note which set of "movec" control registers is available. */
select_control_regs ();
- if (cpu_of_arch (current_architecture) < m68020)
+ if (cpu_of_arch (current_architecture) < m68020
+ || cpu_of_arch (current_architecture) == mcf5200)
md_relax_table[TAB (PCINDEX, BYTE)].rlx_more = 0;
}
@@ -3843,7 +3863,13 @@ void
m68k_frob_symbol (sym)
symbolS *sym;
{
- if ((S_GET_VALUE (sym) & 1) != 0)
+ if (S_GET_SEGMENT (sym) == reg_section
+ && (int) S_GET_VALUE (sym) < 0)
+ {
+ S_SET_SEGMENT (sym, absolute_section);
+ S_SET_VALUE (sym, ~(int)S_GET_VALUE (sym));
+ }
+ else if ((S_GET_VALUE (sym) & 1) != 0)
{
struct label_line *l;
@@ -3853,7 +3879,7 @@ m68k_frob_symbol (sym)
{
if (l->text)
as_warn_where (l->file, l->line,
- "text label `%s' aligned to odd boundary",
+ _("text label `%s' aligned to odd boundary"),
S_GET_NAME (sym));
break;
}
@@ -3947,7 +3973,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "Bad call to MD_ATOF()";
+ return _("Bad call to MD_ATOF()");
}
t = atof_ieee (input_line_pointer, type, words);
if (t)
@@ -4043,7 +4069,7 @@ md_apply_fix_2 (fixP, val)
if ((addressT) val > upper_limit
&& (val > 0 || val < lower_limit))
- as_bad_where (fixP->fx_file, fixP->fx_line, "value out of range");
+ as_bad_where (fixP->fx_file, fixP->fx_line, _("value out of range"));
/* A one byte PC-relative reloc means a short branch. We can't use
a short branch with a value of 0 or -1, because those indicate
@@ -4059,7 +4085,7 @@ md_apply_fix_2 (fixP, val)
&& (fixP->fx_addsy == NULL
|| S_IS_DEFINED (fixP->fx_addsy))
&& (val == 0 || val == -1))
- as_bad_where (fixP->fx_file, fixP->fx_line, "invalid byte branch offset");
+ as_bad_where (fixP->fx_file, fixP->fx_line, _("invalid byte branch offset"));
}
#ifdef BFD_ASSEMBLER
@@ -4116,7 +4142,7 @@ md_convert_frag_1 (fragP)
case TAB (ABRANCH, BYTE):
know (issbyte (disp));
if (disp == 0)
- as_bad ("short branch with zero offset: use :w");
+ as_bad (_("short branch with zero offset: use :w"));
fragP->fr_opcode[1] = disp;
ext = 0;
break;
@@ -4162,7 +4188,7 @@ md_convert_frag_1 (fragP)
}
else
{
- as_bad ("Long branch offset not supported.");
+ as_bad (_("Long branch offset not supported."));
}
}
else
@@ -4223,7 +4249,7 @@ md_convert_frag_1 (fragP)
fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset,
0, NO_RELOC);
if ((fragP->fr_opcode[1] & 0x3F) != 0x3A)
- as_bad ("Internal error (long PC-relative operand) for insn 0x%04x at 0x%lx",
+ as_bad (_("Internal error (long PC-relative operand) for insn 0x%04x at 0x%lx"),
(unsigned) fragP->fr_opcode[0],
(unsigned long) fragP->fr_address);
fragP->fr_opcode[1] &= ~0x3F;
@@ -4254,7 +4280,7 @@ md_convert_frag_1 (fragP)
disp += 2;
if (!issbyte (disp))
{
- as_bad ("displacement doesn't fit in one byte");
+ as_bad (_("displacement doesn't fit in one byte"));
disp = 0;
}
assert (fragP->fr_fix >= 2);
@@ -4366,7 +4392,7 @@ md_estimate_size_before_relax (fragP, segment)
}
else
{
- as_warn ("Long branch offset to extern symbol not supported.");
+ as_warn (_("Long branch offset to extern symbol not supported."));
}
}
else
@@ -4404,7 +4430,8 @@ md_estimate_size_before_relax (fragP, segment)
{
if (S_GET_SEGMENT (fragP->fr_symbol) == segment
|| flag_short_refs
- || cpu_of_arch (current_architecture) < m68020)
+ || cpu_of_arch (current_architecture) < m68020
+ || cpu_of_arch (current_architecture) == mcf5200)
{
fragP->fr_subtype = TAB (PCREL, SHORT);
fragP->fr_var += 2;
@@ -4500,7 +4527,8 @@ md_estimate_size_before_relax (fragP, segment)
{
if ((S_GET_SEGMENT (fragP->fr_symbol)) == segment
|| flag_short_refs
- || cpu_of_arch (current_architecture) < m68020)
+ || cpu_of_arch (current_architecture) < m68020
+ || cpu_of_arch (current_architecture) == mcf5200)
{
fragP->fr_subtype = TAB (PCLEA, SHORT);
fragP->fr_var += 2;
@@ -4515,7 +4543,8 @@ md_estimate_size_before_relax (fragP, segment)
case TAB (PCINDEX, SZ_UNDEF):
if (S_GET_SEGMENT (fragP->fr_symbol) == segment
- || cpu_of_arch (current_architecture) < m68020)
+ || cpu_of_arch (current_architecture) < m68020
+ || cpu_of_arch (current_architecture) == mcf5200)
{
fragP->fr_subtype = TAB (PCINDEX, BYTE);
}
@@ -4704,7 +4733,7 @@ get_num (exp, ok)
offs (exp) = 0;
if (ok == 10)
{
- as_warn ("expression out of range: defaulting to 1");
+ as_warn (_("expression out of range: defaulting to 1"));
offs (exp) = 1;
}
}
@@ -4715,7 +4744,7 @@ get_num (exp, ok)
case 10:
if (offs (exp) < 1 || offs (exp) > 8)
{
- as_warn ("expression out of range: defaulting to 1");
+ as_warn (_("expression out of range: defaulting to 1"));
offs (exp) = 1;
}
break;
@@ -4747,7 +4776,7 @@ get_num (exp, ok)
if (offs (exp) < 0 || offs (exp) > 4095)
{
outrange:
- as_warn ("expression out of range: defaulting to 0");
+ as_warn (_("expression out of range: defaulting to 0"));
offs (exp) = 0;
}
break;
@@ -4780,7 +4809,7 @@ get_num (exp, ok)
adds (exp) = 0;
subs (exp) = 0;
offs (exp) = (ok == 10) ? 1 : 0;
- as_warn ("Can't deal with expression; defaulting to %ld",
+ as_warn (_("Can't deal with expression; defaulting to %ld"),
offs (exp));
}
}
@@ -4792,7 +4821,7 @@ get_num (exp, ok)
adds (exp) = 0;
subs (exp) = 0;
offs (exp) = (ok == 10) ? 1 : 0;
- as_warn ("Can't deal with expression; defaulting to %ld",
+ as_warn (_("Can't deal with expression; defaulting to %ld"),
offs (exp));
}
}
@@ -4806,11 +4835,11 @@ get_num (exp, ok)
break;
case SIZE_BYTE:
if (!isbyte (offs (exp)))
- as_warn ("expression doesn't fit in BYTE");
+ as_warn (_("expression doesn't fit in BYTE"));
break;
case SIZE_WORD:
if (!isword (offs (exp)))
- as_warn ("expression doesn't fit in WORD");
+ as_warn (_("expression doesn't fit in WORD"));
break;
}
}
@@ -4903,7 +4932,7 @@ mri_chip ()
break;
if (i >= n_archs)
{
- as_bad ("%s: unrecognized processor name", s);
+ as_bad (_("%s: unrecognized processor name"), s);
*input_line_pointer = c;
ignore_rest_of_line ();
return;
@@ -4968,13 +4997,13 @@ s_fopt (ignore)
input_line_pointer += 3;
temp = get_absolute_expression ();
if (temp < 0 || temp > 7)
- as_bad ("bad coprocessor id");
+ as_bad (_("bad coprocessor id"));
else
m68k_float_copnum = COP0 + temp;
}
else
{
- as_bad ("unrecognized fopt option");
+ as_bad (_("unrecognized fopt option"));
ignore_rest_of_line ();
return;
}
@@ -5108,7 +5137,7 @@ s_opt (ignore)
else if (o->pvar != NULL)
{
if (! t && o->arg == o->notarg)
- as_bad ("option `%s' may not be negated", s);
+ as_bad (_("option `%s' may not be negated"), s);
*input_line_pointer = c;
*o->pvar = t ? o->arg : o->notarg;
}
@@ -5119,7 +5148,7 @@ s_opt (ignore)
}
if (i >= OPTCOUNT)
{
- as_bad ("option `%s' not recognized", s);
+ as_bad (_("option `%s' not recognized"), s);
*input_line_pointer = c;
}
}
@@ -5152,7 +5181,7 @@ opt_nest (arg, on)
{
if (*input_line_pointer != '=')
{
- as_bad ("bad format of OPT NEST=depth");
+ as_bad (_("bad format of OPT NEST=depth"));
return;
}
@@ -5209,13 +5238,13 @@ s_reg (ignore)
char *s;
int c;
struct m68k_op rop;
- unsigned long mask;
+ int mask;
char *stop = NULL;
char stopc;
if (line_label == NULL)
{
- as_bad ("missing label");
+ as_bad (_("missing label"));
ignore_rest_of_line ();
return;
}
@@ -5239,9 +5268,9 @@ s_reg (ignore)
if (m68k_ip_op (s, &rop) != 0)
{
if (rop.error == NULL)
- as_bad ("bad register list");
+ as_bad (_("bad register list"));
else
- as_bad ("bad register list: %s", rop.error);
+ as_bad (_("bad register list: %s"), rop.error);
*input_line_pointer = c;
ignore_rest_of_line ();
return;
@@ -5268,13 +5297,13 @@ s_reg (ignore)
mask = 1 << 26;
else
{
- as_bad ("bad register list");
+ as_bad (_("bad register list"));
ignore_rest_of_line ();
return;
}
- S_SET_SEGMENT (line_label, absolute_section);
- S_SET_VALUE (line_label, mask);
+ S_SET_SEGMENT (line_label, reg_section);
+ S_SET_VALUE (line_label, ~mask);
line_label->sy_frag = &zero_address_frag;
if (flag_mri)
@@ -5339,7 +5368,7 @@ s_restore (ignore)
if (save_stack == NULL)
{
- as_bad ("restore without save");
+ as_bad (_("restore without save"));
ignore_rest_of_line ();
return;
}
@@ -5497,7 +5526,7 @@ parse_mri_condition (pcc)
if (*input_line_pointer != '>')
{
- as_bad ("syntax error in structured control directive");
+ as_bad (_("syntax error in structured control directive"));
return 0;
}
@@ -5548,7 +5577,7 @@ parse_mri_control_operand (pcc, leftstart, leftstop, rightstart, rightstop)
}
if (*s == '\0')
{
- as_bad ("missing condition code in structured control directive");
+ as_bad (_("missing condition code in structured control directive"));
return 0;
}
@@ -5846,7 +5875,7 @@ parse_mri_control_expression (stop, qual, truelab, falselab, extent)
*stop = c;
if (input_line_pointer != stop)
- as_bad ("syntax error in structured control directive");
+ as_bad (_("syntax error in structured control directive"));
}
/* Handle the MRI IF pseudo-op. This may be a structured control
@@ -5880,7 +5909,7 @@ s_mri_if (qual)
{
if (qual != '\0')
{
- as_bad ("missing then");
+ as_bad (_("missing then"));
ignore_rest_of_line ();
return;
}
@@ -5962,7 +5991,7 @@ s_mri_else (qual)
|| mri_control_stack->type != mri_if
|| mri_control_stack->else_seen)
{
- as_bad ("else without matching if");
+ as_bad (_("else without matching if"));
ignore_rest_of_line ();
return;
}
@@ -5996,7 +6025,7 @@ s_mri_endi (ignore)
if (mri_control_stack == NULL
|| mri_control_stack->type != mri_if)
{
- as_bad ("endi without matching if");
+ as_bad (_("endi without matching if"));
ignore_rest_of_line ();
return;
}
@@ -6037,7 +6066,7 @@ s_mri_break (extent)
n = n->outer;
if (n == NULL)
{
- as_bad ("break outside of structured loop");
+ as_bad (_("break outside of structured loop"));
ignore_rest_of_line ();
return;
}
@@ -6076,7 +6105,7 @@ s_mri_next (extent)
n = n->outer;
if (n == NULL)
{
- as_bad ("next outside of structured loop");
+ as_bad (_("next outside of structured loop"));
ignore_rest_of_line ();
return;
}
@@ -6128,7 +6157,7 @@ s_mri_for (qual)
++input_line_pointer;
if (*input_line_pointer != '=')
{
- as_bad ("missing =");
+ as_bad (_("missing ="));
ignore_rest_of_line ();
return;
}
@@ -6166,7 +6195,7 @@ s_mri_for (qual)
}
if (initstop == NULL)
{
- as_bad ("missing to or downto");
+ as_bad (_("missing to or downto"));
ignore_rest_of_line ();
return;
}
@@ -6202,7 +6231,7 @@ s_mri_for (qual)
}
if (endstop == NULL)
{
- as_bad ("missing do");
+ as_bad (_("missing do"));
ignore_rest_of_line ();
return;
}
@@ -6236,7 +6265,7 @@ s_mri_for (qual)
}
if (bystop == NULL)
{
- as_bad ("missing do");
+ as_bad (_("missing do"));
ignore_rest_of_line ();
return;
}
@@ -6339,7 +6368,7 @@ s_mri_endf (ignore)
if (mri_control_stack == NULL
|| mri_control_stack->type != mri_for)
{
- as_bad ("endf without for");
+ as_bad (_("endf without for"));
ignore_rest_of_line ();
return;
}
@@ -6395,7 +6424,7 @@ s_mri_until (qual)
if (mri_control_stack == NULL
|| mri_control_stack->type != mri_repeat)
{
- as_bad ("until without repeat");
+ as_bad (_("until without repeat"));
ignore_rest_of_line ();
return;
}
@@ -6446,7 +6475,7 @@ s_mri_while (qual)
if (s - input_line_pointer < 2
|| strncasecmp (s - 1, "DO", 2) != 0)
{
- as_bad ("missing do");
+ as_bad (_("missing do"));
ignore_rest_of_line ();
return;
}
@@ -6482,7 +6511,7 @@ s_mri_endw (ignore)
if (mri_control_stack == NULL
|| mri_control_stack->type != mri_while)
{
- as_bad ("endw without while");
+ as_bad (_("endw without while"));
ignore_rest_of_line ();
return;
}
@@ -6598,7 +6627,7 @@ md_parse_option (c, arg)
if (i == n_archs)
{
unknown:
- as_bad ("unrecognized option `%s'", oarg);
+ as_bad (_("unrecognized option `%s'"), oarg);
return 0;
}
arch = archs[i].arch;
@@ -6643,7 +6672,7 @@ md_parse_option (c, arg)
}
if (i == n_archs)
{
- as_bad ("unrecognized architecture specification `%s'", arg);
+ as_bad (_("unrecognized architecture specification `%s'"), arg);
return 0;
}
}
@@ -6713,7 +6742,7 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf(stream, "\
+ fprintf(stream, _("\
680X0 options:\n\
-l use 1 word for refs to undefined symbols [default 2]\n\
-m68000 | -m68008 | -m68010 | -m68020 | -m68030 | -m68040 | -m68060\n\
@@ -6722,8 +6751,8 @@ md_show_usage (stream)
specify variant of 680X0 architecture [default 68020]\n\
-m68881 | -m68882 | -mno-68881 | -mno-68882\n\
target has/lacks floating-point coprocessor\n\
- [default yes for 68020, 68030, and cpu32]\n");
- fprintf(stream, "\
+ [default yes for 68020, 68030, and cpu32]\n"));
+ fprintf(stream, _("\
-m68851 | -mno-68851\n\
target has/lacks memory-management unit coprocessor\n\
[default yes for 68020 and up]\n\
@@ -6731,12 +6760,12 @@ md_show_usage (stream)
-S turn jbsr into jsr\n\
--register-prefix-optional\n\
recognize register names without prefix character\n\
---bitwise-or do not treat `|' as a comment character\n");
- fprintf (stream, "\
+--bitwise-or do not treat `|' as a comment character\n"));
+ fprintf (stream, _("\
--base-size-default-16 base reg without size is 16 bits\n\
--base-size-default-32 base reg without size is 32 bits (default)\n\
--disp-size-default-16 displacement with unknown size is 16 bits\n\
---disp-size-default-32 displacement with unknown size is 32 bits (default)\n");
+--disp-size-default-32 displacement with unknown size is 32 bits (default)\n"));
}
#ifdef TEST2
@@ -6767,11 +6796,11 @@ main ()
m68k_ip (&the_ins, buf);
if (the_ins.error)
{
- printf ("Error %s in %s\n", the_ins.error, buf);
+ printf (_("Error %s in %s\n"), the_ins.error, buf);
}
else
{
- printf ("Opcode(%d.%s): ", the_ins.numo, the_ins.args);
+ printf (_("Opcode(%d.%s): "), the_ins.numo, the_ins.args);
for (n = 0; n < the_ins.numo; n++)
printf (" 0x%x", the_ins.opcode[n] & 0xffff);
printf (" ");
diff --git a/gas/config/tc-m88k.c b/gas/config/tc-m88k.c
index d9b87dc..931a496a 100644
--- a/gas/config/tc-m88k.c
+++ b/gas/config/tc-m88k.c
@@ -8,7 +8,7 @@ This file is part of GAS, the GNU Assembler.
GAS 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 1, or (at your option)
+the Free Software Foundation; either version 2, or (at your option)
any later version.
GAS is distributed in the hope that it will be useful,
@@ -203,7 +203,7 @@ md_begin ()
retval = hash_insert (op_hash, name, &m88k_opcodes[i]);
if (retval != NULL)
- as_fatal ("Can't hash instruction '%s':%s",
+ as_fatal (_("Can't hash instruction '%s':%s"),
m88k_opcodes[i].name, retval);
/* skip to next unique mnemonic or end of list */
@@ -255,7 +255,7 @@ md_assemble (op)
if ((format = (struct m88k_opcode *) hash_find (op_hash, op)) == NULL)
{
- as_bad ("Invalid mnemonic '%s'", op);
+ as_bad (_("Invalid mnemonic '%s'"), op);
return;
}
@@ -275,7 +275,7 @@ md_assemble (op)
format++;
else
{
- as_fatal ("Parameter syntax error");
+ as_fatal (_("Parameter syntax error"));
return;
}
}
@@ -330,7 +330,7 @@ md_assemble (op)
break;
default:
- as_fatal ("Unknown relocation type");
+ as_fatal (_("Unknown relocation type"));
break;
}
}
@@ -443,7 +443,7 @@ calcop (format, param, insn)
case '?':
/* Having this here repeats the warning somtimes.
But can't we stand that? */
- as_warn ("Use of obsolete instruction");
+ as_warn (_("Use of obsolete instruction"));
break;
}
}
@@ -560,7 +560,7 @@ get_imm16 (param, insn)
{
/* Warn about too big expressions if not surrounded by xx16. */
if (val > 0xffff)
- as_warn ("Expression truncated to 16 bits");
+ as_warn (_("Expression truncated to 16 bits"));
}
if (reloc == RELOC_HI16)
@@ -626,7 +626,7 @@ get_cmp (param, valp)
if (val >= 32)
{
- as_warn ("Expression truncated to 5 bits");
+ as_warn (_("Expression truncated to 5 bits"));
val %= 32;
}
}
@@ -648,7 +648,7 @@ get_cnd (param, valp)
if (val >= 32)
{
- as_warn ("Expression truncated to 5 bits");
+ as_warn (_("Expression truncated to 5 bits"));
val %= 32;
}
}
@@ -870,7 +870,7 @@ get_vec9 (param, valp)
input_line_pointer = save_ptr;
if (val >= 1 << 9)
- as_warn ("Expression truncated to 9 bits");
+ as_warn (_("Expression truncated to 9 bits"));
*valp = val % (1 << 9);
@@ -892,7 +892,7 @@ get_o6 (param, valp)
input_line_pointer = save_ptr;
if (val & 0x3)
- as_warn ("Removed lower 2 bits of expression");
+ as_warn (_("Removed lower 2 bits of expression"));
*valp = val;
@@ -1031,7 +1031,7 @@ md_number_to_imm (buf, val, nbytes, fixP, seg_type)
break;
default:
- as_fatal ("Bad relocation type");
+ as_fatal (_("Bad relocation type"));
break;
}
}
@@ -1044,7 +1044,7 @@ md_number_to_disp (buf, val, nbytes)
int val;
int nbytes;
{
- as_fatal ("md_number_to_disp not defined");
+ as_fatal (_("md_number_to_disp not defined"));
md_number_to_chars (buf, val, nbytes);
}
@@ -1054,7 +1054,7 @@ md_number_to_field (buf, val, nbytes)
int val;
int nbytes;
{
- as_fatal ("md_number_to_field not defined");
+ as_fatal (_("md_number_to_field not defined"));
md_number_to_chars (buf, val, nbytes);
}
@@ -1103,7 +1103,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "Bad call to MD_ATOF()";
+ return _("Bad call to MD_ATOF()");
}
t = atof_ieee (input_line_pointer, type, words);
if (t)
@@ -1167,7 +1167,7 @@ md_estimate_size_before_relax (fragP, segment_type)
fragS *fragP;
segT segment_type;
{
- as_fatal ("Relaxation should never occur");
+ as_fatal (_("Relaxation should never occur"));
return (-1);
}
@@ -1257,14 +1257,14 @@ s_bss ()
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_warn ("Expected comma after name");
+ as_warn (_("Expected comma after name"));
ignore_rest_of_line ();
return;
}
input_line_pointer++;
if ((temp = get_absolute_expression ()) < 0)
{
- as_warn ("BSS length (%d.) <0! Ignored.", temp);
+ as_warn (_("BSS length (%d.) <0! Ignored."), temp);
ignore_rest_of_line ();
return;
}
@@ -1308,7 +1308,7 @@ s_bss ()
}
else
{
- as_warn ("Ignoring attempt to re-define symbol %s.", name);
+ as_warn (_("Ignoring attempt to re-define symbol %s."), name);
}
while (!is_end_of_line[*input_line_pointer])
diff --git a/gas/config/tc-m88k.h b/gas/config/tc-m88k.h
index c51da81..426b697 100644
--- a/gas/config/tc-m88k.h
+++ b/gas/config/tc-m88k.h
@@ -8,7 +8,7 @@ This file is part of GAS, the GNU Assembler.
GAS 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 1, or (at your option)
+the Free Software Foundation; either version 2, or (at your option)
any later version.
GAS is distributed in the hope that it will be useful,
@@ -75,7 +75,7 @@ struct reloc_info_m88k
/* Don't warn on word overflow; it happens on %hi relocs. */
#undef WARN_SIGNED_OVERFLOW_WORD
-#define md_convert_frag(b,s,f) {as_fatal ("m88k convert_frag\n");}
+#define md_convert_frag(b,s,f) {as_fatal (_("m88k convert_frag\n"));}
/* We don't need to do anything special for undefined symbols. */
#define md_undefined_symbol(s) 0
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index d96e062..92baf33 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -602,9 +602,9 @@ static const int mips16_to_32_reg_map[] =
#ifdef __STDC__
#define internalError() \
- as_fatal ("internal Error, line %d, %s", __LINE__, __FILE__)
+ as_fatal (_("internal Error, line %d, %s"), __LINE__, __FILE__)
#else
-#define internalError() as_fatal ("MIPS internal Error");
+#define internalError() as_fatal (_("MIPS internal Error"));
#endif
enum mips_regclass { MIPS_GR_REG, MIPS_FP_REG, MIPS16_REG };
@@ -1028,7 +1028,7 @@ md_begin ()
}
if (mips_opts.isa < 2 && mips_trap)
- as_bad ("trap exception not supported at ISA 1");
+ as_bad (_("trap exception not supported at ISA 1"));
if (mips_cpu != 0 && mips_cpu != -1)
{
@@ -1054,7 +1054,7 @@ md_begin ()
}
if (! ok)
- as_warn ("Could not set architecture and machine");
+ as_warn (_("Could not set architecture and machine"));
file_mips_isa = mips_opts.isa;
@@ -1067,10 +1067,10 @@ md_begin ()
retval = hash_insert (op_hash, name, (PTR) &mips_opcodes[i]);
if (retval != NULL)
{
- fprintf (stderr, "internal error: can't hash `%s': %s\n",
+ fprintf (stderr, _("internal error: can't hash `%s': %s\n"),
mips_opcodes[i].name, retval);
/* Probably a memory allocation problem? Give up now. */
- as_fatal ("Broken assembler. No assembly attempted.");
+ as_fatal (_("Broken assembler. No assembly attempted."));
}
do
{
@@ -1093,7 +1093,7 @@ md_begin ()
retval = hash_insert (mips16_op_hash, name, (PTR) &mips16_opcodes[i]);
if (retval != NULL)
- as_fatal ("internal: can't hash `%s': %s",
+ as_fatal (_("internal: can't hash `%s': %s"),
mips16_opcodes[i].name, retval);
do
{
@@ -1101,7 +1101,7 @@ md_begin ()
&& ((mips16_opcodes[i].match & mips16_opcodes[i].mask)
!= mips16_opcodes[i].match))
{
- fprintf (stderr, "internal error: bad mips16 opcode: %s %s\n",
+ fprintf (stderr, _("internal error: bad mips16 opcode: %s %s\n"),
mips16_opcodes[i].name, mips16_opcodes[i].args);
broken = 1;
}
@@ -1112,7 +1112,7 @@ md_begin ()
}
if (broken)
- as_fatal ("Broken assembler. No assembly attempted.");
+ as_fatal (_("Broken assembler. No assembly attempted."));
/* We add all the general register names to the symbol table. This
helps us detect invalid uses of them. */
@@ -1263,7 +1263,7 @@ md_assemble (str)
else
{
mips_ip (str, &insn);
- DBG(("returned from mips_ip(%s) insn_opcode = 0x%x\n",
+ DBG((_("returned from mips_ip(%s) insn_opcode = 0x%x\n"),
str, insn.insn_opcode));
}
@@ -1757,7 +1757,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
if (mips_opts.mips16
&& mips_opts.noreorder
&& (prev_pinfo & INSN_UNCOND_BRANCH_DELAY) != 0)
- as_warn ("extended instruction in delay slot");
+ as_warn (_("extended instruction in delay slot"));
f = frag_more (4);
}
@@ -1779,14 +1779,14 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
case BFD_RELOC_MIPS_JMP:
if ((address_expr->X_add_number & 3) != 0)
- as_bad ("jump to misaligned address (0x%lx)",
+ as_bad (_("jump to misaligned address (0x%lx)"),
(unsigned long) address_expr->X_add_number);
ip->insn_opcode |= (address_expr->X_add_number >> 2) & 0x3ffffff;
break;
case BFD_RELOC_MIPS16_JMP:
if ((address_expr->X_add_number & 3) != 0)
- as_bad ("jump to misaligned address (0x%lx)",
+ as_bad (_("jump to misaligned address (0x%lx)"),
(unsigned long) address_expr->X_add_number);
ip->insn_opcode |=
(((address_expr->X_add_number & 0x7c0000) << 3)
@@ -2438,7 +2438,7 @@ macro_build (place, counter, ep, name, fmt, va_alist)
* to generate a better warning message here...
*/
if (mips_opts.warn_about_macros && place == NULL && *counter == 1)
- as_warn ("Macro instruction expanded into multiple instructions");
+ as_warn (_("Macro instruction expanded into multiple instructions"));
if (place == NULL)
*counter += 1; /* bump instruction counter */
@@ -2814,7 +2814,7 @@ macro_build_lui (place, counter, ep, regnum)
* to generate a better warning message here...
*/
if (mips_opts.warn_about_macros && place == NULL && *counter == 1)
- as_warn ("Macro instruction expanded into multiple instructions");
+ as_warn (_("Macro instruction expanded into multiple instructions"));
if (place == NULL)
*counter += 1; /* bump instruction counter */
@@ -2867,9 +2867,9 @@ check_absolute_expr (ip, ex)
expressionS *ex;
{
if (ex->X_op == O_big)
- as_bad ("unsupported large constant");
+ as_bad (_("unsupported large constant"));
else if (ex->X_op != O_constant)
- as_bad ("Instruction %s requires absolute expression", ip->insn_mo->name);
+ as_bad (_("Instruction %s requires absolute expression"), ip->insn_mo->name);
}
/* Count the leading zeroes by performing a binary chop. This is a
@@ -3015,7 +3015,7 @@ load_register (counter, reg, ep, dbl)
if (mips_opts.isa < 3)
{
- as_bad ("Number larger than 32 bits");
+ as_bad (_("Number larger than 32 bits"));
macro_build ((char *) NULL, counter, ep, "addiu", "t,r,j", reg, 0,
(int) BFD_RELOC_LO16);
return;
@@ -3036,7 +3036,7 @@ load_register (counter, reg, ep, dbl)
if (ep->X_add_number == 3)
generic_bignum[3] = 0;
else if (ep->X_add_number > 4)
- as_bad ("Number larger than 64 bits");
+ as_bad (_("Number larger than 64 bits"));
lo32.X_op = O_constant;
lo32.X_add_number = generic_bignum[0] + (generic_bignum[1] << 16);
hi32.X_op = O_constant;
@@ -3228,7 +3228,7 @@ load_address (counter, reg, ep)
if (ep->X_op != O_constant
&& ep->X_op != O_symbol)
{
- as_bad ("expression too complex");
+ as_bad (_("expression too complex"));
ep->X_op = O_constant;
}
@@ -3302,7 +3302,7 @@ load_address (counter, reg, ep)
if (ex.X_add_number != 0)
{
if (ex.X_add_number < -0x8000 || ex.X_add_number >= 0x8000)
- as_bad ("PIC code offset overflow (max 16 signed bits)");
+ as_bad (_("PIC code offset overflow (max 16 signed bits)"));
ex.X_op = O_constant;
macro_build ((char *) NULL, counter, &ex,
((bfd_arch_bits_per_address (stdoutput) == 32
@@ -3374,7 +3374,7 @@ load_address (counter, reg, ep)
if (ex.X_add_number != 0)
{
if (ex.X_add_number < -0x8000 || ex.X_add_number >= 0x8000)
- as_bad ("PIC code offset overflow (max 16 signed bits)");
+ as_bad (_("PIC code offset overflow (max 16 signed bits)"));
ex.X_op = O_constant;
macro_build ((char *) NULL, counter, &ex,
((bfd_arch_bits_per_address (stdoutput) == 32
@@ -3612,19 +3612,19 @@ macro (ip)
/* result is always false */
if (! likely)
{
- as_warn ("Branch %s is always false (nop)", ip->insn_mo->name);
+ as_warn (_("Branch %s is always false (nop)"), ip->insn_mo->name);
macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0);
}
else
{
- as_warn ("Branch likely %s is always false", ip->insn_mo->name);
+ as_warn (_("Branch likely %s is always false"), ip->insn_mo->name);
macro_build ((char *) NULL, &icnt, &offset_expr, "bnel",
"s,t,p", 0, 0);
}
return;
}
if (imm_expr.X_op != O_constant)
- as_bad ("Unsupported large constant");
+ as_bad (_("Unsupported large constant"));
imm_expr.X_add_number++;
/* FALLTHROUGH */
case M_BGE_I:
@@ -3660,7 +3660,7 @@ macro (ip)
{
do_true:
/* result is always true */
- as_warn ("Branch %s is always true", ip->insn_mo->name);
+ as_warn (_("Branch %s is always true"), ip->insn_mo->name);
macro_build ((char *) NULL, &icnt, &offset_expr, "b", "p");
return;
}
@@ -3698,7 +3698,7 @@ macro (ip)
&& imm_expr.X_add_number == 0xffffffff))
goto do_false;
if (imm_expr.X_op != O_constant)
- as_bad ("Unsupported large constant");
+ as_bad (_("Unsupported large constant"));
imm_expr.X_add_number++;
/* FALLTHROUGH */
case M_BGEU_I:
@@ -3801,7 +3801,7 @@ macro (ip)
&& (mips_opts.isa < 3 || sizeof (maxnum) > 4))
goto do_true;
if (imm_expr.X_op != O_constant)
- as_bad ("Unsupported large constant");
+ as_bad (_("Unsupported large constant"));
imm_expr.X_add_number++;
/* FALLTHROUGH */
case M_BLT_I:
@@ -3856,7 +3856,7 @@ macro (ip)
&& imm_expr.X_add_number == 0xffffffff))
goto do_true;
if (imm_expr.X_op != O_constant)
- as_bad ("Unsupported large constant");
+ as_bad (_("Unsupported large constant"));
imm_expr.X_add_number++;
/* FALLTHROUGH */
case M_BLTU_I:
@@ -3932,7 +3932,7 @@ macro (ip)
do_div3:
if (treg == 0)
{
- as_warn ("Divide by zero.");
+ as_warn (_("Divide by zero."));
if (mips_trap)
macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", 0, 0);
else
@@ -4030,7 +4030,7 @@ macro (ip)
do_divi:
if (imm_expr.X_op == O_constant && imm_expr.X_add_number == 0)
{
- as_warn ("Divide by zero.");
+ as_warn (_("Divide by zero."));
if (mips_trap)
macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", 0, 0);
else
@@ -4143,7 +4143,7 @@ macro (ip)
if (offset_expr.X_op != O_symbol
&& offset_expr.X_op != O_constant)
{
- as_bad ("expression too complex");
+ as_bad (_("expression too complex"));
offset_expr.X_op = O_constant;
}
@@ -4607,12 +4607,12 @@ macro (ip)
else if (mips_pic == SVR4_PIC)
{
if (sreg != PIC_CALL_REG)
- as_warn ("MIPS PIC call to register other than $25");
+ as_warn (_("MIPS PIC call to register other than $25"));
macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "jalr",
"d,s", dreg, sreg);
if (mips_cprestore_offset < 0)
- as_warn ("No .cprestore pseudo-op used in PIC code");
+ as_warn (_("No .cprestore pseudo-op used in PIC code"));
else
{
expr1.X_add_number = mips_cprestore_offset;
@@ -4724,7 +4724,7 @@ macro (ip)
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
"jalr", "s", PIC_CALL_REG);
if (mips_cprestore_offset < 0)
- as_warn ("No .cprestore pseudo-op used in PIC code");
+ as_warn (_("No .cprestore pseudo-op used in PIC code"));
else
{
if (mips_opts.noreorder)
@@ -4797,7 +4797,7 @@ macro (ip)
case M_LDC1_AB:
if (mips_4650)
{
- as_bad ("opcode not supported on this processor");
+ as_bad (_("opcode not supported on this processor"));
return;
}
s = "ldc1";
@@ -4886,7 +4886,7 @@ macro (ip)
case M_SDC1_AB:
if (mips_4650)
{
- as_bad ("opcode not supported on this processor");
+ as_bad (_("opcode not supported on this processor"));
return;
}
s = "sdc1";
@@ -4928,7 +4928,7 @@ macro (ip)
if (offset_expr.X_op != O_constant
&& offset_expr.X_op != O_symbol)
{
- as_bad ("expression too complex");
+ as_bad (_("expression too complex"));
offset_expr.X_op = O_constant;
}
@@ -5036,7 +5036,7 @@ macro (ip)
offset_expr.X_add_number = 0;
if (expr1.X_add_number < -0x8000
|| expr1.X_add_number >= 0x8000)
- as_bad ("PIC code offset overflow (max 16 signed bits)");
+ as_bad (_("PIC code offset overflow (max 16 signed bits)"));
frag_grow (20);
macro_build ((char *) NULL, &icnt, &offset_expr,
((bfd_arch_bits_per_address (stdoutput) == 32
@@ -5087,7 +5087,7 @@ macro (ip)
offset_expr.X_add_number = 0;
if (expr1.X_add_number < -0x8000
|| expr1.X_add_number >= 0x8000)
- as_bad ("PIC code offset overflow (max 16 signed bits)");
+ as_bad (_("PIC code offset overflow (max 16 signed bits)"));
if (reg_needs_delay (GP))
gpdel = 4;
else
@@ -5374,7 +5374,7 @@ macro (ip)
case M_L_DOB:
if (mips_4650)
{
- as_bad ("opcode not supported on this processor");
+ as_bad (_("opcode not supported on this processor"));
return;
}
/* Even on a big endian machine $fn comes before $fn+1. We have
@@ -5415,7 +5415,7 @@ macro (ip)
*/
if (mips_4650)
{
- as_bad ("opcode not supported on this processor");
+ as_bad (_("opcode not supported on this processor"));
return;
}
/* Itbl support may require additional care here. */
@@ -5433,7 +5433,7 @@ macro (ip)
case M_S_DAB:
if (mips_4650)
{
- as_bad ("opcode not supported on this processor");
+ as_bad (_("opcode not supported on this processor"));
return;
}
@@ -5474,7 +5474,7 @@ macro (ip)
if (offset_expr.X_op != O_symbol
&& offset_expr.X_op != O_constant)
{
- as_bad ("expression too complex");
+ as_bad (_("expression too complex"));
offset_expr.X_op = O_constant;
}
@@ -5623,7 +5623,7 @@ macro (ip)
offset_expr.X_add_number = 0;
if (expr1.X_add_number < -0x8000
|| expr1.X_add_number >= 0x8000 - 4)
- as_bad ("PIC code offset overflow (max 16 signed bits)");
+ as_bad (_("PIC code offset overflow (max 16 signed bits)"));
if (breg == 0)
off = 0;
else
@@ -5686,7 +5686,7 @@ macro (ip)
offset_expr.X_add_number = 0;
if (expr1.X_add_number < -0x8000
|| expr1.X_add_number >= 0x8000 - 4)
- as_bad ("PIC code offset overflow (max 16 signed bits)");
+ as_bad (_("PIC code offset overflow (max 16 signed bits)"));
if (reg_needs_delay (GP))
gpdel = 4;
else
@@ -5892,7 +5892,7 @@ macro (ip)
return;
}
if (mips_opts.noat)
- as_warn ("Macro used $at after \".set noat\"");
+ as_warn (_("Macro used $at after \".set noat\""));
}
static void
@@ -6013,7 +6013,7 @@ macro2 (ip)
case M_ROL_I:
if (imm_expr.X_op != O_constant)
- as_bad ("rotate count too large");
+ as_bad (_("rotate count too large"));
macro_build ((char *) NULL, &icnt, NULL, "sll", "d,w,<", AT, sreg,
(int) (imm_expr.X_add_number & 0x1f));
macro_build ((char *) NULL, &icnt, NULL, "srl", "d,w,<", dreg, sreg,
@@ -6031,7 +6031,7 @@ macro2 (ip)
case M_ROR_I:
if (imm_expr.X_op != O_constant)
- as_bad ("rotate count too large");
+ as_bad (_("rotate count too large"));
macro_build ((char *) NULL, &icnt, NULL, "srl", "d,w,<", AT, sreg,
(int) (imm_expr.X_add_number & 0x1f));
macro_build ((char *) NULL, &icnt, NULL, "sll", "d,w,<", dreg, sreg,
@@ -6042,7 +6042,7 @@ macro2 (ip)
case M_S_DOB:
if (mips_4650)
{
- as_bad ("opcode not supported on this processor");
+ as_bad (_("opcode not supported on this processor"));
return;
}
assert (mips_opts.isa < 2);
@@ -6082,7 +6082,7 @@ macro2 (ip)
}
if (sreg == 0)
{
- as_warn ("Instruction %s: result is always false",
+ as_warn (_("Instruction %s: result is always false"),
ip->insn_mo->name);
macro_build ((char *) NULL, &icnt, NULL, "move", "d,s", dreg, 0);
return;
@@ -6251,7 +6251,7 @@ macro2 (ip)
}
if (sreg == 0)
{
- as_warn ("Instruction %s: result is always true",
+ as_warn (_("Instruction %s: result is always true"),
ip->insn_mo->name);
macro_build ((char *) NULL, &icnt, &expr1,
((bfd_arch_bits_per_address (stdoutput) == 32
@@ -6390,7 +6390,7 @@ macro2 (ip)
s = "lbu";
ulh:
if (offset_expr.X_add_number >= 0x7fff)
- as_bad ("operand overflow");
+ as_bad (_("operand overflow"));
/* avoid load delay */
if (! target_big_endian)
offset_expr.X_add_number += 1;
@@ -6417,7 +6417,7 @@ macro2 (ip)
off = 3;
ulw:
if (offset_expr.X_add_number >= 0x8000 - off)
- as_bad ("operand overflow");
+ as_bad (_("operand overflow"));
if (! target_big_endian)
offset_expr.X_add_number += off;
macro_build ((char *) NULL, &icnt, &offset_expr, s, "t,o(b)", treg,
@@ -6489,7 +6489,7 @@ macro2 (ip)
case M_USH:
if (offset_expr.X_add_number >= 0x7fff)
- as_bad ("operand overflow");
+ as_bad (_("operand overflow"));
if (target_big_endian)
offset_expr.X_add_number += 1;
macro_build ((char *) NULL, &icnt, &offset_expr, "sb", "t,o(b)", treg,
@@ -6514,7 +6514,7 @@ macro2 (ip)
off = 3;
usw:
if (offset_expr.X_add_number >= 0x8000 - off)
- as_bad ("operand overflow");
+ as_bad (_("operand overflow"));
if (! target_big_endian)
offset_expr.X_add_number += off;
macro_build ((char *) NULL, &icnt, &offset_expr, s, "t,o(b)", treg,
@@ -6593,11 +6593,11 @@ macro2 (ip)
default:
/* FIXME: Check if this is one of the itbl macros, since they
are added dynamically. */
- as_bad ("Macro %s not implemented yet", ip->insn_mo->name);
+ as_bad (_("Macro %s not implemented yet"), ip->insn_mo->name);
break;
}
if (mips_opts.noat)
- as_warn ("Macro used $at after \".set noat\"");
+ as_warn (_("Macro used $at after \".set noat\""));
}
/* Implement macros in mips16 mode. */
@@ -6702,7 +6702,7 @@ mips16_macro (ip)
case M_SUBU_I:
do_subu:
if (imm_expr.X_op != O_constant)
- as_bad ("Unsupported large constant");
+ as_bad (_("Unsupported large constant"));
imm_expr.X_add_number = -imm_expr.X_add_number;
macro_build ((char *) NULL, &icnt, &imm_expr,
dbl ? "daddiu" : "addiu",
@@ -6711,7 +6711,7 @@ mips16_macro (ip)
case M_SUBU_I_2:
if (imm_expr.X_op != O_constant)
- as_bad ("Unsupported large constant");
+ as_bad (_("Unsupported large constant"));
imm_expr.X_add_number = -imm_expr.X_add_number;
macro_build ((char *) NULL, &icnt, &imm_expr, "addiu",
"x,k", xreg);
@@ -6719,7 +6719,7 @@ mips16_macro (ip)
case M_DSUBU_I_2:
if (imm_expr.X_op != O_constant)
- as_bad ("Unsupported large constant");
+ as_bad (_("Unsupported large constant"));
imm_expr.X_add_number = -imm_expr.X_add_number;
macro_build ((char *) NULL, &icnt, &imm_expr, "daddiu",
"y,j", yreg);
@@ -6828,7 +6828,7 @@ mips16_macro (ip)
do_addone_branch_i:
if (imm_expr.X_op != O_constant)
- as_bad ("Unsupported large constant");
+ as_bad (_("Unsupported large constant"));
++imm_expr.X_add_number;
do_branch_i:
@@ -6862,7 +6862,7 @@ validate_mips_insn (opc)
if ((used_bits & opc->match) != opc->match)
{
- as_bad ("internal: bad mips opcode (mask error): %s %s",
+ as_bad (_("internal: bad mips opcode (mask error): %s %s"),
opc->name, opc->args);
return 0;
}
@@ -6949,7 +6949,7 @@ validate_mips_insn (opc)
case ']': break;
/* end-sanitize-vr5400 */
default:
- as_bad ("internal: bad mips opcode (unknown operand type `%c'): %s %s",
+ as_bad (_("internal: bad mips opcode (unknown operand type `%c'): %s %s"),
c, opc->name, opc->args);
return 0;
}
@@ -6973,7 +6973,7 @@ validate_mips_insn (opc)
}
if (used_bits != 0xffffffff)
{
- as_bad ("internal: bad mips opcode (bits 0x%lx undefined): %s %s",
+ as_bad (_("internal: bad mips opcode (bits 0x%lx undefined): %s %s"),
~used_bits & 0xffffffff, opc->name, opc->args);
return 0;
}
@@ -6999,6 +6999,7 @@ mips_ip (str, ip)
unsigned int lastregno = 0;
char *s_reset;
char save_c = 0;
+ int full_opcode_match = 1;
insn_error = NULL;
@@ -7046,6 +7047,8 @@ mips_ip (str, ip)
insn_error = "unrecognized opcode";
return;
}
+
+ full_opcode_match = 0;
}
argsStart = s;
@@ -7111,12 +7114,12 @@ mips_ip (str, ip)
}
if (insn_isa == 15
|| insn_isa <= mips_opts.isa)
- insn_error = "opcode not supported on this processor";
+ insn_error = _("opcode not supported on this processor");
else
{
static char buf[100];
- sprintf (buf, "opcode requires -mips%d or greater", insn_isa);
+ sprintf (buf, _("opcode requires -mips%d or greater"), insn_isa);
insn_error = buf;
}
return;
@@ -7192,7 +7195,7 @@ mips_ip (str, ip)
check_absolute_expr (ip, &imm_expr);
if ((unsigned long) imm_expr.X_add_number > 31)
{
- as_warn ("Improper shift amount (%ld)",
+ as_warn (_("Improper shift amount (%ld)"),
(long) imm_expr.X_add_number);
imm_expr.X_add_number = imm_expr.X_add_number & 0x1f;
}
@@ -7225,7 +7228,7 @@ mips_ip (str, ip)
&& imm_expr.X_op != O_big)
insn_error = "absolute expression required";
else
- as_bad ("5 bit expression not in range -16..15");
+ as_bad (_("5 bit expression not in range -16..15"));
}
ip->insn_opcode |= (imm_expr.X_add_number) << 6;
imm_expr.X_op = O_absent;
@@ -7236,7 +7239,7 @@ mips_ip (str, ip)
if (strncmp (s, "vi27", 4) == 0)
s += 4;
else
- as_bad ("expected vi27");
+ as_bad (_("expected vi27"));
continue;
case '#': /* escape character */
@@ -7267,7 +7270,8 @@ mips_ip (str, ip)
/* Parse the completer. */
s_reset = s;
- while (*s != '\0' && *s != ' ' && *s != ',')
+ while ((!full_opcode_match || *args == 'K')
+ && *s != '\0' && *s != ' ' && *s != ',')
{
if (*s == 'w')
w++;
@@ -7280,11 +7284,14 @@ mips_ip (str, ip)
else
{
insn_error = "Invalid dest specification";
- continue;
+ break;
}
s++;
}
+ if (insn_error)
+ continue;
+
/* Each completer can only appear once. */
if (w > 1 || x > 1 || y > 1 || z > 1)
{
@@ -7296,6 +7303,10 @@ mips_ip (str, ip)
the appropriate value into the insn. */
if (*args == '&')
{
+ /* Not strictly in the specs, but requested by users. */
+ if (w == 0 && x == 0 && y == 0 && z == 0)
+ w = x = y = z = 1;
+
ip->insn_opcode |= ((w << 21) | (x << 24)
| (y << 23) | (z << 22));
last_h = (w << 3) | (x << 0) | (y << 1) | (z << 2);
@@ -7359,7 +7370,7 @@ mips_ip (str, ip)
check_absolute_expr (ip, &imm_expr);
if ((unsigned long) imm_expr.X_add_number > 31)
{
- as_warn ("Invalid value for `%s' (%lu)",
+ as_warn (_("Invalid value for `%s' (%lu)"),
ip->insn_mo->name,
(unsigned long) imm_expr.X_add_number);
imm_expr.X_add_number &= 0x1f;
@@ -7376,7 +7387,7 @@ mips_ip (str, ip)
my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
if ((unsigned) imm_expr.X_add_number > 1023)
- as_warn ("Illegal break code (%ld)",
+ as_warn (_("Illegal break code (%ld)"),
(long) imm_expr.X_add_number);
ip->insn_opcode |= imm_expr.X_add_number << 16;
imm_expr.X_op = O_absent;
@@ -7387,7 +7398,7 @@ mips_ip (str, ip)
my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
if ((unsigned) imm_expr.X_add_number > 0xfffff)
- as_warn ("Illegal syscall code (%ld)",
+ as_warn (_("Illegal syscall code (%ld)"),
(long) imm_expr.X_add_number);
ip->insn_opcode |= imm_expr.X_add_number << 6;
imm_expr.X_op = O_absent;
@@ -7399,7 +7410,7 @@ mips_ip (str, ip)
check_absolute_expr (ip, &imm_expr);
if ((unsigned long) imm_expr.X_add_number >= (1<<25))
{
- as_warn ("Coproccesor code > 25 bits (%ld)",
+ as_warn (_("Coproccesor code > 25 bits (%ld)"),
(long) imm_expr.X_add_number);
imm_expr.X_add_number &= ((1<<25) - 1);
}
@@ -7413,7 +7424,7 @@ mips_ip (str, ip)
check_absolute_expr (ip, &imm_expr);
if (imm_expr.X_add_number != 0 && imm_expr.X_add_number != 1)
{
- as_warn ("Invalidate performance regster (%ld)",
+ as_warn (_("Invalidate performance regster (%ld)"),
(long) imm_expr.X_add_number);
imm_expr.X_add_number &= 1;
}
@@ -7448,7 +7459,7 @@ mips_ip (str, ip)
}
while (isdigit (*s));
if (regno > 31)
- as_bad ("Invalid register number (%d)", regno);
+ as_bad (_("Invalid register number (%d)"), regno);
}
else if (*args == 'E' || *args == 'G')
goto notreg;
@@ -7516,7 +7527,7 @@ mips_ip (str, ip)
&& ! mips_opts.noat
&& *args != 'E'
&& *args != 'G')
- as_warn ("Used $at without \".set noat\"");
+ as_warn (_("Used $at without \".set noat\""));
c = *args;
if (*s == ' ')
s++;
@@ -7619,7 +7630,7 @@ mips_ip (str, ip)
while (isdigit (*s));
if (regno > 31)
- as_bad ("Invalid float register number (%d)", regno);
+ as_bad (_("Invalid float register number (%d)"), regno);
if ((regno & 1) != 0
&& mips_opts.isa < 3
@@ -7629,7 +7640,7 @@ mips_ip (str, ip)
|| strcmp (str, "swc1") == 0
|| strcmp (str, "l.s") == 0
|| strcmp (str, "s.s") == 0))
- as_warn ("Float register should be even, was %d",
+ as_warn (_("Float register should be even, was %d"),
regno);
c = *args;
@@ -7682,7 +7693,7 @@ mips_ip (str, ip)
while (isdigit (*s));
if (regno > 31)
- as_bad ("Invalid vu0 register number (%d)", regno);
+ as_bad (_("Invalid vu0 register number (%d)"), regno);
c = *args;
@@ -7713,7 +7724,7 @@ mips_ip (str, ip)
ip->insn_opcode |= value << (c == '7' ? 23 : 21);
break;
default:
- as_bad ("Invalid FSF/FTF specification");
+ as_bad (_("Invalid FSF/FTF specification"));
}
}
@@ -7765,7 +7776,7 @@ mips_ip (str, ip)
my_getExpression (&imm_expr, s);
if (imm_expr.X_op != O_big
&& imm_expr.X_op != O_constant)
- insn_error = "absolute expression required";
+ insn_error = _("absolute expression required");
s = expr_end;
continue;
@@ -7826,7 +7837,7 @@ mips_ip (str, ip)
input_line_pointer = save_in;
if (err != NULL && *err != '\0')
{
- as_bad ("Bad floating point constant: %s", err);
+ as_bad (_("Bad floating point constant: %s"), err);
memset (temp, '\0', sizeof temp);
length = f64 ? 8 : 4;
}
@@ -7943,7 +7954,7 @@ mips_ip (str, ip)
else
record_alignment (new_seg, *args == 'l' ? 2 : 3);
if (seg == now_seg)
- as_bad ("Can't use floating point insn in this section");
+ as_bad (_("Can't use floating point insn in this section"));
/* Set the argument to the current address in the
section. */
@@ -7995,9 +8006,9 @@ mips_ip (str, ip)
break;
if (imm_expr.X_op != O_constant
&& imm_expr.X_op != O_big)
- insn_error = "absolute expression required";
+ insn_error = _("absolute expression required");
else
- as_bad ("16 bit expression not in range 0..65535");
+ as_bad (_("16 bit expression not in range 0..65535"));
}
}
else
@@ -8034,9 +8045,9 @@ mips_ip (str, ip)
break;
if (imm_expr.X_op != O_constant
&& imm_expr.X_op != O_big)
- insn_error = "absolute expression required";
+ insn_error = _("absolute expression required");
else
- as_bad ("16 bit expression not in range -32768..32767");
+ as_bad (_("16 bit expression not in range -32768..32767"));
}
}
s = expr_end;
@@ -8088,7 +8099,7 @@ mips_ip (str, ip)
if (imm_expr.X_op == O_constant
&& (imm_expr.X_add_number < 0
|| imm_expr.X_add_number >= 0x10000))
- as_bad ("lui expression not in range 0..65535");
+ as_bad (_("lui expression not in range 0..65535"));
imm_reloc = BFD_RELOC_LO16;
if (c)
{
@@ -8129,7 +8140,7 @@ mips_ip (str, ip)
}
while (isdigit (*s));
if (regno > 7)
- as_bad ("invalid condition code register $fcc%d", regno);
+ as_bad (_("invalid condition code register $fcc%d"), regno);
if (*args == 'N')
ip->insn_opcode |= regno << OP_SH_BCC;
else
@@ -8142,7 +8153,7 @@ mips_ip (str, ip)
check_absolute_expr (ip, &imm_expr);
if ((unsigned long) imm_expr.X_add_number > (unsigned long) OP_MASK_VECBYTE)
{
- as_bad ("bad byte vector index (%ld)",
+ as_bad (_("bad byte vector index (%ld)"),
(long) imm_expr.X_add_number);
imm_expr.X_add_number = imm_expr.X_add_number;
}
@@ -8156,7 +8167,7 @@ mips_ip (str, ip)
check_absolute_expr (ip, &imm_expr);
if ((unsigned long) imm_expr.X_add_number > (unsigned long) OP_MASK_VECALIGN)
{
- as_bad ("bad byte vector index (%ld)",
+ as_bad (_("bad byte vector index (%ld)"),
(long) imm_expr.X_add_number);
imm_expr.X_add_number = imm_expr.X_add_number;
}
@@ -8167,7 +8178,7 @@ mips_ip (str, ip)
/* end-sanitize-vr5400 */
default:
- as_bad ("bad char = '%c'\n", *args);
+ as_bad (_("bad char = '%c'\n"), *args);
internalError ();
}
break;
@@ -8180,7 +8191,7 @@ mips_ip (str, ip)
s = argsStart;
continue;
}
- insn_error = "illegal operands";
+ insn_error = _("illegal operands");
return;
}
}
@@ -8238,7 +8249,7 @@ mips16_ip (str, ip)
}
/* Fall through. */
default:
- insn_error = "unknown opcode";
+ insn_error = _("unknown opcode");
return;
}
@@ -8247,7 +8258,7 @@ mips16_ip (str, ip)
if ((insn = (struct mips_opcode *) hash_find (mips16_op_hash, str)) == NULL)
{
- insn_error = "unrecognized opcode";
+ insn_error = _("unrecognized opcode");
return;
}
@@ -8356,7 +8367,7 @@ mips16_ip (str, ip)
while (isdigit (*s));
if (regno > 31)
{
- as_bad ("invalid register number (%d)", regno);
+ as_bad (_("invalid register number (%d)"), regno);
regno = 2;
}
}
@@ -8437,7 +8448,7 @@ mips16_ip (str, ip)
case 'X':
case 'Y':
if (regno == AT && ! mips_opts.noat)
- as_warn ("used $at without \".set noat\"");
+ as_warn (_("used $at without \".set noat\""));
break;
default:
@@ -8578,7 +8589,7 @@ mips16_ip (str, ip)
check_absolute_expr (ip, &imm_expr);
if ((unsigned long) imm_expr.X_add_number > 63)
{
- as_warn ("Invalid value for `%s' (%lu)",
+ as_warn (_("Invalid value for `%s' (%lu)"),
ip->insn_mo->name,
(unsigned long) imm_expr.X_add_number);
imm_expr.X_add_number &= 0x3f;
@@ -8612,7 +8623,7 @@ mips16_ip (str, ip)
++s;
if (*s != '$')
{
- as_bad ("can't parse register list");
+ as_bad (_("can't parse register list"));
break;
}
++s;
@@ -8646,7 +8657,7 @@ mips16_ip (str, ip)
++s;
else
{
- as_bad ("invalid register list");
+ as_bad (_("invalid register list"));
break;
}
}
@@ -8676,7 +8687,7 @@ mips16_ip (str, ip)
mask |= 1;
else
{
- as_bad ("invalid register list");
+ as_bad (_("invalid register list"));
break;
}
}
@@ -8693,7 +8704,7 @@ mips16_ip (str, ip)
check_absolute_expr (ip, &imm_expr);
if ((unsigned long) imm_expr.X_add_number > 0x7ff)
{
- as_warn ("Invalid value for `%s' (%lu)",
+ as_warn (_("Invalid value for `%s' (%lu)"),
ip->insn_mo->name,
(unsigned long) imm_expr.X_add_number);
imm_expr.X_add_number &= 0x7ff;
@@ -8718,7 +8729,7 @@ mips16_ip (str, ip)
continue;
}
- insn_error = "illegal operands";
+ insn_error = _("illegal operands");
return;
}
@@ -8843,9 +8854,9 @@ mips16_immed (file, line, type, val, warn, small, ext, insn, use_extend,
needext = false;
if (warn && ext && ! needext)
- as_warn_where (file, line, "extended operand requested but not required");
+ as_warn_where (file, line, _("extended operand requested but not required"));
if (small && needext)
- as_bad_where (file, line, "invalid unextended operand value");
+ as_bad_where (file, line, _("invalid unextended operand value"));
if (small || (! ext && ! needext))
{
@@ -8873,7 +8884,7 @@ mips16_immed (file, line, type, val, warn, small, ext, insn, use_extend,
}
if (val < minext || val > maxext)
as_bad_where (file, line,
- "operand value out of range for instruction");
+ _("operand value out of range for instruction"));
*use_extend = true;
if (op->extbits == 16)
@@ -9042,7 +9053,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "bad call to md_atof";
+ return _("bad call to md_atof");
}
t = atof_ieee (input_line_pointer, type, words);
@@ -9365,13 +9376,13 @@ md_parse_option (c, arg)
/* end-sanitize-vr5400 */
&& mips_cpu != 5000))
{
- as_bad ("ignoring invalid leading 'v' in -mcpu=%s switch", arg);
+ as_bad (_("ignoring invalid leading 'v' in -mcpu=%s switch"), arg);
return 0;
}
if (mips_cpu == -1)
{
- as_bad ("invalid architecture -mcpu=%s", arg);
+ as_bad (_("invalid architecture -mcpu=%s"), arg);
return 0;
}
}
@@ -9464,7 +9475,7 @@ md_parse_option (c, arg)
mips_pic = EMBEDDED_PIC;
if (USE_GLOBAL_POINTER_OPT && g_switch_seen)
{
- as_bad ("-G may not be used with embedded PIC code");
+ as_bad (_("-G may not be used with embedded PIC code"));
return 0;
}
g_switch_value = 0x7fffffff;
@@ -9476,13 +9487,13 @@ md_parse_option (c, arg)
case OPTION_CALL_SHARED:
if (OUTPUT_FLAVOR != bfd_target_elf_flavour)
{
- as_bad ("-call_shared is supported only for ELF format");
+ as_bad (_("-call_shared is supported only for ELF format"));
return 0;
}
mips_pic = SVR4_PIC;
if (g_switch_seen && g_switch_value != 0)
{
- as_bad ("-G may not be used with SVR4 PIC code");
+ as_bad (_("-G may not be used with SVR4 PIC code"));
return 0;
}
g_switch_value = 0;
@@ -9491,7 +9502,7 @@ md_parse_option (c, arg)
case OPTION_NON_SHARED:
if (OUTPUT_FLAVOR != bfd_target_elf_flavour)
{
- as_bad ("-non_shared is supported only for ELF format");
+ as_bad (_("-non_shared is supported only for ELF format"));
return 0;
}
mips_pic = NO_PIC;
@@ -9507,12 +9518,12 @@ md_parse_option (c, arg)
case 'G':
if (! USE_GLOBAL_POINTER_OPT)
{
- as_bad ("-G is not supported for this configuration");
+ as_bad (_("-G is not supported for this configuration"));
return 0;
}
else if (mips_pic == SVR4_PIC || mips_pic == EMBEDDED_PIC)
{
- as_bad ("-G may not be used with SVR4 or embedded PIC code");
+ as_bad (_("-G may not be used with SVR4 or embedded PIC code"));
return 0;
}
else
@@ -9536,7 +9547,7 @@ md_parse_option (c, arg)
|| strcmp (*l, "elf64-littlemips") == 0)
break;
if (*l == NULL)
- as_fatal ("No compiled in support for 64 bit object file format");
+ as_fatal (_("No compiled in support for 64 bit object file format"));
free (list);
mips_64 = 1;
}
@@ -9553,15 +9564,15 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf(stream, "\
+ fprintf(stream, _("\
MIPS options:\n\
-membedded-pic generate embedded position independent code\n\
-EB generate big endian output\n\
-EL generate little endian output\n\
-g, -g2 do not remove uneeded NOPs or swap branches\n\
-G NUM allow referencing objects up to NUM bytes\n\
- implicitly with the gp register [default 8]\n");
- fprintf(stream, "\
+ implicitly with the gp register [default 8]\n"));
+ fprintf(stream, _("\
-mips1, -mcpu=r{2,3}000 generate code for r2000 and r3000\n\
-mips2, -mcpu=r6000 generate code for r6000\n\
-mips3, -mcpu=r4000 generate code for r4000\n\
@@ -9573,22 +9584,22 @@ MIPS options:\n\
-m4010 permit R4010 instructions\n\
-no-m4010 do not permit R4010 instructions\n\
-m4100 permit VR4100 instructions\n\
--no-m4100 do not permit VR4100 instructions\n");
- fprintf(stream, "\
+-no-m4100 do not permit VR4100 instructions\n"));
+ fprintf(stream, _("\
-mips16 generate mips16 instructions\n\
--no-mips16 do not generate mips16 instructions\n");
- fprintf(stream, "\
+-no-mips16 do not generate mips16 instructions\n"));
+ fprintf(stream, _("\
-O0 remove unneeded NOPs, do not swap branches\n\
-O remove unneeded NOPs and swap branches\n\
--trap, --no-break trap exception on div by 0 and mult overflow\n\
---break, --no-trap break exception on div by 0 and mult overflow\n");
+--break, --no-trap break exception on div by 0 and mult overflow\n"));
#ifdef OBJ_ELF
- fprintf(stream, "\
+ fprintf(stream, _("\
-KPIC, -call_shared generate SVR4 position independent code\n\
-non_shared do not generate position independent code\n\
-xgot assume a 32 bit GOT\n\
-32 create 32 bit object file (default)\n\
--64 create 64 bit object file\n");
+-64 create 64 bit object file\n"));
#endif
}
@@ -9640,7 +9651,7 @@ cons_fix_new_mips (frag, where, nbytes, exp)
#endif
if (nbytes != 2 && nbytes != 4 && nbytes != 8)
- as_bad ("Unsupported reloc size %d", nbytes);
+ as_bad (_("Unsupported reloc size %d"), nbytes);
fix_new_exp (frag_now, where, (int) nbytes, exp, 0,
(nbytes == 2
@@ -9741,7 +9752,7 @@ mips_frob_file ()
if (pass == 1)
as_warn_where (l->fixp->fx_file, l->fixp->fx_line,
- "Unmatched %%hi reloc");
+ _("Unmatched %%hi reloc"));
}
}
}
@@ -9833,7 +9844,7 @@ md_apply_fix (fixP, valueP)
/* end-sanitize-r5900 */
if (fixP->fx_pcrel)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Invalid PC relative reloc");
+ _("Invalid PC relative reloc"));
/* Nothing needed to do. The value comes from the reloc entry */
break;
@@ -9932,7 +9943,7 @@ md_apply_fix (fixP, valueP)
{
if (value < -0x8000 || value > 0x7fff)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "relocation overflow");
+ _("relocation overflow"));
buf = (unsigned char *) fixP->fx_frag->fr_literal + fixP->fx_where;
if (target_big_endian)
buf += 2;
@@ -9948,7 +9959,7 @@ md_apply_fix (fixP, valueP)
*/
if ((value & 0x3) != 0)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Branch to odd address (%lx)", value);
+ _("Branch to odd address (%lx)"), value);
value >>= 2;
/* update old instruction data */
@@ -9993,7 +10004,7 @@ md_apply_fix (fixP, valueP)
handle these cases, but it appears to do it
incorrectly. */
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Branch out of range");
+ _("Branch out of range"));
}
}
@@ -10091,7 +10102,7 @@ printInsn (oc)
return;
}
}
- printf ("%08lx UNDEFINED\n", oc);
+ printf (_("%08lx UNDEFINED\n"), oc);
}
#endif
@@ -10154,10 +10165,10 @@ s_align (x)
temp = get_absolute_expression ();
if (temp > max_alignment)
- as_bad ("Alignment too large: %d. assumed.", temp = max_alignment);
+ as_bad (_("Alignment too large: %d. assumed."), temp = max_alignment);
else if (temp < 0)
{
- as_warn ("Alignment negative: 0 assumed.");
+ as_warn (_("Alignment negative: 0 assumed."));
temp = 0;
}
if (*input_line_pointer == ',')
@@ -10245,7 +10256,7 @@ s_change_sec (sec)
}
else
{
- as_bad ("No read only data section in this object file format");
+ as_bad (_("No read only data section in this object file format"));
demand_empty_rest_of_line ();
return;
}
@@ -10268,7 +10279,7 @@ s_change_sec (sec)
}
else
{
- as_bad ("Global pointers not supported; recompile -G 0");
+ as_bad (_("Global pointers not supported; recompile -G 0"));
demand_empty_rest_of_line ();
return;
}
@@ -10352,7 +10363,7 @@ s_mips_globl (x)
c = get_symbol_end ();
sec = bfd_get_section_by_name (stdoutput, secname);
if (sec == NULL)
- as_bad ("%s: no such section", secname);
+ as_bad (_("%s: no such section"), secname);
*input_line_pointer = c;
if (sec != NULL && (sec->flags & SEC_CODE) != 0)
@@ -10389,18 +10400,18 @@ s_option (x)
else if (i == 2)
mips_pic = SVR4_PIC;
else
- as_bad (".option pic%d not supported", i);
+ as_bad (_(".option pic%d not supported"), i);
if (USE_GLOBAL_POINTER_OPT && mips_pic == SVR4_PIC)
{
if (g_switch_seen && g_switch_value != 0)
- as_warn ("-G may not be used with SVR4 PIC code");
+ as_warn (_("-G may not be used with SVR4 PIC code"));
g_switch_value = 0;
bfd_set_gp_size (stdoutput, 0);
}
}
else
- as_warn ("Unrecognized option \"%s\"", opt);
+ as_warn (_("Unrecognized option \"%s\""), opt);
*input_line_pointer = c;
demand_empty_rest_of_line ();
@@ -10463,7 +10474,7 @@ s_mipsset (x)
else if (strcmp (name, "nomacro") == 0)
{
if (mips_opts.noreorder == 0)
- as_bad ("`noreorder' must be set before `nomacro'");
+ as_bad (_("`noreorder' must be set before `nomacro'"));
mips_opts.warn_about_macros = 1;
}
else if (strcmp (name, "move") == 0 || strcmp (name, "novolatile") == 0)
@@ -10498,7 +10509,7 @@ s_mipsset (x)
if (isa == 0)
mips_opts.isa = file_mips_isa;
else if (isa < 1 || isa > 4)
- as_bad ("unknown ISA level");
+ as_bad (_("unknown ISA level"));
else
mips_opts.isa = isa;
}
@@ -10521,7 +10532,7 @@ s_mipsset (x)
s = mips_opts_stack;
if (s == NULL)
- as_bad (".set pop with no .set push");
+ as_bad (_(".set pop with no .set push"));
else
{
/* If we're changing the reorder mode we need to handle
@@ -10545,7 +10556,7 @@ s_mipsset (x)
}
else
{
- as_warn ("Tried to set unrecognized symbol: %s\n", name);
+ as_warn (_("Tried to set unrecognized symbol: %s\n"), name);
}
*input_line_pointer = ch;
demand_empty_rest_of_line ();
@@ -10562,7 +10573,7 @@ s_abicalls (ignore)
if (USE_GLOBAL_POINTER_OPT)
{
if (g_switch_seen && g_switch_value != 0)
- as_warn ("-G may not be used with SVR4 PIC code");
+ as_warn (_("-G may not be used with SVR4 PIC code"));
g_switch_value = 0;
}
bfd_set_gp_size (stdoutput, 0);
@@ -10595,7 +10606,7 @@ s_cpload (ignore)
/* .cpload should be a in .set noreorder section. */
if (mips_opts.noreorder == 0)
- as_warn (".cpload not in noreorder section");
+ as_warn (_(".cpload not in noreorder section"));
ex.X_op = O_symbol;
ex.X_add_symbol = symbol_find_or_make ("_gp_disp");
@@ -10677,7 +10688,7 @@ s_gpword (ignore)
if (ex.X_op != O_symbol || ex.X_add_number != 0)
{
- as_bad ("Unsupported use of .gpword");
+ as_bad (_("Unsupported use of .gpword"));
ignore_rest_of_line ();
}
@@ -10814,7 +10825,7 @@ tc_get_register (frame)
SKIP_WHITESPACE ();
if (*input_line_pointer++ != '$')
{
- as_warn ("expected `$'");
+ as_warn (_("expected `$'"));
reg = 0;
}
else if (isdigit ((unsigned char) *input_line_pointer))
@@ -10822,7 +10833,7 @@ tc_get_register (frame)
reg = get_absolute_expression ();
if (reg < 0 || reg >= 32)
{
- as_warn ("Bad register number");
+ as_warn (_("Bad register number"));
reg = 0;
}
}
@@ -10838,7 +10849,7 @@ tc_get_register (frame)
reg = AT;
else
{
- as_warn ("Unrecognized register name");
+ as_warn (_("Unrecognized register name"));
reg = 0;
}
input_line_pointer += 2;
@@ -11031,7 +11042,7 @@ mips16_extended_frag (fragp, sec, stretch)
/* FIXME: We should support this, and let the linker
catch branches and loads that are out of range. */
as_bad_where (fragp->fr_file, fragp->fr_line,
- "unsupported PC relative reference to different section");
+ _("unsupported PC relative reference to different section"));
return 1;
}
@@ -11139,7 +11150,7 @@ mips16_extended_frag (fragp, sec, stretch)
}
}
else if (symsec != absolute_section && sec != NULL)
- as_bad_where (fragp->fr_file, fragp->fr_line, "unsupported relocation");
+ as_bad_where (fragp->fr_file, fragp->fr_line, _("unsupported relocation"));
if ((val & ((1 << op->shift) - 1)) != 0
|| val < (mintiny << op->shift)
@@ -11222,7 +11233,7 @@ md_estimate_size_before_relax (fragp, segtype)
+ RELAX_RELOC1 (fragp->fr_subtype));
/* FIXME: This really needs as_warn_where. */
if (RELAX_WARN (fragp->fr_subtype))
- as_warn ("AT used after \".set noat\" or macro used after \".set nomacro\"");
+ as_warn (_("AT used after \".set noat\" or macro used after \".set nomacro\""));
}
if (! change)
@@ -11281,7 +11292,7 @@ tc_gen_reloc (section, fixp)
subtrahend. */
reloc->addend = reloc->address - S_GET_VALUE (fixp->fx_subsy);
if (OUTPUT_FLAVOR != bfd_target_ecoff_flavour)
- as_fatal ("Double check fx_r_type in tc-mips.c:tc_gen_reloc");
+ as_fatal (_("Double check fx_r_type in tc-mips.c:tc_gen_reloc"));
fixp->fx_r_type = BFD_RELOC_GPREL32;
}
else if (fixp->fx_r_type == BFD_RELOC_PCREL_LO16)
@@ -11431,7 +11442,7 @@ tc_gen_reloc (section, fixp)
break;
default:
as_bad_where (fixp->fx_file, fixp->fx_line,
- "Cannot make %s relocation PC relative",
+ _("Cannot make %s relocation PC relative"),
bfd_get_reloc_code_name (code));
}
}
@@ -11449,7 +11460,7 @@ tc_gen_reloc (section, fixp)
if (reloc->howto == NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "Can not represent %s relocation in this object file format",
+ _("Can not represent %s relocation in this object file format"),
bfd_get_reloc_code_name (code));
retval[0] = NULL;
}
@@ -11562,7 +11573,7 @@ md_convert_frag (abfd, asec, fragp)
&& (RELAX_MIPS16_JAL_DSLOT (fragp->fr_subtype)
|| RELAX_MIPS16_DSLOT (fragp->fr_subtype)))
as_warn_where (fragp->fr_file, fragp->fr_line,
- "extended instruction in delay slot");
+ _("extended instruction in delay slot"));
buf = (bfd_byte *) (fragp->fr_literal + fragp->fr_fix);
@@ -11774,7 +11785,7 @@ md_obj_end ()
{
/* check for premature end, nesting errors, etc */
if (proc_lastP && proc_lastP->proc_end == NULL)
- as_warn ("missing `.end' at end of assembly");
+ as_warn (_("missing `.end' at end of assembly"));
}
static long
@@ -11789,7 +11800,7 @@ get_number ()
negative = 1;
}
if (!isdigit (*input_line_pointer))
- as_bad ("Expected simple number.");
+ as_bad (_("Expected simple number."));
if (input_line_pointer[0] == '0')
{
if (input_line_pointer[1] == 'x')
@@ -11815,9 +11826,9 @@ get_number ()
}
if (!isdigit (*input_line_pointer))
{
- printf (" *input_line_pointer == '%c' 0x%02x\n",
+ printf (_(" *input_line_pointer == '%c' 0x%02x\n"),
*input_line_pointer, *input_line_pointer);
- as_warn ("Invalid number");
+ as_warn (_("Invalid number"));
return -1;
}
while (isdigit (*input_line_pointer))
@@ -11858,10 +11869,10 @@ s_mipsend (x)
else
p = NULL;
if (now_seg != text_section)
- as_warn (".end not in text section");
+ as_warn (_(".end not in text section"));
if (!proc_lastP)
{
- as_warn (".end and no .ent seen yet.");
+ as_warn (_(".end and no .ent seen yet."));
return;
}
@@ -11869,7 +11880,7 @@ s_mipsend (x)
{
assert (S_GET_NAME (p));
if (strcmp (S_GET_NAME (p), S_GET_NAME (proc_lastP->proc_isym)))
- as_warn (".end symbol does not match .ent symbol.");
+ as_warn (_(".end symbol does not match .ent symbol."));
}
proc_lastP->proc_end = (symbolS *) 1;
@@ -11892,10 +11903,10 @@ s_ent (aent)
if (isdigit (*input_line_pointer) || *input_line_pointer == '-')
number = get_number ();
if (now_seg != text_section)
- as_warn (".ent or .aent not in text section.");
+ as_warn (_(".ent or .aent not in text section."));
if (!aent && proc_lastP && proc_lastP->proc_end == NULL)
- as_warn ("missing `.end'");
+ as_warn (_("missing `.end'"));
if (!aent)
{
@@ -11952,7 +11963,7 @@ s_frame (x)
if (!(frame_reg == FP && frame_off == 0))
{
if (!proc_lastP)
- as_warn ("No .ent for .frame to use.");
+ as_warn (_("No .ent for .frame to use."));
(void) sprintf (str, "R%d;%d", frame_reg, frame_off);
symP = symbol_new (str, N_VFP, 0, frag_now);
S_SET_TYPE (symP, N_RMASK);
@@ -12002,7 +12013,7 @@ s_mask (reg_type)
if (!(mask == 0))
{
if (!proc_lastP)
- as_warn ("No .ent for .mask to use.");
+ as_warn (_("No .ent for .mask to use."));
strP = str;
for (i = 0; i < 32; i++)
{
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 34b48d8..3b18d0a 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -80,6 +80,7 @@ static void ppc_function PARAMS ((int));
static void ppc_extern PARAMS ((int));
static void ppc_lglobl PARAMS ((int));
static void ppc_section PARAMS ((int));
+static void ppc_named_section PARAMS ((int));
static void ppc_stabx PARAMS ((int));
static void ppc_rename PARAMS ((int));
static void ppc_toc PARAMS ((int));
@@ -174,6 +175,7 @@ const pseudo_typeS md_pseudo_table[] =
{ "function", ppc_function, 0 },
{ "lglobl", ppc_lglobl, 0 },
{ "rename", ppc_rename, 0 },
+ { "section", ppc_named_section, 0 },
{ "stabx", ppc_stabx, 0 },
{ "text", ppc_section, 't' },
{ "toc", ppc_toc, 0 },
@@ -827,7 +829,7 @@ md_parse_option (c, arg)
#endif
else
{
- as_bad ("invalid switch -m%s", arg);
+ as_bad (_("invalid switch -m%s"), arg);
return 0;
}
break;
@@ -864,7 +866,7 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf(stream, "\
+ fprintf(stream, _("\
PowerPC options:\n\
-u ignored\n\
-mpwrx, -mpwr2 generate code for IBM POWER/2 (RIOS2)\n\
@@ -876,9 +878,9 @@ PowerPC options:\n\
-mcom generate code Power/PowerPC common instructions\n\
-many generate code for any architecture (PWR/PWRX/PPC)\n\
-mregnames Allow symbolic names for registers\n\
--mno-regnames Do not allow symbolic names for registers\n");
+-mno-regnames Do not allow symbolic names for registers\n"));
#ifdef OBJ_ELF
- fprintf(stream, "\
+ fprintf(stream, _("\
-mrelocatable support for GCC's -mrelocatble option\n\
-mrelocatable-lib support for GCC's -mrelocatble-lib option\n\
-memb set PPC_EMB bit in ELF flags\n\
@@ -888,7 +890,7 @@ PowerPC options:\n\
-msolaris generate code for Solaris\n\
-mno-solaris do not generate code for Solaris\n\
-V print assembler version number\n\
--Qy, -Qn ignored\n");
+-Qy, -Qn ignored\n"));
#endif
}
@@ -913,7 +915,7 @@ ppc_set_cpu ()
|| strcmp (default_cpu, "powerpcle") == 0)
ppc_cpu = PPC_OPCODE_PPC;
else
- as_fatal ("Unknown default cpu = %s, os = %s", default_cpu, default_os);
+ as_fatal (_("Unknown default cpu = %s, os = %s"), default_cpu, default_os);
}
}
@@ -938,7 +940,7 @@ ppc_arch ()
return bfd_arch_powerpc;
}
- as_fatal ("Neither Power nor PowerPC opcodes were selected.");
+ as_fatal (_("Neither Power nor PowerPC opcodes were selected."));
return bfd_arch_unknown;
}
@@ -985,7 +987,7 @@ md_begin ()
&& (op->flags & PPC_OPCODE_POWER) != 0)
continue;
- as_bad ("Internal assembler error for instruction %s", op->name);
+ as_bad (_("Internal assembler error for instruction %s"), op->name);
dup_insn = true;
}
}
@@ -1004,7 +1006,7 @@ md_begin ()
retval = hash_insert (ppc_macro_hash, macro->name, (PTR) macro);
if (retval != (const char *) NULL)
{
- as_bad ("Internal assembler error for macro %s", macro->name);
+ as_bad (_("Internal assembler error for macro %s"), macro->name);
dup_insn = true;
}
}
@@ -1093,7 +1095,7 @@ ppc_insert_operand (insn, operand, val, file, line)
if (test < (offsetT) min || test > (offsetT) max)
{
const char *err =
- "operand out of range (%s not between %ld and %ld)";
+ _("operand out of range (%s not between %ld and %ld)");
char buf[100];
sprint_value (buf, test);
@@ -1215,7 +1217,7 @@ ppc_elf_suffix (str_p, exp_p)
|| ptr->reloc == BFD_RELOC_LO16_GOTOFF
|| ptr->reloc == BFD_RELOC_HI16_GOTOFF
|| ptr->reloc == BFD_RELOC_HI16_S_GOTOFF))
- as_warn ("identifier+constant@got means identifier@got+constant");
+ as_warn (_("identifier+constant@got means identifier@got+constant"));
/* Now check for identifier@suffix+constant */
if (*str == '-' || *str == '+')
@@ -1269,7 +1271,7 @@ ppc_elf_cons (nbytes)
int size = bfd_get_reloc_size (reloc_howto);
if (size > nbytes)
- as_bad ("%s relocations do not fit in %d bytes\n", reloc_howto->name, nbytes);
+ as_bad (_("%s relocations do not fit in %d bytes\n"), reloc_howto->name, nbytes);
else
{
@@ -1328,7 +1330,7 @@ ppc_elf_lcomm(xxx)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after symbol-name: rest of line ignored.");
+ as_bad (_("Expected comma after symbol-name: rest of line ignored."));
ignore_rest_of_line ();
return;
}
@@ -1336,7 +1338,7 @@ ppc_elf_lcomm(xxx)
input_line_pointer++; /* skip ',' */
if ((size = get_absolute_expression ()) < 0)
{
- as_warn (".COMMon length (%ld.) <0! Ignored.", (long) size);
+ as_warn (_(".COMMon length (%ld.) <0! Ignored."), (long) size);
ignore_rest_of_line ();
return;
}
@@ -1350,7 +1352,7 @@ ppc_elf_lcomm(xxx)
align = get_absolute_expression ();
if (align <= 0)
{
- as_warn ("ignoring bad alignment");
+ as_warn (_("ignoring bad alignment"));
align = 8;
}
}
@@ -1361,7 +1363,7 @@ ppc_elf_lcomm(xxx)
if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
{
- as_bad ("Ignoring attempt to re-define symbol `%s'.",
+ as_bad (_("Ignoring attempt to re-define symbol `%s'."),
S_GET_NAME (symbolP));
ignore_rest_of_line ();
return;
@@ -1369,7 +1371,7 @@ ppc_elf_lcomm(xxx)
if (S_GET_VALUE (symbolP) && S_GET_VALUE (symbolP) != (valueT) size)
{
- as_bad ("Length of .lcomm \"%s\" is already %ld. Not changed to %ld.",
+ as_bad (_("Length of .lcomm \"%s\" is already %ld. Not changed to %ld."),
S_GET_NAME (symbolP),
(long) S_GET_VALUE (symbolP),
(long) size);
@@ -1387,7 +1389,7 @@ ppc_elf_lcomm(xxx)
for (align2 = 0; (align & 1) == 0; align >>= 1, ++align2);
if (align != 1)
{
- as_bad ("Common alignment not a power of 2");
+ as_bad (_("Common alignment not a power of 2"));
ignore_rest_of_line ();
return;
}
@@ -1450,7 +1452,7 @@ ppc_elf_validate_fix (fixp, seg)
|| fixp->fx_r_type != BFD_RELOC_CTOR)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "Relocation cannot be done when using -mrelocatable");
+ _("Relocation cannot be done when using -mrelocatable"));
}
}
return;
@@ -1531,7 +1533,7 @@ parse_toc_entry(toc_kind)
}
else
{
- as_bad ("syntax error: invalid toc specifier `%s'", toc_spec);
+ as_bad (_("syntax error: invalid toc specifier `%s'"), toc_spec);
*input_line_pointer = c; /* put back the delimiting char */
input_line_pointer = start; /* reset input_line pointer */
return 0;
@@ -1545,7 +1547,7 @@ parse_toc_entry(toc_kind)
if (c != ']')
{
- as_bad ("syntax error: expected `]', found `%c'", c);
+ as_bad (_("syntax error: expected `]', found `%c'"), c);
input_line_pointer = start; /* reset input_line pointer */
return 0;
}
@@ -1604,7 +1606,7 @@ md_assemble (str)
macro = (const struct powerpc_macro *) hash_find (ppc_macro_hash, str);
if (macro == (const struct powerpc_macro *) NULL)
- as_bad ("Unrecognized opcode: `%s'", str);
+ as_bad (_("Unrecognized opcode: `%s'"), str);
else
ppc_macro (s, macro);
@@ -1779,7 +1781,7 @@ md_assemble (str)
assert (ex.X_add_symbol != NULL);
if (ex.X_add_symbol->bsym->section != tocdata_section)
{
- as_bad("[tocv] symbol is not a toc symbol");
+ as_bad(_("[tocv] symbol is not a toc symbol"));
}
}
@@ -1790,16 +1792,16 @@ md_assemble (str)
/* entries. We don't support them today. Is this the */
/* right way to say that? */
toc_reloc = BFD_RELOC_UNUSED;
- as_bad ("Unimplemented toc32 expression modifier");
+ as_bad (_("Unimplemented toc32 expression modifier"));
break;
case must_be_64:
/* FIXME: see above */
toc_reloc = BFD_RELOC_UNUSED;
- as_bad ("Unimplemented toc64 expression modifier");
+ as_bad (_("Unimplemented toc64 expression modifier"));
break;
default:
fprintf(stderr,
- "Unexpected return value [%d] from parse_toc_entry!\n",
+ _("Unexpected return value [%d] from parse_toc_entry!\n"),
toc_kind);
abort();
break;
@@ -1807,7 +1809,7 @@ md_assemble (str)
/* We need to generate a fixup for this expression. */
if (fc >= MAX_INSN_FIXUPS)
- as_fatal ("too many fixups");
+ as_fatal (_("too many fixups"));
fixups[fc].reloc = toc_reloc;
fixups[fc].exp = ex;
@@ -1839,9 +1841,9 @@ md_assemble (str)
input_line_pointer = hold;
if (ex.X_op == O_illegal)
- as_bad ("illegal operand");
+ as_bad (_("illegal operand"));
else if (ex.X_op == O_absent)
- as_bad ("missing operand");
+ as_bad (_("missing operand"));
else if (ex.X_op == O_register)
{
insn = ppc_insert_operand (insn, operand, ex.X_add_number,
@@ -1914,7 +1916,7 @@ md_assemble (str)
/* We need to generate a fixup for this expression. */
if (fc >= MAX_INSN_FIXUPS)
- as_fatal ("too many fixups");
+ as_fatal (_("too many fixups"));
fixups[fc].exp = ex;
fixups[fc].opindex = 0;
fixups[fc].reloc = reloc;
@@ -1926,7 +1928,7 @@ md_assemble (str)
{
/* We need to generate a fixup for this expression. */
if (fc >= MAX_INSN_FIXUPS)
- as_fatal ("too many fixups");
+ as_fatal (_("too many fixups"));
fixups[fc].exp = ex;
fixups[fc].opindex = *opindex_ptr;
fixups[fc].reloc = BFD_RELOC_UNUSED;
@@ -1951,7 +1953,7 @@ md_assemble (str)
if (*str != endc
&& (endc != ',' || *str != '\0'))
{
- as_bad ("syntax error; found `%c' but expected `%c'", *str, endc);
+ as_bad (_("syntax error; found `%c' but expected `%c'"), *str, endc);
break;
}
@@ -1963,7 +1965,7 @@ md_assemble (str)
++str;
if (*str != '\0')
- as_bad ("junk at end of line: `%s'", str);
+ as_bad (_("junk at end of line: `%s'"), str);
/* Write out the instruction. */
f = frag_more (4);
@@ -2082,7 +2084,7 @@ ppc_macro (str, macro)
if (count != macro->operands)
{
- as_bad ("wrong number of operands");
+ as_bad (_("wrong number of operands"));
return;
}
@@ -2138,7 +2140,7 @@ ppc_section_letter (letter, ptr_msg)
if (letter == 'e')
return SHF_EXCLUDE;
- *ptr_msg = "Bad .section directive: want a,w,x,e in string";
+ *ptr_msg = _("Bad .section directive: want a,w,x,e in string");
return 0;
}
@@ -2256,7 +2258,7 @@ ppc_comm (lcomm)
if (*input_line_pointer != ',')
{
- as_bad ("missing size");
+ as_bad (_("missing size"));
ignore_rest_of_line ();
return;
}
@@ -2265,7 +2267,7 @@ ppc_comm (lcomm)
size = get_absolute_expression ();
if (size < 0)
{
- as_bad ("negative size");
+ as_bad (_("negative size"));
ignore_rest_of_line ();
return;
}
@@ -2281,7 +2283,7 @@ ppc_comm (lcomm)
align = get_absolute_expression ();
if (align <= 0)
{
- as_warn ("ignoring bad alignment");
+ as_warn (_("ignoring bad alignment"));
align = 3;
}
}
@@ -2306,7 +2308,7 @@ ppc_comm (lcomm)
argument. */
if (*input_line_pointer != ',')
{
- as_bad ("missing real symbol name");
+ as_bad (_("missing real symbol name"));
ignore_rest_of_line ();
return;
}
@@ -2327,7 +2329,7 @@ ppc_comm (lcomm)
if (S_IS_DEFINED (sym)
|| S_GET_VALUE (sym) != 0)
{
- as_bad ("attempt to redefine symbol");
+ as_bad (_("attempt to redefine symbol"));
ignore_rest_of_line ();
return;
}
@@ -2536,6 +2538,43 @@ ppc_section (type)
demand_empty_rest_of_line ();
}
+/* This function handles the .section pseudo-op. This is mostly to
+ give an error, since XCOFF only supports .text, .data and .bss, but
+ we do permit the user to name the text or data section. */
+
+static void
+ppc_named_section (ignore)
+ int ignore;
+{
+ char *user_name;
+ const char *real_name;
+ char c;
+ symbolS *sym;
+
+ user_name = input_line_pointer;
+ c = get_symbol_end ();
+
+ if (strcmp (user_name, ".text") == 0)
+ real_name = ".text[PR]";
+ else if (strcmp (user_name, ".data") == 0)
+ real_name = ".data[RW]";
+ else
+ {
+ as_bad (_("The XCOFF file format does not support arbitrary sections"));
+ *input_line_pointer = c;
+ ignore_rest_of_line ();
+ return;
+ }
+
+ *input_line_pointer = c;
+
+ sym = symbol_find_or_make (real_name);
+
+ ppc_change_csect (sym);
+
+ demand_empty_rest_of_line ();
+}
+
/* The .extern pseudo-op. We create an undefined symbol. */
static void
@@ -2598,7 +2637,7 @@ ppc_rename (ignore)
if (*input_line_pointer != ',')
{
- as_bad ("missing rename string");
+ as_bad (_("missing rename string"));
ignore_rest_of_line ();
return;
}
@@ -2629,7 +2668,7 @@ ppc_stabx (ignore)
if (*input_line_pointer != ',')
{
- as_bad ("missing value");
+ as_bad (_("missing value"));
return;
}
++input_line_pointer;
@@ -2647,7 +2686,7 @@ ppc_stabx (ignore)
case O_illegal:
case O_absent:
case O_big:
- as_bad ("illegal .stabx expression; zero assumed");
+ as_bad (_("illegal .stabx expression; zero assumed"));
exp.X_add_number = 0;
/* Fall through. */
case O_constant:
@@ -2679,7 +2718,7 @@ ppc_stabx (ignore)
if (*input_line_pointer != ',')
{
- as_bad ("missing class");
+ as_bad (_("missing class"));
return;
}
++input_line_pointer;
@@ -2688,7 +2727,7 @@ ppc_stabx (ignore)
if (*input_line_pointer != ',')
{
- as_bad ("missing type");
+ as_bad (_("missing type"));
return;
}
++input_line_pointer;
@@ -2749,7 +2788,7 @@ ppc_function (ignore)
if (*input_line_pointer != ',')
{
- as_bad ("missing symbol name");
+ as_bad (_("missing symbol name"));
ignore_rest_of_line ();
return;
}
@@ -2921,7 +2960,7 @@ ppc_bs (ignore)
symbolS *sym;
if (ppc_current_block != NULL)
- as_bad ("nested .bs blocks");
+ as_bad (_("nested .bs blocks"));
name = input_line_pointer;
endc = get_symbol_end ();
@@ -2954,7 +2993,7 @@ ppc_es (ignore)
symbolS *sym;
if (ppc_current_block == NULL)
- as_bad (".es without preceding .bs");
+ as_bad (_(".es without preceding .bs"));
sym = symbol_make (".es");
S_SET_SEGMENT (sym, now_seg);
@@ -3151,7 +3190,7 @@ ppc_tc (ignore)
if (ppc_toc_csect == (symbolS *) NULL
|| ppc_toc_csect != ppc_current_csect)
{
- as_bad (".tc not in .toc section");
+ as_bad (_(".tc not in .toc section"));
ignore_rest_of_line ();
return;
}
@@ -3170,7 +3209,7 @@ ppc_tc (ignore)
label = ppc_current_csect->sy_tc.within;
if (label->sy_tc.class != XMC_TC0)
{
- as_bad (".tc with no label");
+ as_bad (_(".tc with no label"));
ignore_rest_of_line ();
return;
}
@@ -3245,7 +3284,7 @@ ppc_previous(ignore)
if (ppc_previous_section == NULL)
{
- as_warn("No previous section to return to. Directive ignored.");
+ as_warn(_("No previous section to return to. Directive ignored."));
return;
}
@@ -3490,7 +3529,7 @@ ppc_pe_comm(lcomm)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after symbol-name: rest of line ignored.");
+ as_bad (_("Expected comma after symbol-name: rest of line ignored."));
ignore_rest_of_line ();
return;
}
@@ -3498,7 +3537,7 @@ ppc_pe_comm(lcomm)
input_line_pointer++; /* skip ',' */
if ((temp = get_absolute_expression ()) < 0)
{
- as_warn (".COMMon length (%ld.) <0! Ignored.", (long) temp);
+ as_warn (_(".COMMon length (%ld.) <0! Ignored."), (long) temp);
ignore_rest_of_line ();
return;
}
@@ -3514,7 +3553,7 @@ ppc_pe_comm(lcomm)
align = get_absolute_expression ();
if (align <= 0)
{
- as_warn ("ignoring bad alignment");
+ as_warn (_("ignoring bad alignment"));
align = 3;
}
}
@@ -3526,7 +3565,7 @@ ppc_pe_comm(lcomm)
*p = c;
if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
{
- as_bad ("Ignoring attempt to re-define symbol `%s'.",
+ as_bad (_("Ignoring attempt to re-define symbol `%s'."),
S_GET_NAME (symbolP));
ignore_rest_of_line ();
return;
@@ -3535,7 +3574,7 @@ ppc_pe_comm(lcomm)
if (S_GET_VALUE (symbolP))
{
if (S_GET_VALUE (symbolP) != (valueT) temp)
- as_bad ("Length of .comm \"%s\" is already %ld. Not changed to %ld.",
+ as_bad (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."),
S_GET_NAME (symbolP),
(long) S_GET_VALUE (symbolP),
(long) temp);
@@ -3664,7 +3703,7 @@ ppc_pe_section (ignore)
{
/* Section Contents */
case 'a': /* unknown */
- as_bad ("Unsupported section attribute -- 'a'");
+ as_bad (_("Unsupported section attribute -- 'a'"));
break;
case 'c': /* code section */
flags |= SEC_CODE;
@@ -3734,7 +3773,7 @@ ppc_pe_section (ignore)
break;
default:
- as_bad("unknown section attribute '%c'",
+ as_bad(_("unknown section attribute '%c'"),
*input_line_pointer);
break;
}
@@ -3752,7 +3791,7 @@ ppc_pe_section (ignore)
if (flags != SEC_NO_FLAGS)
{
if (! bfd_set_section_flags (stdoutput, sec, flags))
- as_bad ("error setting flags for \"%s\": %s",
+ as_bad (_("error setting flags for \"%s\": %s"),
bfd_section_name (stdoutput, sec),
bfd_errmsg (bfd_get_error ()));
}
@@ -3854,7 +3893,7 @@ ppc_canonicalize_symbol_name (name)
*s = toupper (*s);
if (*s == '\0' || s[1] != '\0')
- as_bad ("bad symbol suffix");
+ as_bad (_("bad symbol suffix"));
*s = ']';
}
@@ -3945,7 +3984,7 @@ ppc_symbol_new_hook (sym)
}
if (sym->sy_tc.class == -1)
- as_bad ("Unrecognized symbol suffix");
+ as_bad (_("Unrecognized symbol suffix"));
}
/* Set the class of a label based on where it is defined. This
@@ -4027,7 +4066,7 @@ ppc_frob_symbol (sym)
if (SF_GET_FUNCTION (sym))
{
if (ppc_last_function != (symbolS *) NULL)
- as_bad ("two .function pseudo-ops with no intervening .ef");
+ as_bad (_("two .function pseudo-ops with no intervening .ef"));
ppc_last_function = sym;
if (sym->sy_tc.size != (symbolS *) NULL)
{
@@ -4039,7 +4078,7 @@ ppc_frob_symbol (sym)
&& strcmp (S_GET_NAME (sym), ".ef") == 0)
{
if (ppc_last_function == (symbolS *) NULL)
- as_bad (".ef with no preceding .function");
+ as_bad (_(".ef with no preceding .function"));
else
{
set_end = ppc_last_function;
@@ -4167,7 +4206,7 @@ ppc_frob_symbol (sym)
if (csect == (symbolS *) NULL)
{
- as_warn ("warning: symbol %s has no csect", S_GET_NAME (sym));
+ as_warn (_("warning: symbol %s has no csect"), S_GET_NAME (sym));
a->x_csect.x_scnlen.l = 0;
}
else
@@ -4319,7 +4358,7 @@ md_atof (type, litp, sizep)
default:
*sizep = 0;
- return "bad call to md_atof";
+ return _("bad call to md_atof");
}
t = atof_ieee (input_line_pointer, type, words);
@@ -4463,7 +4502,7 @@ ppc_fix_adjustable (fix)
}
as_bad_where (fix->fx_file, fix->fx_line,
- "symbol in .toc does not match any .tc");
+ _("symbol in .toc does not match any .tc"));
}
/* Possibly adjust the reloc to be against the csect. */
@@ -4654,7 +4693,7 @@ md_apply_fix3 (fixp, valuep, seg)
{
/* We can't actually support subtracting a symbol. */
as_bad_where (fixp->fx_file, fixp->fx_line,
- "expression too complex");
+ _("expression too complex"));
}
}
}
@@ -4757,10 +4796,10 @@ md_apply_fix3 (fixp, valuep, seg)
symbol. */
if (expr_symbol_where (fixp->fx_addsy, &sfile, &sline))
as_bad_where (fixp->fx_file, fixp->fx_line,
- "unresolved expression that must be resolved");
+ _("unresolved expression that must be resolved"));
else
as_bad_where (fixp->fx_file, fixp->fx_line,
- "unsupported relocation type");
+ _("unsupported relocation type"));
fixp->fx_done = 1;
return 1;
}
@@ -4811,13 +4850,17 @@ md_apply_fix3 (fixp, valuep, seg)
case BFD_RELOC_PPC_EMB_RELSDA:
case BFD_RELOC_PPC_TOC16:
if (fixp->fx_pcrel)
- as_bad_where (fixp->fx_file, fixp->fx_line,
- "cannot emit PC relative %s relocation%s%s",
- bfd_get_reloc_code_name (fixp->fx_r_type),
- fixp->fx_addsy != NULL ? " against " : "",
- (fixp->fx_addsy != NULL
- ? S_GET_NAME (fixp->fx_addsy)
- : ""));
+ {
+ if (fixp->fx_addsy != NULL)
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("cannot emit PC relative %s relocation against %s"),
+ bfd_get_reloc_code_name (fixp->fx_r_type),
+ S_GET_NAME (fixp->fx_addsy));
+ else
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("cannot emit PC relative %s relocation")
+ bfd_get_reloc_code_name (fixp->fx_r_type));
+ }
md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where,
value, 2);
@@ -4877,12 +4920,12 @@ md_apply_fix3 (fixp, valuep, seg)
insn = bfd_getl32 ((unsigned char *) where);
if ((value & 3) != 0)
as_bad_where (fixp->fx_file, fixp->fx_line,
- "must branch to an address a multiple of 4");
+ _("must branch to an address a multiple of 4"));
if ((offsetT) value < -0x40000000
|| (offsetT) value >= 0x40000000)
as_bad_where (fixp->fx_file, fixp->fx_line,
- "@local or @plt branch destination is too far "
- "away, %ld bytes",
+ _("@local or @plt branch destination is too far "
+ "away, %ld bytes"),
value);
insn = insn | (value & 0x03fffffc);
if (target_big_endian)
@@ -4894,7 +4937,7 @@ md_apply_fix3 (fixp, valuep, seg)
default:
fprintf(stderr,
- "Gas failure, reloc value %d\n", fixp->fx_r_type);
+ _("Gas failure, reloc value %d\n"), fixp->fx_r_type);
fflush(stderr);
abort ();
}
@@ -4938,7 +4981,7 @@ tc_gen_reloc (seg, fixp)
if (reloc->howto == (reloc_howto_type *) NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "reloc %d not supported by object file format", (int)fixp->fx_r_type);
+ _("reloc %d not supported by object file format"), (int)fixp->fx_r_type);
return NULL;
}
reloc->addend = fixp->fx_addnumber;
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index b35dcfe..563b641 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -1,5 +1,5 @@
/* tc-sh.c -- Assemble code for the Hitachi Super-H
- Copyright (C) 1993, 94, 95, 96, 1997 Free Software Foundation.
+ Copyright (C) 1993, 94, 95, 96, 1997, 1998 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@@ -80,6 +80,10 @@ const pseudo_typeS md_pseudo_table[] =
int sh_relax; /* set if -relax seen */
+/* Whether -small was seen. */
+
+int sh_small;
+
const char EXP_CHARS[] = "eE";
/* Chars that mean this number is a floating point constant */
@@ -262,6 +266,18 @@ parse_reg (src, mode, reg)
return 3;
}
+ if (src[0] == 's' && src[1] == 'g' && src[2] == 'r' && ! isalnum (src[3]))
+ {
+ *mode = A_SGR;
+ return 3;
+ }
+
+ if (src[0] == 'd' && src[1] == 'b' && src[2] == 'r' && ! isalnum (src[3]))
+ {
+ *mode = A_DBR;
+ return 3;
+ }
+
if (src[0] == 's' && src[1] == 'r' && ! isalnum (src[2]))
{
*mode = A_SR;
@@ -327,6 +343,61 @@ parse_reg (src, mode, reg)
return 3;
}
}
+ if (src[0] == 'd' && src[1] == 'r')
+ {
+ if (src[2] == '1')
+ {
+ if (src[3] >= '0' && src[3] <= '4' && ! ((src[3] - '0') & 1)
+ && ! isalnum (src[4]))
+ {
+ *mode = D_REG_N;
+ *reg = 10 + src[3] - '0';
+ return 4;
+ }
+ }
+ if (src[2] >= '0' && src[2] <= '8' && ! ((src[2] - '0') & 1)
+ && ! isalnum (src[3]))
+ {
+ *mode = D_REG_N;
+ *reg = (src[2] - '0');
+ return 3;
+ }
+ }
+ if (src[0] == 'x' && src[1] == 'd')
+ {
+ if (src[2] == '1')
+ {
+ if (src[3] >= '0' && src[3] <= '4' && ! ((src[3] - '0') & 1)
+ && ! isalnum (src[4]))
+ {
+ *mode = X_REG_N;
+ *reg = 11 + src[3] - '0';
+ return 4;
+ }
+ }
+ if (src[2] >= '0' && src[2] <= '8' && ! ((src[2] - '0') & 1)
+ && ! isalnum (src[3]))
+ {
+ *mode = X_REG_N;
+ *reg = (src[2] - '0') + 1;
+ return 3;
+ }
+ }
+ if (src[0] == 'f' && src[1] == 'v')
+ {
+ if (src[2] == '1'&& src[3] == '2' && ! isalnum (src[4]))
+ {
+ *mode = V_REG_N;
+ *reg = 12;
+ return 4;
+ }
+ if ((src[2] == '0' || src[2] == '4' || src[2] == '8') && ! isalnum (src[3]))
+ {
+ *mode = V_REG_N;
+ *reg = (src[2] - '0');
+ return 3;
+ }
+ }
if (src[0] == 'f' && src[1] == 'p' && src[2] == 'u' && src[3] == 'l'
&& ! isalnum (src[4]))
{
@@ -341,6 +412,13 @@ parse_reg (src, mode, reg)
return 5;
}
+ if (src[0] == 'x' && src[1] == 'm' && src[2] == 't' && src[3] == 'r'
+ && src[4] == 'x' && ! isalnum (src[5]))
+ {
+ *mode = XMTRX_M4;
+ return 5;
+ }
+
return 0;
}
@@ -371,7 +449,7 @@ parse_exp (s)
input_line_pointer = s;
expression (&immediate);
if (immediate.X_op == O_absent)
- as_bad ("missing operand");
+ as_bad (_("missing operand"));
new = input_line_pointer;
input_line_pointer = save;
return new;
@@ -414,7 +492,7 @@ parse_at (src, op)
len = parse_reg (src, &mode, &(op->reg));
if (mode != A_REG_N)
- as_bad ("illegal register after @-");
+ as_bad (_("illegal register after @-"));
op->type = A_DEC_N;
src += len;
@@ -430,7 +508,7 @@ parse_at (src, op)
src += len;
if (op->reg != 0)
{
- as_bad ("must be @(r0,...)");
+ as_bad (_("must be @(r0,...)"));
}
if (src[0] == ',')
src++;
@@ -446,7 +524,7 @@ parse_at (src, op)
}
else
{
- as_bad ("syntax error in @(r0,...)");
+ as_bad (_("syntax error in @(r0,...)"));
}
}
else
@@ -478,17 +556,17 @@ parse_at (src, op)
}
else
{
- as_bad ("syntax error in @(disp,[Rn, gbr, pc])");
+ as_bad (_("syntax error in @(disp,[Rn, gbr, pc])"));
}
}
else
{
- as_bad ("syntax error in @(disp,[Rn, gbr, pc])");
+ as_bad (_("syntax error in @(disp,[Rn, gbr, pc])"));
}
}
src += len;
if (src[0] != ')')
- as_bad ("expecting )");
+ as_bad (_("expecting )"));
else
src++;
}
@@ -497,7 +575,7 @@ parse_at (src, op)
src += parse_reg (src, &mode, &(op->reg));
if (mode != A_REG_N)
{
- as_bad ("illegal register after @");
+ as_bad (_("illegal register after @"));
}
if (src[0] == '+')
{
@@ -665,6 +743,9 @@ get_specific (opcode, operands)
case A_IND_R0_REG_N:
case A_DISP_REG_N:
case F_REG_N:
+ case D_REG_N:
+ case X_REG_N:
+ case V_REG_N:
case FPUL_N:
case FPSCR_N:
/* Opcode needs rn */
@@ -672,11 +753,23 @@ get_specific (opcode, operands)
goto fail;
reg_n = user->reg;
break;
+ case FD_REG_N:
+ if (user->type != F_REG_N && user->type != D_REG_N)
+ goto fail;
+ reg_n = user->reg;
+ break;
+ case DX_REG_N:
+ if (user->type != D_REG_N && user->type != X_REG_N)
+ goto fail;
+ reg_n = user->reg;
+ break;
case A_GBR:
case A_SR:
case A_VBR:
case A_SSR:
case A_SPC:
+ case A_SGR:
+ case A_DBR:
if (user->type != arg)
goto fail;
break;
@@ -700,6 +793,9 @@ get_specific (opcode, operands)
break;
case F_REG_M:
+ case D_REG_M:
+ case X_REG_M:
+ case V_REG_M:
case FPUL_M:
case FPSCR_M:
/* Opcode needs rn */
@@ -707,9 +803,19 @@ get_specific (opcode, operands)
goto fail;
reg_m = user->reg;
break;
+ case DX_REG_M:
+ if (user->type != D_REG_N && user->type != X_REG_N)
+ goto fail;
+ reg_m = user->reg;
+ break;
+ case XMTRX_M4:
+ if (user->type != XMTRX_M4)
+ goto fail;
+ reg_m = 4;
+ break;
default:
- printf ("unhandled %d\n", arg);
+ printf (_("unhandled %d\n"), arg);
goto fail;
}
}
@@ -730,7 +836,7 @@ check (operand, low, high)
|| operand->X_add_number < low
|| operand->X_add_number > high)
{
- as_bad ("operand must be absolute in range %d..%d", low, high);
+ as_bad (_("operand must be absolute in range %d..%d"), low, high);
}
return operand->X_add_number;
}
@@ -816,6 +922,9 @@ build_Mytes (opcode, operand)
case REG_M:
nbuf[index] = reg_m;
break;
+ case REG_NM:
+ nbuf[index] = reg_n | (reg_m >> 2);
+ break;
case REG_B:
nbuf[index] = reg_b | 0x08;
break;
@@ -847,7 +956,7 @@ build_Mytes (opcode, operand)
insert (output, BFD_RELOC_SH_PCRELIMM8BY2, 1);
break;
default:
- printf ("failed for %d\n", i);
+ printf (_("failed for %d\n"), i);
}
}
}
@@ -894,14 +1003,14 @@ md_assemble (str)
if (nlen == 0)
{
- as_bad ("can't find opcode ");
+ as_bad (_("can't find opcode "));
}
opcode = (sh_opcode_info *) hash_find (opcode_hash_control, name);
if (opcode == NULL)
{
- as_bad ("unknown opcode");
+ as_bad (_("unknown opcode"));
return;
}
@@ -936,7 +1045,7 @@ md_assemble (str)
where[0] = 0x0;
where[1] = 0x0;
- as_bad ("invalid operands for opcode");
+ as_bad (_("invalid operands for opcode"));
return;
}
@@ -998,14 +1107,14 @@ void
DEFUN (tc_crawl_symbol_chain, (headers),
object_headers * headers)
{
- printf ("call to tc_crawl_symbol_chain \n");
+ printf (_("call to tc_crawl_symbol_chain \n"));
}
void
DEFUN (tc_headers_hook, (headers),
object_headers * headers)
{
- printf ("call to tc_headers_hook \n");
+ printf (_("call to tc_headers_hook \n"));
}
#endif
@@ -1041,7 +1150,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "bad call to md_atof";
+ return _("bad call to md_atof");
}
t = atof_ieee (input_line_pointer, type, words);
@@ -1082,13 +1191,13 @@ s_uses (ignore)
expressionS ex;
if (! sh_relax)
- as_warn (".uses pseudo-op seen when not relaxing");
+ as_warn (_(".uses pseudo-op seen when not relaxing"));
expression (&ex);
if (ex.X_op != O_symbol || ex.X_add_number != 0)
{
- as_bad ("bad .uses format");
+ as_bad (_("bad .uses format"));
ignore_rest_of_line ();
return;
}
@@ -1102,10 +1211,12 @@ CONST char *md_shortopts = "";
struct option md_longopts[] = {
#define OPTION_RELAX (OPTION_MD_BASE)
-#define OPTION_LITTLE (OPTION_MD_BASE+1)
+#define OPTION_LITTLE (OPTION_MD_BASE + 1)
+#define OPTION_SMALL (OPTION_LITTLE + 1)
{"relax", no_argument, NULL, OPTION_RELAX},
{"little", no_argument, NULL, OPTION_LITTLE},
+ {"small", no_argument, NULL, OPTION_SMALL},
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof(md_longopts);
@@ -1120,11 +1231,16 @@ md_parse_option (c, arg)
case OPTION_RELAX:
sh_relax = 1;
break;
+
case OPTION_LITTLE:
shl = 1;
target_big_endian = 0;
break;
+ case OPTION_SMALL:
+ sh_small = 1;
+ break;
+
default:
return 0;
}
@@ -1136,10 +1252,11 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf(stream, "\
+ fprintf(stream, _("\
SH options:\n\
-little generate little endian code\n\
--relax alter jump instructions for long displacements\n");
+-relax alter jump instructions for long displacements\n\
+-small align sections to 4 byte boundaries, not 16\n"));
}
int md_short_jump_size;
@@ -1147,7 +1264,7 @@ int md_short_jump_size;
void
tc_Nout_fix_to_chars ()
{
- printf ("call to tc_Nout_fix_to_chars \n");
+ printf (_("call to tc_Nout_fix_to_chars \n"));
abort ();
}
@@ -1159,7 +1276,7 @@ md_create_short_jump (ptr, from_Nddr, to_Nddr, frag, to_symbol)
fragS *frag;
symbolS *to_symbol;
{
- as_fatal ("failed sanity check.");
+ as_fatal (_("failed sanity check."));
}
void
@@ -1169,7 +1286,7 @@ md_create_long_jump (ptr, from_Nddr, to_Nddr, frag, to_symbol)
fragS *frag;
symbolS *to_symbol;
{
- as_fatal ("failed sanity check.");
+ as_fatal (_("failed sanity check."));
}
/* This struct is used to pass arguments to sh_count_relocs through
@@ -1254,7 +1371,7 @@ sh_frob_section (abfd, sec, ignore)
|| S_IS_EXTERNAL (sym))
{
as_warn_where (fix->fx_file, fix->fx_line,
- ".uses does not refer to a local symbol in the same section");
+ _(".uses does not refer to a local symbol in the same section"));
continue;
}
@@ -1273,7 +1390,7 @@ sh_frob_section (abfd, sec, ignore)
if (fscan == NULL)
{
as_warn_where (fix->fx_file, fix->fx_line,
- "can't find fixup pointed to by .uses");
+ _("can't find fixup pointed to by .uses"));
continue;
}
@@ -1296,7 +1413,7 @@ sh_frob_section (abfd, sec, ignore)
|| S_IS_EXTERNAL (sym))
{
as_warn_where (fix->fx_file, fix->fx_line,
- ".uses target does not refer to a local symbol in the same section");
+ _(".uses target does not refer to a local symbol in the same section"));
continue;
}
@@ -1391,12 +1508,15 @@ md_convert_frag (headers, seg, fragP)
case C (UNCOND_JUMP, UNCOND32):
case C (UNCOND_JUMP, UNDEF_WORD_DISP):
if (fragP->fr_symbol == NULL)
- as_bad ("at 0x%lx, displacement overflows 12-bit field",
+ as_bad (_("at 0x%lx, displacement overflows 12-bit field"),
(unsigned long) fragP->fr_address);
+ else if (S_IS_DEFINED (fragP->fr_address))
+ as_bad (_("at 0x%lx, displacement to defined symbol %s overflows 12-bit field"),
+ (unsigned long) fragP->fr_address,
+ S_GET_NAME (fragP->fr_symbol));
else
- as_bad ("at 0x%lx, displacement to %sdefined symbol %s overflows 12-bit field",
+ as_bad (_("at 0x%lx, displacement to undefined symbol %s overflows 12-bit field"),
(unsigned long) fragP->fr_address,
- S_IS_DEFINED (fragP->fr_symbol) ? "" : "un",
S_GET_NAME (fragP->fr_symbol));
#if 0 /* This code works, but generates poor code and the compiler
@@ -1482,12 +1602,15 @@ md_convert_frag (headers, seg, fragP)
case C (COND_JUMP, COND32):
case C (COND_JUMP, UNDEF_WORD_DISP):
if (fragP->fr_symbol == NULL)
- as_bad ("at 0x%lx, displacement overflows 8-bit field",
+ as_bad (_("at 0x%lx, displacement overflows 8-bit field"),
(unsigned long) fragP->fr_address);
- else
- as_bad ("at 0x%lx, displacement to %sdefined symbol %s overflows 8-bit field ",
+ else if (S_IS_DEFINED (fragP->fr_symbol))
+ as_bad (_("at 0x%lx, displacement to defined symbol %s overflows 8-bit field "),
+ (unsigned long) fragP->fr_address,
+ S_GET_NAME (fragP->fr_symbol));
+ else
+ as_bad (_("at 0x%lx, displacement to undefined symbol %s overflows 8-bit field "),
(unsigned long) fragP->fr_address,
- S_IS_DEFINED (fragP->fr_symbol) ? "" : "un",
S_GET_NAME (fragP->fr_symbol));
#if 0 /* This code works, but generates poor code, and the compiler
@@ -1539,7 +1662,7 @@ md_convert_frag (headers, seg, fragP)
if (donerelax && !sh_relax)
as_warn_where (fragP->fr_file, fragP->fr_line,
- "overflow in branch to %s; converted into longer instruction sequence",
+ _("overflow in branch to %s; converted into longer instruction sequence"),
(fragP->fr_symbol != NULL
? S_GET_NAME (fragP->fr_symbol)
: ""));
@@ -1614,7 +1737,7 @@ sh_cons_align (nbytes)
if (now_seg == absolute_section)
{
if ((abs_section_offset & ((1 << nalign) - 1)) != 0)
- as_warn ("misaligned data");
+ as_warn (_("misaligned data"));
return;
}
@@ -1642,7 +1765,7 @@ sh_handle_align (frag)
if (frag->fr_type == rs_align_code
&& frag->fr_next->fr_address - frag->fr_address - frag->fr_fix != 0)
- as_warn_where (frag->fr_file, frag->fr_line, "misaligned data");
+ as_warn_where (frag->fr_file, frag->fr_line, _("misaligned data"));
}
/* This macro decides whether a particular reloc is an entry in a
@@ -1656,6 +1779,7 @@ sh_handle_align (frag)
#define SWITCH_TABLE_CONS(fix) \
((fix)->fx_r_type == 0 \
&& ((fix)->fx_size == 2 \
+ || (fix)->fx_size == 1 \
|| (fix)->fx_size == 4))
#endif
@@ -1666,6 +1790,7 @@ sh_handle_align (frag)
&& S_GET_SEGMENT ((fix)->fx_subsy) == text_section \
&& ((fix)->fx_r_type == BFD_RELOC_32 \
|| (fix)->fx_r_type == BFD_RELOC_16 \
+ || (fix)->fx_r_type == BFD_RELOC_8 \
|| SWITCH_TABLE_CONS (fix)))
/* See whether we need to force a relocation into the output file.
@@ -1708,6 +1833,8 @@ md_apply_fix (fixP, val)
#ifdef BFD_ASSEMBLER
long val = *valp;
#endif
+ long max, min;
+ int shift;
#ifndef BFD_ASSEMBLER
if (fixP->fx_r_type == 0)
@@ -1717,36 +1844,53 @@ md_apply_fix (fixP, val)
else if (fixP->fx_size == 4)
fixP->fx_r_type = BFD_RELOC_32;
else if (fixP->fx_size == 1)
- fixP->fx_r_type = BFD_RELOC_SH_IMM8;
+ fixP->fx_r_type = BFD_RELOC_8;
else
abort ();
}
#endif
+ max = min = 0;
+ shift = 0;
switch (fixP->fx_r_type)
{
case BFD_RELOC_SH_IMM4:
+ max = 0xf;
*buf = (*buf & 0xf0) | (val & 0xf);
break;
case BFD_RELOC_SH_IMM4BY2:
+ max = 0xf;
+ shift = 1;
*buf = (*buf & 0xf0) | ((val >> 1) & 0xf);
break;
case BFD_RELOC_SH_IMM4BY4:
+ max = 0xf;
+ shift = 2;
*buf = (*buf & 0xf0) | ((val >> 2) & 0xf);
break;
case BFD_RELOC_SH_IMM8BY2:
+ max = 0xff;
+ shift = 1;
*buf = val >> 1;
break;
case BFD_RELOC_SH_IMM8BY4:
+ max = 0xff;
+ shift = 2;
*buf = val >> 2;
break;
case BFD_RELOC_8:
case BFD_RELOC_SH_IMM8:
+ /* Sometimes the 8 bit value is sign extended (e.g., add) and
+ sometimes it is not (e.g., and). We permit any 8 bit value.
+ Note that adding further restrictions may invalidate
+ reasonable looking assembly code, such as ``and -0x1,r0''. */
+ max = 0xff;
+ min = - 0xff;
*buf++ = val;
break;
@@ -1766,28 +1910,28 @@ md_apply_fix (fixP, val)
variable val. */
val = (val + 2) / 4;
if (val & ~0xff)
- as_bad_where (fixP->fx_file, fixP->fx_line, "pcrel too far");
+ as_bad_where (fixP->fx_file, fixP->fx_line, _("pcrel too far"));
buf[lowbyte] = val;
break;
case BFD_RELOC_SH_PCRELIMM8BY2:
val /= 2;
if (val & ~0xff)
- as_bad_where (fixP->fx_file, fixP->fx_line, "pcrel too far");
+ as_bad_where (fixP->fx_file, fixP->fx_line, _("pcrel too far"));
buf[lowbyte] = val;
break;
case BFD_RELOC_SH_PCDISP8BY2:
val /= 2;
if (val < -0x80 || val > 0x7f)
- as_bad_where (fixP->fx_file, fixP->fx_line, "pcrel too far");
+ as_bad_where (fixP->fx_file, fixP->fx_line, _("pcrel too far"));
buf[lowbyte] = val;
break;
case BFD_RELOC_SH_PCDISP12BY2:
val /= 2;
if (val < -0x800 || val >= 0x7ff)
- as_bad_where (fixP->fx_file, fixP->fx_line, "pcrel too far");
+ as_bad_where (fixP->fx_file, fixP->fx_line, _("pcrel too far"));
buf[lowbyte] = val & 0xff;
buf[highbyte] |= (val >> 8) & 0xf;
break;
@@ -1839,6 +1983,19 @@ md_apply_fix (fixP, val)
abort ();
}
+ if (shift != 0)
+ {
+ if ((val & ((1 << shift) - 1)) != 0)
+ as_bad_where (fixP->fx_file, fixP->fx_line, _("misaligned offset"));
+ if (val >= 0)
+ val >>= shift;
+ else
+ val = ((val >> shift)
+ | ((long) -1 & ~ ((long) -1 >> shift)));
+ }
+ if (max != 0 && (val < min || val > max))
+ as_bad_where (fixP->fx_file, fixP->fx_line, _("offset out of range"));
+
#ifdef BFD_ASSEMBLER
return 0;
#endif
@@ -2000,6 +2157,7 @@ static const struct reloc_map coff_reloc_map[] =
{ BFD_RELOC_SH_IMM8BY4, R_SH_IMM8BY4 },
{ BFD_RELOC_SH_PCRELIMM8BY2, R_SH_PCRELIMM8BY2 },
{ BFD_RELOC_SH_PCRELIMM8BY4, R_SH_PCRELIMM8BY4 },
+ { BFD_RELOC_8_PCREL, R_SH_SWITCH8 },
{ BFD_RELOC_SH_SWITCH16, R_SH_SWITCH16 },
{ BFD_RELOC_SH_SWITCH32, R_SH_SWITCH32 },
{ BFD_RELOC_SH_USES, R_SH_USES },
@@ -2035,7 +2193,7 @@ sh_coff_reloc_mangle (seg, fix, intr, paddr)
break;
if (rm->bfd_reloc == BFD_RELOC_UNUSED)
as_bad_where (fix->fx_file, fix->fx_line,
- "Can not represent %s relocation in this object file format",
+ _("Can not represent %s relocation in this object file format"),
bfd_get_reloc_code_name (fix->fx_r_type));
intr->r_type = rm->sh_reloc;
intr->r_offset = 0;
@@ -2046,6 +2204,8 @@ sh_coff_reloc_mangle (seg, fix, intr, paddr)
if (fix->fx_r_type == BFD_RELOC_16)
intr->r_type = R_SH_SWITCH16;
+ else if (fix->fx_r_type == BFD_RELOC_8)
+ intr->r_type = R_SH_SWITCH8;
else if (fix->fx_r_type == BFD_RELOC_32)
intr->r_type = R_SH_SWITCH32;
else
@@ -2146,6 +2306,8 @@ tc_gen_reloc (section, fixp)
rel->addend = rel->address - S_GET_VALUE (fixp->fx_subsy);
if (r_type == BFD_RELOC_16)
r_type = BFD_RELOC_SH_SWITCH16;
+ else if (r_type == BFD_RELOC_8)
+ r_type = BFD_RELOC_8_PCREL;
else if (r_type == BFD_RELOC_32)
r_type = BFD_RELOC_SH_SWITCH32;
else
@@ -2166,7 +2328,7 @@ tc_gen_reloc (section, fixp)
if (rel->howto == NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "Cannot represent relocation type %s",
+ _("Cannot represent relocation type %s"),
bfd_get_reloc_code_name (r_type));
/* Set howto to a garbage value so that we can keep going. */
rel->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index cfefdb6..48864be 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -1,6 +1,5 @@
/* tc-sparc.c -- Assemble for the SPARC
- Copyright (C) 1989, 90-96, 1997 Free Software Foundation, Inc.
-
+ Copyright (C) 1989, 90-96, 97, 1998 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
GAS is free software; you can redistribute it and/or modify
@@ -26,7 +25,9 @@
#include "opcode/sparc.h"
+#ifdef OBJ_ELF
#include "elf/sparc.h"
+#endif
static struct sparc_arch *lookup_arch PARAMS ((char *));
static void init_default_arch PARAMS ((void));
@@ -66,11 +67,16 @@ static enum sparc_opcode_arch_val max_architecture;
/* Either 32 or 64, selects file format. */
static int sparc_arch_size;
-static enum { MM_TSO, MM_PSO, MM_RMO } sparc_memory_model = MM_RMO;
/* Initial (default) value, recorded separately in case a user option
changes the value before md_show_usage is called. */
static int default_arch_size;
+#ifdef OBJ_ELF
+/* The currently selected v9 memory model. Currently only used for
+ ELF. */
+static enum { MM_TSO, MM_PSO, MM_RMO } sparc_memory_model = MM_RMO;
+#endif
+
static int architecture_requested;
static int warn_on_bump;
@@ -86,12 +92,15 @@ static int enforce_aligned_data;
extern int target_big_endian;
-/* V9 has big and little endian data, but instructions are always big endian.
- The sparclet has bi-endian support but both data and insns have the same
- endianness. Global `target_big_endian' is used for data. The following
- macro is used for instructions. */
+/* V9 and 86x have big and little endian data, but instructions are always big
+ endian. The sparclet has bi-endian support but both data and insns have
+ the same endianness. Global `target_big_endian' is used for data.
+ The following macro is used for instructions. */
+#ifndef INSN_BIG_ENDIAN
#define INSN_BIG_ENDIAN (target_big_endian \
+ || default_arch_type == sparc86x \
|| SPARC_OPCODE_ARCH_V9_P (max_architecture))
+#endif
/* handle of the OPCODE hash table */
static struct hash_control *op_hash;
@@ -186,30 +195,38 @@ static void output_insn
for this use. That table is for opcodes only. This table is for opcodes
and file formats. */
+enum sparc_arch_types {v6, v7, v8, sparclet, sparclite, sparc86x, v8plus,
+ v8plusa, v9, v9a, v9_64};
+
static struct sparc_arch {
char *name;
char *opcode_arch;
+ enum sparc_arch_types arch_type;
/* Default word size, as specified during configuration.
A value of zero means can't be used to specify default architecture. */
int default_arch_size;
/* Allowable arg to -A? */
int user_option_p;
} sparc_arch_table[] = {
- { "v6", "v6", 0, 1 },
- { "v7", "v7", 0, 1 },
- { "v8", "v8", 32, 1 },
- { "sparclet", "sparclet", 32, 1 },
- { "sparclite", "sparclite", 32, 1 },
- { "v8plus", "v9", 0, 1 },
- { "v8plusa", "v9a", 0, 1 },
- { "v9", "v9", 0, 1 },
- { "v9a", "v9a", 0, 1 },
+ { "v6", "v6", v6, 0, 1 },
+ { "v7", "v7", v7, 0, 1 },
+ { "v8", "v8", v8, 32, 1 },
+ { "sparclet", "sparclet", sparclet, 32, 1 },
+ { "sparclite", "sparclite", sparclite, 32, 1 },
+ { "sparc86x", "sparclite", sparc86x, 32, 1 },
+ { "v8plus", "v9", v9, 0, 1 },
+ { "v8plusa", "v9a", v9, 0, 1 },
+ { "v9", "v9", v9, 0, 1 },
+ { "v9a", "v9a", v9, 0, 1 },
/* This exists to allow configure.in/Makefile.in to pass one
value to specify both the default machine and default word size. */
- { "v9-64", "v9", 64, 0 },
- { NULL, NULL, 0 }
+ { "v9-64", "v9", v9, 64, 0 },
+ { NULL, NULL, v8, 0, 0 }
};
+/* Variant of default_arch */
+static enum sparc_arch_types default_arch_type;
+
static struct sparc_arch *
lookup_arch (name)
char *name;
@@ -234,13 +251,14 @@ init_default_arch ()
if (sa == NULL
|| sa->default_arch_size == 0)
- as_fatal ("Invalid default architecture, broken assembler.");
+ as_fatal (_("Invalid default architecture, broken assembler."));
max_architecture = sparc_opcode_lookup_arch (sa->opcode_arch);
if (max_architecture == SPARC_OPCODE_ARCH_BAD)
- as_fatal ("Bad opcode table, broken assembler.");
+ as_fatal (_("Bad opcode table, broken assembler."));
default_arch_size = sparc_arch_size = sa->default_arch_size;
default_init_p = 1;
+ default_arch_type = sa->arch_type;
}
/* Called by TARGET_FORMAT. */
@@ -397,7 +415,7 @@ md_parse_option (c, arg)
if (strcmp (arg, "v8plus") != 0
&& strcmp (arg, "v8plusa") != 0)
{
- as_bad ("invalid architecture -xarch=%s", arg);
+ as_bad (_("invalid architecture -xarch=%s"), arg);
return 0;
}
@@ -412,13 +430,13 @@ md_parse_option (c, arg)
if (sa == NULL
|| ! sa->user_option_p)
{
- as_bad ("invalid architecture -A%s", arg);
+ as_bad (_("invalid architecture -A%s"), arg);
return 0;
}
opcode_arch = sparc_opcode_lookup_arch (sa->opcode_arch);
if (opcode_arch == SPARC_OPCODE_ARCH_BAD)
- as_fatal ("Bad opcode table, broken assembler.");
+ as_fatal (_("Bad opcode table, broken assembler."));
max_architecture = opcode_arch;
architecture_requested = 1;
@@ -436,6 +454,10 @@ md_parse_option (c, arg)
#ifdef SPARC_BIENDIAN
case OPTION_LITTLE_ENDIAN:
target_big_endian = 0;
+ if (default_arch_type != sparc86x
+ && default_arch_type != sparclet
+ && default_arch_type != v9)
+ as_fatal ("This target does not support -EL");
break;
case OPTION_BIG_ENDIAN:
target_big_endian = 1;
@@ -470,7 +492,7 @@ md_parse_option (c, arg)
}
}
if (*l == NULL)
- as_fatal ("No compiled in support for %d bit object file format",
+ as_fatal (_("No compiled in support for %d bit object file format"),
sparc_arch_size);
free (list);
}
@@ -507,7 +529,7 @@ md_parse_option (c, arg)
case 'K':
if (strcmp (arg, "PIC") != 0)
- as_warn ("Unrecognized option following -K");
+ as_warn (_("Unrecognized option following -K"));
else
sparc_pic_code = 1;
break;
@@ -531,7 +553,7 @@ md_show_usage (stream)
if (! default_init_p)
init_default_arch ();
- fprintf(stream, "SPARC options:\n");
+ fprintf(stream, _("SPARC options:\n"));
for (arch = &sparc_arch_table[0]; arch->name; arch++)
{
if (arch != &sparc_arch_table[0])
@@ -539,39 +561,39 @@ md_show_usage (stream)
if (arch->user_option_p)
fprintf (stream, "-A%s", arch->name);
}
- fprintf (stream, "\n-xarch=v8plus | -xarch=v8plusa\n");
- fprintf (stream, "\
+ fprintf (stream, _("\n-xarch=v8plus | -xarch=v8plusa\n"));
+ fprintf (stream, _("\
specify variant of SPARC architecture\n\
-bump warn when assembler switches architectures\n\
-sparc ignored\n\
---enforce-aligned-data force .long, etc., to be aligned correctly\n");
+--enforce-aligned-data force .long, etc., to be aligned correctly\n"));
#ifdef OBJ_AOUT
- fprintf (stream, "\
--k generate PIC\n");
+ fprintf (stream, _("\
+-k generate PIC\n"));
#endif
#ifdef OBJ_ELF
- fprintf (stream, "\
+ fprintf (stream, _("\
-32 create 32 bit object file\n\
--64 create 64 bit object file\n");
- fprintf (stream, "\
- [default is %d]\n", default_arch_size);
- fprintf (stream, "\
+-64 create 64 bit object file\n"));
+ fprintf (stream, _("\
+ [default is %d]\n"), default_arch_size);
+ fprintf (stream, _("\
-TSO use Total Store Ordering\n\
-PSO use Partial Store Ordering\n\
--RMO use Relaxed Memory Ordering\n");
- fprintf (stream, "\
- [default is %s]\n", (default_arch_size == 64) ? "RMO" : "TSO");
- fprintf (stream, "\
+-RMO use Relaxed Memory Ordering\n"));
+ fprintf (stream, _("\
+ [default is %s]\n"), (default_arch_size == 64) ? "RMO" : "TSO");
+ fprintf (stream, _("\
-KPIC generate PIC\n\
-V print assembler version number\n\
-q ignored\n\
-Qy, -Qn ignored\n\
--s ignored\n");
+-s ignored\n"));
#endif
#ifdef SPARC_BIENDIAN
- fprintf (stream, "\
+ fprintf (stream, _("\
-EL generate code for a little endian machine\n\
--EB generate code for a big endian machine\n");
+-EB generate code for a big endian machine\n"));
#endif
}
@@ -649,13 +671,13 @@ md_begin ()
op_hash = hash_new ();
- while (i < sparc_num_opcodes)
+ while (i < (unsigned int) sparc_num_opcodes)
{
const char *name = sparc_opcodes[i].name;
retval = hash_insert (op_hash, name, (PTR) &sparc_opcodes[i]);
if (retval != NULL)
{
- fprintf (stderr, "internal error: can't hash `%s': %s\n",
+ fprintf (stderr, _("internal error: can't hash `%s': %s\n"),
sparc_opcodes[i].name, retval);
lose = 1;
}
@@ -663,18 +685,18 @@ md_begin ()
{
if (sparc_opcodes[i].match & sparc_opcodes[i].lose)
{
- fprintf (stderr, "internal error: losing opcode: `%s' \"%s\"\n",
+ fprintf (stderr, _("internal error: losing opcode: `%s' \"%s\"\n"),
sparc_opcodes[i].name, sparc_opcodes[i].args);
lose = 1;
}
++i;
}
- while (i < sparc_num_opcodes
+ while (i < (unsigned int) sparc_num_opcodes
&& !strcmp (sparc_opcodes[i].name, name));
}
if (lose)
- as_fatal ("Broken assembler. No assembly attempted.");
+ as_fatal (_("Broken assembler. No assembly attempted."));
for (i = '0'; i < '8'; ++i)
octal[i] = 1;
@@ -806,7 +828,7 @@ BSR (val, amount)
int amount;
{
if (sizeof (bfd_vma) <= 4 && amount >= 32)
- as_fatal ("Support for 64-bit arithmetic not compiled in.");
+ as_fatal (_("Support for 64-bit arithmetic not compiled in."));
return val >> amount;
}
@@ -861,7 +883,7 @@ md_assemble (str)
F_{UNBR,CONDBR,FBR} set is annullable. */
&& ((last_insn->flags & (F_UNBR | F_CONDBR | F_FBR)) == 0
|| (last_opcode & ANNUL) == 0))
- as_warn ("FP branch in delay slot");
+ as_warn (_("FP branch in delay slot"));
/* SPARC before v9 requires a nop instruction between a floating
point instruction and a floating point branch. We insert one
@@ -877,7 +899,7 @@ md_assemble (str)
nop_insn.opcode = NOP_INSN;
nop_insn.reloc = BFD_RELOC_NONE;
output_insn (insn, &nop_insn);
- as_warn ("FP branch preceded by FP instruction; NOP inserted");
+ as_warn (_("FP branch preceded by FP instruction; NOP inserted"));
}
switch (special_case)
@@ -897,9 +919,9 @@ md_assemble (str)
&& the_insn.exp.X_op == O_constant)
{
if (the_insn.exp.X_add_number < 0)
- as_warn ("set: used with negative number");
- else if (the_insn.exp.X_add_number > 0xffffffff)
- as_warn ("set: number larger than 4294967295");
+ as_warn (_("set: used with negative number"));
+ else if (the_insn.exp.X_add_number > (offsetT) 0xffffffff)
+ as_warn (_("set: number larger than 4294967295"));
}
/* See if operand is absolute and small; skip sethi if so. */
@@ -950,7 +972,7 @@ md_assemble (str)
/* The tmp reg should not be the dst reg. */
if (tmpreg == dstreg)
- as_warn ("setx: temporary register same as destination register");
+ as_warn (_("setx: temporary register same as destination register"));
/* Reset X_add_number, we've extracted it as upper32/lower32.
Otherwise fixup_segment will complain about not being able to
@@ -1095,7 +1117,7 @@ md_assemble (str)
}
default:
- as_fatal ("failed special case insn sanity check");
+ as_fatal (_("failed special case insn sanity check"));
}
}
@@ -1118,7 +1140,7 @@ sparc_ip (str, pinsn)
int comma = 0;
int v9_arg_p;
- for (s = str; islower (*s) || (*s >= '0' && *s <= '3'); ++s)
+ for (s = str; islower ((unsigned char) *s) || (*s >= '0' && *s <= '3'); ++s)
;
switch (*s)
@@ -1136,13 +1158,13 @@ sparc_ip (str, pinsn)
break;
default:
- as_fatal ("Unknown opcode: `%s'", str);
+ as_fatal (_("Unknown opcode: `%s'"), str);
}
insn = (struct sparc_opcode *) hash_find (op_hash, str);
*pinsn = insn;
if (insn == NULL)
{
- as_bad ("Unknown opcode: `%s'", str);
+ as_bad (_("Unknown opcode: `%s'"), str);
return;
}
if (comma)
@@ -1180,7 +1202,7 @@ sparc_ip (str, pinsn)
if (! parse_keyword_arg (sparc_encode_membar, &s,
&mask))
{
- error_message = ": invalid membar mask name";
+ error_message = _(": invalid membar mask name");
goto error;
}
kmask |= mask;
@@ -1194,12 +1216,12 @@ sparc_ip (str, pinsn)
{
if (! parse_const_expr_arg (&s, &kmask))
{
- error_message = ": invalid membar mask expression";
+ error_message = _(": invalid membar mask expression");
goto error;
}
if (kmask < 0 || kmask > 127)
{
- error_message = ": invalid membar mask number";
+ error_message = _(": invalid membar mask number");
goto error;
}
}
@@ -1217,7 +1239,7 @@ sparc_ip (str, pinsn)
{
if (! parse_keyword_arg (sparc_encode_prefetch, &s, &fcn))
{
- error_message = ": invalid prefetch function name";
+ error_message = _(": invalid prefetch function name");
goto error;
}
}
@@ -1225,12 +1247,12 @@ sparc_ip (str, pinsn)
{
if (! parse_const_expr_arg (&s, &fcn))
{
- error_message = ": invalid prefetch function expression";
+ error_message = _(": invalid prefetch function expression");
goto error;
}
if (fcn < 0 || fcn > 31)
{
- error_message = ": invalid prefetch function number";
+ error_message = _(": invalid prefetch function number");
goto error;
}
}
@@ -1258,7 +1280,7 @@ sparc_ip (str, pinsn)
}
if (p->name[0] != s[0])
{
- error_message = ": unrecognizable privileged register";
+ error_message = _(": unrecognizable privileged register");
goto error;
}
if (*args == '?')
@@ -1270,7 +1292,7 @@ sparc_ip (str, pinsn)
}
else
{
- error_message = ": unrecognizable privileged register";
+ error_message = _(": unrecognizable privileged register");
goto error;
}
@@ -1294,12 +1316,12 @@ sparc_ip (str, pinsn)
}
if (p->name[0] != s[0])
{
- error_message = ": unrecognizable v9a ancillary state register";
+ error_message = _(": unrecognizable v9a ancillary state register");
goto error;
}
if (*args == '/' && (p->regnum == 20 || p->regnum == 21))
{
- error_message = ": rd on write only ancillary state register";
+ error_message = _(": rd on write only ancillary state register");
goto error;
}
if (*args == '/')
@@ -1311,7 +1333,7 @@ sparc_ip (str, pinsn)
}
else
{
- error_message = ": unrecognizable v9a ancillary state register";
+ error_message = _(": unrecognizable v9a ancillary state register");
goto error;
}
@@ -1321,11 +1343,11 @@ sparc_ip (str, pinsn)
{
s += 4;
- if (isdigit (*s))
+ if (isdigit ((unsigned char) *s))
{
long num = 0;
- while (isdigit (*s))
+ while (isdigit ((unsigned char) *s))
{
num = num * 10 + *s - '0';
++s;
@@ -1335,7 +1357,7 @@ sparc_ip (str, pinsn)
{
if (num < 16 || 31 < num)
{
- error_message = ": asr number must be between 16 and 31";
+ error_message = _(": asr number must be between 16 and 31");
goto error;
}
}
@@ -1343,7 +1365,7 @@ sparc_ip (str, pinsn)
{
if (num < 0 || 31 < num)
{
- error_message = ": asr number must be between 0 and 31";
+ error_message = _(": asr number must be between 0 and 31");
goto error;
}
}
@@ -1353,7 +1375,7 @@ sparc_ip (str, pinsn)
}
else
{
- error_message = ": expecting %asrN";
+ error_message = _(": expecting %asrN");
goto error;
}
} /* if %asr */
@@ -1529,9 +1551,9 @@ sparc_ip (str, pinsn)
break;
case '#': /* must be at least one digit */
- if (isdigit (*s++))
+ if (isdigit ((unsigned char) *s++))
{
- while (isdigit (*s))
+ while (isdigit ((unsigned char) *s))
{
++s;
}
@@ -1550,10 +1572,10 @@ sparc_ip (str, pinsn)
case 'b': /* next operand is a coprocessor register */
case 'c':
case 'D':
- if (*s++ == '%' && *s++ == 'c' && isdigit (*s))
+ if (*s++ == '%' && *s++ == 'c' && isdigit ((unsigned char) *s))
{
mask = *s++;
- if (isdigit (*s))
+ if (isdigit ((unsigned char) *s))
{
mask = 10 * (mask - '0') + (*s++ - '0');
if (mask >= 32)
@@ -1642,7 +1664,7 @@ sparc_ip (str, pinsn)
goto error;
case 'r': /* any register */
- if (!isdigit (c = *s++))
+ if (!isdigit ((unsigned char) (c = *s++)))
{
goto error;
}
@@ -1657,7 +1679,7 @@ sparc_ip (str, pinsn)
case '7':
case '8':
case '9':
- if (isdigit (*s))
+ if (isdigit ((unsigned char) *s))
{
if ((c = 10 * (c - '0') + (*s++ - '0')) >= 32)
{
@@ -1718,9 +1740,9 @@ sparc_ip (str, pinsn)
if (*s++ == '%'
&& ((format = *s) == 'f')
- && isdigit (*++s))
+ && isdigit ((unsigned char) *++s))
{
- for (mask = 0; isdigit (*s); ++s)
+ for (mask = 0; isdigit ((unsigned char) *s); ++s)
{
mask = 10 * mask + (*s - '0');
} /* read the number */
@@ -1744,9 +1766,9 @@ sparc_ip (str, pinsn)
if (mask >= 64)
{
if (SPARC_OPCODE_ARCH_V9_P (max_architecture))
- error_message = ": There are only 64 f registers; [0-63]";
+ error_message = _(": There are only 64 f registers; [0-63]");
else
- error_message = ": There are only 32 f registers; [0-31]";
+ error_message = _(": There are only 32 f registers; [0-31]");
goto error;
} /* on error */
else if (mask >= 32)
@@ -1758,7 +1780,7 @@ sparc_ip (str, pinsn)
}
else
{
- error_message = ": There are only 32 f registers; [0-31]";
+ error_message = _(": There are only 32 f registers; [0-31]");
goto error;
}
}
@@ -1891,7 +1913,7 @@ sparc_ip (str, pinsn)
for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++) ;
- if (s1 != s && isdigit (s1[-1]))
+ if (s1 != s && isdigit ((unsigned char) s1[-1]))
{
if (s1[-2] == '%' && s1[-3] == '+')
{
@@ -1927,7 +1949,7 @@ sparc_ip (str, pinsn)
&& the_insn.reloc == BFD_RELOC_32_PCREL_S2
&& in_signed_range (the_insn.exp.X_add_number, 0x3fff))
{
- error_message = ": PC-relative operand can't be a constant";
+ error_message = _(": PC-relative operand can't be a constant");
goto error;
}
@@ -1960,7 +1982,7 @@ sparc_ip (str, pinsn)
{
if (! parse_keyword_arg (sparc_encode_asi, &s, &asi))
{
- error_message = ": invalid ASI name";
+ error_message = _(": invalid ASI name");
goto error;
}
}
@@ -1968,12 +1990,12 @@ sparc_ip (str, pinsn)
{
if (! parse_const_expr_arg (&s, &asi))
{
- error_message = ": invalid ASI expression";
+ error_message = _(": invalid ASI expression");
goto error;
}
if (asi < 0 || asi > 255)
{
- error_message = ": invalid ASI number";
+ error_message = _(": invalid ASI number");
goto error;
}
}
@@ -2070,12 +2092,12 @@ sparc_ip (str, pinsn)
{
int n = e.X_add_number;
if (n != e.X_add_number || (n & ~0x1ff) != 0)
- as_bad ("OPF immediate operand out of range (0-0x1ff)");
+ as_bad (_("OPF immediate operand out of range (0-0x1ff)"));
else
opcode |= e.X_add_number << 5;
}
else
- as_bad ("non-immediate OPF operand, ignored");
+ as_bad (_("non-immediate OPF operand, ignored"));
s = input_line_pointer;
input_line_pointer = push;
continue;
@@ -2094,7 +2116,7 @@ sparc_ip (str, pinsn)
int cpreg;
if (! parse_keyword_arg (sparc_encode_sparclet_cpreg, &s, &cpreg))
{
- error_message = ": invalid cpreg name";
+ error_message = _(": invalid cpreg name");
goto error;
}
opcode |= (*args == 'U' ? RS1 (cpreg) : RD (cpreg));
@@ -2102,7 +2124,7 @@ sparc_ip (str, pinsn)
}
default:
- as_fatal ("failed sanity check.");
+ as_fatal (_("failed sanity check."));
} /* switch on arg code */
/* Break out of for() loop. */
@@ -2113,7 +2135,7 @@ sparc_ip (str, pinsn)
if (match == 0)
{
/* Args don't match. */
- if (((unsigned) (&insn[1] - sparc_opcodes)) < sparc_num_opcodes
+ if (&insn[1] - sparc_opcodes < sparc_num_opcodes
&& (insn->name == insn[1].name
|| !strcmp (insn->name, insn[1].name)))
{
@@ -2123,7 +2145,7 @@ sparc_ip (str, pinsn)
}
else
{
- as_bad ("Illegal operands%s", error_message);
+ as_bad (_("Illegal operands%s"), error_message);
return;
}
}
@@ -2152,7 +2174,7 @@ sparc_ip (str, pinsn)
if (warn_on_bump
&& needed_architecture > warn_after_architecture)
{
- as_warn ("architecture bumped from \"%s\" to \"%s\" on \"%s\"",
+ as_warn (_("architecture bumped from \"%s\" to \"%s\" on \"%s\""),
sparc_opcode_archs[current_architecture].name,
sparc_opcode_archs[needed_architecture].name,
str);
@@ -2188,8 +2210,8 @@ sparc_ip (str, pinsn)
++arch;
}
- as_bad ("Architecture mismatch on \"%s\".", str);
- as_tsktsk (" (Requires %s; requested architecture is %s.)",
+ as_bad (_("Architecture mismatch on \"%s\"."), str);
+ as_tsktsk (_(" (Requires %s; requested architecture is %s.)"),
required_archs,
sparc_opcode_archs[max_architecture].name);
return;
@@ -2217,7 +2239,9 @@ parse_keyword_arg (lookup_fn, input_pointerP, valueP)
char c, *p, *q;
p = *input_pointerP;
- for (q = p + (*p == '#' || *p == '%'); isalnum (*q) || *q == '_'; ++q)
+ for (q = p + (*p == '#' || *p == '%');
+ isalnum ((unsigned char) *q) || *q == '_';
+ ++q)
continue;
c = *q;
*q = 0;
@@ -2281,7 +2305,7 @@ get_expression (str)
&& seg != bss_section
&& seg != undefined_section)
{
- the_insn.error = "bad segment";
+ the_insn.error = _("bad segment");
expr_end = input_line_pointer;
input_line_pointer = save_in;
return 1;
@@ -2376,7 +2400,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "Bad call to MD_ATOF()";
+ return _("Bad call to MD_ATOF()");
}
t = atof_ieee (input_line_pointer, type, words);
@@ -2533,31 +2557,36 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_SPARC_11:
if (! in_signed_range (val, 0x7ff))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
insn |= val & 0x7ff;
break;
case BFD_RELOC_SPARC_10:
if (! in_signed_range (val, 0x3ff))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
insn |= val & 0x3ff;
break;
case BFD_RELOC_SPARC_7:
if (! in_bitfield_range (val, 0x7f))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
insn |= val & 0x7f;
break;
case BFD_RELOC_SPARC_6:
if (! in_bitfield_range (val, 0x3f))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
insn |= val & 0x3f;
break;
case BFD_RELOC_SPARC_5:
if (! in_bitfield_range (val, 0x1f))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
insn |= val & 0x1f;
break;
@@ -2565,7 +2594,8 @@ md_apply_fix3 (fixP, value, segment)
/* FIXME: simplify */
if (((val > 0) && (val & ~0x3fffc))
|| ((val < 0) && (~(val - 1) & ~0x3fffc)))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
/* FIXME: The +1 deserves a comment. */
val = (val >> 2) + 1;
insn |= ((val & 0xc000) << 6) | (val & 0x3fff);
@@ -2575,7 +2605,8 @@ md_apply_fix3 (fixP, value, segment)
/* FIXME: simplify */
if (((val > 0) && (val & ~0x1ffffc))
|| ((val < 0) && (~(val - 1) & ~0x1ffffc)))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
/* FIXME: The +1 deserves a comment. */
val = (val >> 2) + 1;
insn |= val & 0x7ffff;
@@ -2600,7 +2631,8 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_SPARC22:
if (val & ~0x003fffff)
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
insn |= (val & 0x3fffff);
break;
@@ -2622,7 +2654,8 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_SPARC13:
if (! in_signed_range (val, 0x1fff))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
insn |= val & 0x1fff;
break;
@@ -2668,7 +2701,7 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_NONE:
default:
as_bad_where (fixP->fx_file, fixP->fx_line,
- "bad or unhandled relocation type: 0x%02x",
+ _("bad or unhandled relocation type: 0x%02x"),
fixP->fx_r_type);
break;
}
@@ -2734,6 +2767,7 @@ tc_gen_reloc (section, fixp)
break;
default:
abort ();
+ return NULL;
}
#if defined (OBJ_ELF) || defined (OBJ_AOUT)
@@ -2784,7 +2818,7 @@ tc_gen_reloc (section, fixp)
if (reloc->howto == 0)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "internal error: can't export reloc type %d (`%s')",
+ _("internal error: can't export reloc type %d (`%s')"),
fixp->fx_r_type, bfd_get_reloc_code_name (code));
return 0;
}
@@ -2893,7 +2927,7 @@ s_reserve (ignore)
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after name");
+ as_bad (_("Expected comma after name"));
ignore_rest_of_line ();
return;
}
@@ -2902,7 +2936,7 @@ s_reserve (ignore)
if ((size = get_absolute_expression ()) < 0)
{
- as_bad ("BSS length (%d.) <0! Ignored.", size);
+ as_bad (_("BSS length (%d.) <0! Ignored."), size);
ignore_rest_of_line ();
return;
} /* bad length */
@@ -2914,7 +2948,7 @@ s_reserve (ignore)
if (strncmp (input_line_pointer, ",\"bss\"", 6) != 0
&& strncmp (input_line_pointer, ",\".bss\"", 7) != 0)
{
- as_bad ("bad .reserve segment -- expected BSS segment");
+ as_bad (_("bad .reserve segment -- expected BSS segment"));
return;
}
@@ -2931,7 +2965,7 @@ s_reserve (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer == '\n')
{
- as_bad ("Missing alignment");
+ as_bad (_("Missing alignment"));
return;
}
@@ -2940,13 +2974,13 @@ s_reserve (ignore)
if (align > max_alignment)
{
align = max_alignment;
- as_warn ("Alignment too large: %d. assumed.", align);
+ as_warn (_("Alignment too large: %d. assumed."), align);
}
#endif
if (align < 0)
{
align = 0;
- as_warn ("Alignment negative. 0 assumed.");
+ as_warn (_("Alignment negative. 0 assumed."));
}
record_alignment (bss_section, align);
@@ -2956,7 +2990,7 @@ s_reserve (ignore)
if (align != 1)
{
- as_bad ("Alignment not a power of 2");
+ as_bad (_("Alignment not a power of 2"));
ignore_rest_of_line ();
return;
} /* not a power of two */
@@ -3025,14 +3059,14 @@ s_common (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after symbol-name");
+ as_bad (_("Expected comma after symbol-name"));
ignore_rest_of_line ();
return;
}
input_line_pointer++; /* skip ',' */
if ((temp = get_absolute_expression ()) < 0)
{
- as_bad (".COMMon length (%d.) <0! Ignored.", temp);
+ as_bad (_(".COMMon length (%d.) <0! Ignored."), temp);
ignore_rest_of_line ();
return;
}
@@ -3042,15 +3076,15 @@ s_common (ignore)
*p = c;
if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
{
- as_bad ("Ignoring attempt to re-define symbol");
+ as_bad (_("Ignoring attempt to re-define symbol"));
ignore_rest_of_line ();
return;
}
if (S_GET_VALUE (symbolP) != 0)
{
- if (S_GET_VALUE (symbolP) != size)
+ if (S_GET_VALUE (symbolP) != (valueT) size)
{
- as_warn ("Length of .comm \"%s\" is already %ld. Not changed to %d.",
+ as_warn (_("Length of .comm \"%s\" is already %ld. Not changed to %d."),
S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), size);
}
}
@@ -3064,7 +3098,7 @@ s_common (ignore)
know (symbolP->sy_frag == &zero_address_frag);
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after common length");
+ as_bad (_("Expected comma after common length"));
ignore_rest_of_line ();
return;
}
@@ -3077,13 +3111,13 @@ s_common (ignore)
if (temp > max_alignment)
{
temp = max_alignment;
- as_warn ("Common alignment too large: %d. assumed", temp);
+ as_warn (_("Common alignment too large: %d. assumed"), temp);
}
#endif
if (temp < 0)
{
temp = 0;
- as_warn ("Common alignment negative; 0 assumed");
+ as_warn (_("Common alignment negative; 0 assumed"));
}
#ifdef OBJ_ELF
if (symbolP->local)
@@ -3156,7 +3190,7 @@ s_common (ignore)
p++;
c = *p;
*p = '\0';
- as_bad ("bad .common segment %s", input_line_pointer + 1);
+ as_bad (_("bad .common segment %s"), input_line_pointer + 1);
*p = c;
input_line_pointer = p;
ignore_rest_of_line ();
@@ -3208,7 +3242,7 @@ s_seg (ignore)
subseg_set (data_section, 255); /* FIXME-SOMEDAY */
return;
}
- as_bad ("Unknown segment type");
+ as_bad (_("Unknown segment type"));
demand_empty_rest_of_line ();
}
@@ -3290,7 +3324,7 @@ sparc_cons_align (nbytes)
if (now_seg == absolute_section)
{
if ((abs_section_offset & ((1 << nalign) - 1)) != 0)
- as_bad ("misaligned data");
+ as_bad (_("misaligned data"));
return;
}
@@ -3309,7 +3343,7 @@ sparc_handle_align (fragp)
{
if (fragp->fr_type == rs_align_code && !fragp->fr_subtype
&& fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix != 0)
- as_bad_where (fragp->fr_file, fragp->fr_line, "misaligned data");
+ as_bad_where (fragp->fr_file, fragp->fr_line, _("misaligned data"));
if (fragp->fr_type == rs_align_code && fragp->fr_subtype == 1024)
{
int count = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix;
diff --git a/gas/config/tc-sparc.h b/gas/config/tc-sparc.h
index 5b731a0..e4e3ad2 100644
--- a/gas/config/tc-sparc.h
+++ b/gas/config/tc-sparc.h
@@ -1,5 +1,5 @@
/* tc-sparc.h - Macros and type defines for the sparc.
- Copyright (C) 1989, 90-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989, 90-96, 97, 1998 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -35,19 +35,23 @@ struct frag;
extern const char *sparc_target_format PARAMS ((void));
#define TARGET_FORMAT sparc_target_format ()
+#if 0
#ifdef TE_SPARCAOUT
/* Bi-endian support may eventually be unconditional, but until things are
working well it's only provided for targets that need it. */
#define SPARC_BIENDIAN
#endif
+#endif
+/* Make it unconditional and check if -EL is valid after option parsing */
+#define SPARC_BIENDIAN
#define WORKING_DOT_WORD
-#define md_convert_frag(b,s,f) {as_fatal ("sparc convert_frag\n");}
-#define md_create_long_jump(p,f,t,fr,s) as_fatal("sparc_create_long_jump")
-#define md_create_short_jump(p,f,t,fr,s) as_fatal("sparc_create_short_jump")
+#define md_convert_frag(b,s,f) {as_fatal (_("sparc convert_frag\n"));}
+#define md_create_long_jump(p,f,t,fr,s) as_fatal(_("sparc_create_long_jump"))
+#define md_create_short_jump(p,f,t,fr,s) as_fatal(_("sparc_create_short_jump"))
#define md_estimate_size_before_relax(f,s) \
- (as_fatal("estimate_size_before_relax called"),1)
+ (as_fatal(_("estimate_size_before_relax called")),1)
#define LISTING_HEADER "SPARC GAS "
diff --git a/gas/config/tc-tahoe.c b/gas/config/tc-tahoe.c
index eef0113..2bd63ca 100644
--- a/gas/config/tc-tahoe.c
+++ b/gas/config/tc-tahoe.c
@@ -384,27 +384,27 @@ md_parse_option (c, arg)
switch (c)
{
case 'a':
- as_warn ("The -a option doesn't exist. (Despite what the man page says!");
+ as_warn (_("The -a option doesn't exist. (Despite what the man page says!"));
break;
case 'd':
- as_warn ("Displacement length %s ignored!", arg);
+ as_warn (_("Displacement length %s ignored!"), arg);
break;
case 'S':
- as_warn ("SYMBOL TABLE not implemented");
+ as_warn (_("SYMBOL TABLE not implemented"));
break;
case 'T':
- as_warn ("TOKEN TRACE not implemented");
+ as_warn (_("TOKEN TRACE not implemented"));
break;
case 't':
- as_warn ("I don't need or use temp. file \"%s\".", arg);
+ as_warn (_("I don't need or use temp. file \"%s\"."), arg);
break;
case 'V':
- as_warn ("I don't use an interpass file! -V ignored");
+ as_warn (_("I don't use an interpass file! -V ignored"));
break;
default:
@@ -418,7 +418,7 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf(stream, "\
+ fprintf(stream, _("\
Tahoe options:\n\
-a ignored\n\
-d LENGTH ignored\n\
@@ -426,7 +426,7 @@ Tahoe options:\n\
-S ignored\n\
-t FILE ignored\n\
-T ignored\n\
--V ignored\n");
+-V ignored\n"));
}
/* The functions in this section take numbers in the machine format, and
@@ -1072,7 +1072,7 @@ tip_op (optex, topP)
case 'l':
case 'L':
if (com_width)
- as_warn ("Casting a branch displacement is bad form, and is ignored.");
+ as_warn (_("Casting a branch displacement is bad form, and is ignored."));
else
{
c = (isupper (*point) ? tolower (*point) : *point);
@@ -1128,13 +1128,13 @@ tip_op (optex, topP)
}
if (ndx == -1)
{
- op_bad = "Couldn't parse the [index] in this operand.";
+ op_bad = _("Couldn't parse the [index] in this operand.");
end = point; /* Force all the rest of the tests to fail. */
}
}
else
{
- op_bad = "Couldn't find the opening '[' for the index of this operand.";
+ op_bad = _("Couldn't find the opening '[' for the index of this operand.");
end = point; /* Force all the rest of the tests to fail. */
}
}
@@ -1174,7 +1174,7 @@ tip_op (optex, topP)
}
else
{
- op_bad = "Couldn't find the opening '(' for the deref of this operand.";
+ op_bad = _("Couldn't find the opening '(' for the deref of this operand.");
end = point; /* Force all the rest of the tests to fail. */
}
}
@@ -1184,7 +1184,7 @@ tip_op (optex, topP)
{
if (dec_inc != ' ')
{
- op_bad = "Operand can't be both pre-inc and post-dec.";
+ op_bad = _("Operand can't be both pre-inc and post-dec.");
end = point;
}
else
@@ -1214,7 +1214,7 @@ tip_op (optex, topP)
}
if (imreg != -1 && reg != -1)
- op_bad = "I parsed 2 registers in this operand.";
+ op_bad = _("I parsed 2 registers in this operand.");
/*
* Evaluate whats left of the expression to see if it's valid.
@@ -1264,19 +1264,19 @@ tip_op (optex, topP)
* then coding up a frag for this case will be easy.
*/
need_pass_2 = 1;
- op_bad = "Can't relocate expression error.";
+ op_bad = _("Can't relocate expression error.");
break;
case O_big:
/* This is an error. Tahoe doesn't allow any expressions
bigger that a 32 bit long word. Any bigger has to be referenced
by address. */
- op_bad = "Expression is too large for a 32 bits.";
+ op_bad = _("Expression is too large for a 32 bits.");
break;
}
if (*input_line_pointer != '\0')
{
- op_bad = "Junk at end of expression.";
+ op_bad = _("Junk at end of expression.");
}
}
@@ -1316,26 +1316,26 @@ tip_op (optex, topP)
mode = TAHOE_DIRECT_REG;
if (deferred || immediate || (dec_inc != ' ') ||
(reg != -1) || !really_none)
- op_bad = "Syntax error in direct register mode.";
+ op_bad = _("Syntax error in direct register mode.");
else if (ndx != -1)
- op_bad = "You can't index a register in direct register mode.";
+ op_bad = _("You can't index a register in direct register mode.");
else if (imreg == SP_REG && access == 'r')
op_bad =
- "SP can't be the source operand with direct register addressing.";
+ _("SP can't be the source operand with direct register addressing.");
else if (access == 'a')
- op_bad = "Can't take the address of a register.";
+ op_bad = _("Can't take the address of a register.");
else if (access == 'b')
- op_bad = "Direct Register can't be used in a branch.";
+ op_bad = _("Direct Register can't be used in a branch.");
else if (width == 'q' && ((imreg % 2) || (imreg > 13)))
- op_bad = "For quad access, the register must be even and < 14.";
+ op_bad = _("For quad access, the register must be even and < 14.");
else if (call_width)
- op_bad = "You can't cast a direct register.";
+ op_bad = _("You can't cast a direct register.");
if (*op_bad == '\0')
{
/* No errors, check for warnings */
if (width == 'q' && imreg == 12)
- as_warn ("Using reg 14 for quadwords can tromp the FP register.");
+ as_warn (_("Using reg 14 for quadwords can tromp the FP register."));
reg = imreg;
}
@@ -1347,49 +1347,49 @@ tip_op (optex, topP)
/* -(SP) */
mode = TAHOE_AUTO_DEC;
if (deferred || immediate || !really_none)
- op_bad = "Syntax error in auto-dec mode.";
+ op_bad = _("Syntax error in auto-dec mode.");
else if (ndx != -1)
- op_bad = "You can't have an index auto dec mode.";
+ op_bad = _("You can't have an index auto dec mode.");
else if (access == 'r')
- op_bad = "Auto dec mode cant be used for reading.";
+ op_bad = _("Auto dec mode cant be used for reading.");
else if (reg != SP_REG)
- op_bad = "Auto dec only works of the SP register.";
+ op_bad = _("Auto dec only works of the SP register.");
else if (access == 'b')
- op_bad = "Auto dec can't be used in a branch.";
+ op_bad = _("Auto dec can't be used in a branch.");
else if (width == 'q')
- op_bad = "Auto dec won't work with quadwords.";
+ op_bad = _("Auto dec won't work with quadwords.");
/* We know: imm = -1, dec_inc != '-' */
}
else if (dec_inc == '+')
{
if (immediate || !really_none)
- op_bad = "Syntax error in one of the auto-inc modes.";
+ op_bad = _("Syntax error in one of the auto-inc modes.");
else if (deferred)
{
/* *(SP)+ */
mode = TAHOE_AUTO_INC_DEFERRED;
if (reg != SP_REG)
- op_bad = "Auto inc deferred only works of the SP register.";
+ op_bad = _("Auto inc deferred only works of the SP register.");
else if (ndx != -1)
- op_bad = "You can't have an index auto inc deferred mode.";
+ op_bad = _("You can't have an index auto inc deferred mode.");
else if (access == 'b')
- op_bad = "Auto inc can't be used in a branch.";
+ op_bad = _("Auto inc can't be used in a branch.");
}
else
{
/* (SP)+ */
mode = TAHOE_AUTO_INC;
if (access == 'm' || access == 'w')
- op_bad = "You can't write to an auto inc register.";
+ op_bad = _("You can't write to an auto inc register.");
else if (reg != SP_REG)
- op_bad = "Auto inc only works of the SP register.";
+ op_bad = _("Auto inc only works of the SP register.");
else if (access == 'b')
- op_bad = "Auto inc can't be used in a branch.";
+ op_bad = _("Auto inc can't be used in a branch.");
else if (width == 'q')
- op_bad = "Auto inc won't work with quadwords.";
+ op_bad = _("Auto inc won't work with quadwords.");
else if (ndx != -1)
- op_bad = "You can't have an index in auto inc mode.";
+ op_bad = _("You can't have an index in auto inc mode.");
}
/* We know: imm = -1, dec_inc == ' ' */
@@ -1397,13 +1397,13 @@ tip_op (optex, topP)
else if (reg != -1)
{
if ((ndx != -1) && (reg == SP_REG))
- op_bad = "You can't index the sp register.";
+ op_bad = _("You can't index the sp register.");
if (deferred)
{
/* *<disp>(Rn) */
mode = TAHOE_REG_DISP_DEFERRED;
if (immediate)
- op_bad = "Syntax error in register displaced mode.";
+ op_bad = _("Syntax error in register displaced mode.");
}
else if (really_none)
{
@@ -1422,7 +1422,7 @@ tip_op (optex, topP)
else
{
if (really_none)
- op_bad = "An offest is needed for this operand.";
+ op_bad = _("An offest is needed for this operand.");
if (deferred && immediate)
{
/* *$<ADDR> */
@@ -1434,9 +1434,9 @@ tip_op (optex, topP)
/* $<disp> */
mode = TAHOE_IMMEDIATE;
if (ndx != -1)
- op_bad = "You can't index a register in immediate mode.";
+ op_bad = _("You can't index a register in immediate mode.");
if (access == 'a')
- op_bad = "Immediate access can't be used as an address.";
+ op_bad = _("Immediate access can't be used as an address.");
/* ponder the wisdom of a cast because it doesn't do any good. */
}
else if (deferred)
@@ -1502,7 +1502,7 @@ tip (titP, instring)
/* Operation-code is ended with whitespace. */
if (p == instring)
{
- titP->tit_error = "No operator";
+ titP->tit_error = _("No operator");
count = 0;
titP->tit_opcode = 0;
}
@@ -1519,7 +1519,7 @@ tip (titP, instring)
*p = c; /* Restore char after op-code. */
if (twP == 0)
{
- titP->tit_error = "Unknown operator";
+ titP->tit_error = _("Unknown operator");
count = 0;
titP->tit_opcode = 0;
}
@@ -1547,7 +1547,7 @@ tip (titP, instring)
* past any one ',' that marks the end of this operand.
*/
if (!p[1])
- as_fatal ("Compiler bug: ODD number of bytes in arg structure %s.",
+ as_fatal (_("Compiler bug: ODD number of bytes in arg structure %s."),
twP->args);
else if (*instring)
{
@@ -1574,7 +1574,7 @@ tip (titP, instring)
count++; /* won another argument, may have an operr */
}
else
- alloperr = "Not enough operands";
+ alloperr = _("Not enough operands");
}
/* Restore the pointer. */
input_line_pointer = save_input_line_pointer;
@@ -1584,7 +1584,7 @@ tip (titP, instring)
if (*instring == ' ')
instring++; /* Skip whitespace. */
if (*instring)
- alloperr = "Too many operands";
+ alloperr = _("Too many operands");
}
titP->tit_error = alloperr;
}
@@ -1635,7 +1635,7 @@ md_assemble (instruction_string)
*/
if (*t.tit_error)
{
- as_warn ("Ignoring statement due to \"%s\"", t.tit_error);
+ as_warn (_("Ignoring statement due to \"%s\""), t.tit_error);
}
else
{
@@ -1730,7 +1730,7 @@ md_assemble (instruction_string)
opcodeP);
break;
default:
- as_fatal ("Compliler bug: Got a case (%d) I wasn't expecting.",
+ as_fatal (_("Compliler bug: Got a case (%d) I wasn't expecting."),
operandP->top_width);
}
}
@@ -1824,10 +1824,10 @@ md_assemble (instruction_string)
break;
case 'b':
case 'w':
- as_warn ("Real branch displacements must be expressions.");
+ as_warn (_("Real branch displacements must be expressions."));
break;
default:
- as_fatal ("Complier error: I got an unknown synthetic branch :%c",
+ as_fatal (_("Complier error: I got an unknown synthetic branch :%c"),
operandP->top_width);
break;
}
@@ -1968,7 +1968,7 @@ md_assemble (instruction_string)
}
break;
default:
- as_fatal ("Barf, bad mode %x\n", operandP->top_mode);
+ as_fatal (_("Barf, bad mode %x\n"), operandP->top_mode);
}
}
} /* for(operandP) */
diff --git a/gas/config/tc-tic80.c b/gas/config/tc-tic80.c
index 4f83395..138260d 100644
--- a/gas/config/tc-tic80.c
+++ b/gas/config/tc-tic80.c
@@ -1,5 +1,5 @@
/* tc-tic80.c -- Assemble for the TI TMS320C80 (MV)
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -22,9 +22,9 @@
#include "opcode/tic80.h"
#define internal_error(what) \
- as_fatal("internal error:%s:%d: %s\n",__FILE__,__LINE__,what)
+ as_fatal(_("internal error:%s:%d: %s\n"),__FILE__,__LINE__,what)
#define internal_error_a(what,arg) \
- as_fatal("internal error:%s:%d: %s %d\n",__FILE__,__LINE__,what,arg)
+ as_fatal(_("internal error:%s:%d: %s %d\n"),__FILE__,__LINE__,what,arg)
/* Generic assembler global variables which must be defined by all targets. */
@@ -87,7 +87,7 @@ md_estimate_size_before_relax (fragP, segment_type)
fragS *fragP;
segT segment_type;
{
- internal_error ("Relaxation is a luxury we can't afford");
+ internal_error (_("Relaxation is a luxury we can't afford"));
return (-1);
}
@@ -138,7 +138,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "bad call to md_atof ()";
+ return _("bad call to md_atof ()");
}
t = atof_ieee (input_line_pointer, type, words);
@@ -242,7 +242,7 @@ get_operands (exp)
}
else
{
- as_bad ("':' not followed by 'm' or 's'");
+ as_bad (_("':' not followed by 'm' or 's'"));
}
numexp++;
continue;
@@ -256,7 +256,7 @@ get_operands (exp)
{
if (++parens != 1)
{
- as_bad ("paren nesting");
+ as_bad (_("paren nesting"));
}
p++;
continue;
@@ -271,7 +271,7 @@ get_operands (exp)
/* Record that we have left a paren group and continue */
if (--parens < 0)
{
- as_bad ("mismatched parenthesis");
+ as_bad (_("mismatched parenthesis"));
}
p++;
continue;
@@ -284,11 +284,11 @@ get_operands (exp)
if (exp[numexp].X_op == O_illegal)
{
- as_bad ("illegal operand");
+ as_bad (_("illegal operand"));
}
else if (exp[numexp].X_op == O_absent)
{
- as_bad ("missing operand");
+ as_bad (_("missing operand"));
}
numexp++;
@@ -464,7 +464,7 @@ find_opcode (opcode, myops)
case O_logical_or:
case O_max:
default:
- internal_error_a ("unhandled expression type", X_op);
+ internal_error_a (_("unhandled expression type"), X_op);
}
}
if (!match)
@@ -534,7 +534,7 @@ find_opcode (opcode, myops)
if (!match)
{
- as_bad ("bad opcode or operands");
+ as_bad (_("bad opcode or operands"));
return (0);
}
@@ -545,7 +545,7 @@ find_opcode (opcode, myops)
{
if ((tic80_operands[opcode->operands[i]].flags & TIC80_OPERAND_EVEN) &&
(myops[i].X_add_number & 1))
- as_fatal ("Register number must be EVEN");
+ as_fatal (_("Register number must be EVEN"));
if (myops[i].X_op == O_register)
{
if (!(tic80_operands[opcode->operands[i]].flags & TIC80_OPERAND_REG))
@@ -679,7 +679,7 @@ build_insn (opcode, opers)
}
else
{
- internal_error ("symbol reloc that is not PC relative or 32 bits");
+ internal_error (_("symbol reloc that is not PC relative or 32 bits"));
}
break;
case O_absent:
@@ -702,7 +702,7 @@ build_insn (opcode, opers)
}
else
{
- internal_error_a ("unhandled operand modifier", opers[expi].X_add_number);
+ internal_error_a (_("unhandled operand modifier"), opers[expi].X_add_number);
}
break;
case O_big:
@@ -743,7 +743,7 @@ build_insn (opcode, opers)
case O_logical_or:
case O_max:
default:
- internal_error_a ("unhandled expression", X_op);
+ internal_error_a (_("unhandled expression"), X_op);
break;
}
}
@@ -794,7 +794,7 @@ md_assemble (str)
/* Try to find this mnemonic in the hash table */
if ((opcode = (struct tic80_opcode *) hash_find (tic80_hash, str)) == NULL)
{
- as_bad ("Invalid mnemonic: '%s'", str);
+ as_bad (_("Invalid mnemonic: '%s'"), str);
return;
}
@@ -810,7 +810,7 @@ md_assemble (str)
opcode = find_opcode (opcode, myops);
if (opcode == NULL)
{
- as_bad ("Invalid operands: '%s'", input_line_save);
+ as_bad (_("Invalid operands: '%s'"), input_line_save);
}
input_line_pointer = input_line_save;
@@ -887,7 +887,7 @@ md_begin ()
valu = PDS_VALUE (pdsp) & ~TIC80_OPERAND_MASK;
break;
default:
- internal_error_a ("unhandled predefined symbol bits", symtype);
+ internal_error_a (_("unhandled predefined symbol bits"), symtype);
break;
}
symbol_table_insert (symbol_create (PDS_NAME (pdsp), segment, valu,
@@ -983,7 +983,7 @@ md_apply_fix (fixP, val)
if (overflow)
{
as_bad_where (fixP -> fx_file, fixP -> fx_line,
- "PC offset 0x%lx outside range 0x%lx-0x%lx",
+ _("PC offset 0x%lx outside range 0x%lx-0x%lx"),
val, -65536L, 65532L);
}
else
@@ -998,7 +998,7 @@ md_apply_fix (fixP, val)
md_number_to_chars (dest, (valueT) val, fixP -> fx_size);
break;
default:
- internal_error_a ("unhandled relocation type in fixup", fixP -> fx_r_type);
+ internal_error_a (_("unhandled relocation type in fixup"), fixP -> fx_r_type);
break;
}
}
@@ -1035,7 +1035,7 @@ md_convert_frag (headers, seg, fragP)
segT seg;
fragS *fragP;
{
- internal_error ("md_convert_frag() not implemented yet");
+ internal_error (_("md_convert_frag() not implemented yet"));
abort ();
}
diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c
index a778c6e..c363592 100644
--- a/gas/config/tc-v850.c
+++ b/gas/config/tc-v850.c
@@ -261,14 +261,14 @@ v850_comm (area)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after symbol-name");
+ as_bad (_("Expected comma after symbol-name"));
ignore_rest_of_line ();
return;
}
input_line_pointer++; /* skip ',' */
if ((temp = get_absolute_expression ()) < 0)
{
- as_bad (".COMMon length (%d.) <0! Ignored.", temp);
+ as_bad (_(".COMMon length (%d.) <0! Ignored."), temp);
ignore_rest_of_line ();
return;
}
@@ -278,7 +278,7 @@ v850_comm (area)
*p = c;
if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
{
- as_bad ("Ignoring attempt to re-define symbol");
+ as_bad (_("Ignoring attempt to re-define symbol"));
ignore_rest_of_line ();
return;
}
@@ -286,7 +286,7 @@ v850_comm (area)
{
if (S_GET_VALUE (symbolP) != size)
{
- as_warn ("Length of .comm \"%s\" is already %ld. Not changed to %d.",
+ as_warn (_("Length of .comm \"%s\" is already %ld. Not changed to %d."),
S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), size);
}
}
@@ -309,7 +309,7 @@ v850_comm (area)
if (temp < 0)
{
temp = 0;
- as_warn ("Common alignment negative; 0 assumed");
+ as_warn (_("Common alignment negative; 0 assumed"));
}
}
if (symbolP->local)
@@ -328,7 +328,7 @@ v850_comm (area)
for (align = 0; (temp & 1) == 0; temp >>= 1, ++align);
if (temp != 1)
{
- as_bad ("Common alignment not a power of 2");
+ as_bad (_("Common alignment not a power of 2"));
ignore_rest_of_line ();
return;
}
@@ -451,7 +451,7 @@ v850_comm (area)
p++;
c = *p;
*p = '\0';
- as_bad ("bad .common segment %s", input_line_pointer + 1);
+ as_bad (_("bad .common segment %s"), input_line_pointer + 1);
*p = c;
input_line_pointer = p;
ignore_rest_of_line ();
@@ -907,8 +907,8 @@ parse_register_list
case 0xfff8000f: regs = type2_regs; break;
case 0xfff8001f: regs = type3_regs; break;
default:
- as_bad ("unknown operand shift: %x\n", operand->shift );
- return "internal failure in parse_register_list";
+ as_bad (_("unknown operand shift: %x\n"), operand->shift );
+ return _("internal failure in parse_register_list");
}
skip_white_space();
@@ -1003,26 +1003,26 @@ parse_register_list
if (i == 32)
{
- return "illegal register included in list";
+ return _("illegal register included in list");
}
}
else if (system_register_name (& exp, true, true))
{
if (regs == type1_regs)
{
- return "system registers cannot be included in list";
+ return _("system registers cannot be included in list");
}
else if (exp.X_add_number == 5)
{
if (regs == type2_regs)
- return "PSW cannot be included in list";
+ return _("PSW cannot be included in list");
else
* insn |= 0x8;
}
else if (exp.X_add_number < 4)
* insn |= 0x80000;
else
- return "High value system registers cannot be included in list";
+ return _("High value system registers cannot be included in list");
}
else if (* input_line_pointer == '}')
{
@@ -1097,13 +1097,14 @@ void
md_show_usage (stream)
FILE * stream;
{
- fprintf (stream, "V850 options:\n");
- fprintf (stream, "\t-mwarn-signed-overflow Warn if signed immediate values overflow\n");
- fprintf (stream, "\t-mwarn-unsigned-overflow Warn if unsigned immediate values overflow\n");
- fprintf (stream, "\t-mv850 The code is targeted at the v850\n");
+ fprintf (stream, _("V850 options:\n"));
+ fprintf (stream, _("\t-mwarn-signed-overflow Warn if signed immediate values overflow\n"));
+ fprintf (stream, _("\t-mwarn-unsigned-overflow Warn if unsigned immediate values overflow\n"));
+ fprintf (stream, _("\t-mv850 The code is targeted at the v850\n"));
/* start-sanitize-v850e */
- fprintf (stream, "\t-mv850e The code is targeted at the v850e\n");
- fprintf (stream, "\t-mv850ea The code is targeted at the v850ea\n");
+ fprintf (stream, _("\t-mv850e The code is targeted at the v850e\n"));
+ fprintf (stream, _("\t-mv850ea The code is targeted at the v850ea\n"));
+ fprintf (stream, _("\t-mv850any The code is generic, despite any processor specific instructions\n"));
/* end-sanitize-v850e */
}
@@ -1142,6 +1143,11 @@ md_parse_option (c, arg)
machine = bfd_mach_v850ea;
processor_mask = PROCESSOR_V850EA;
}
+ else if (strcmp (arg, "v850any") == 0)
+ {
+ machine = 0; /* Tell the world that this is for any v850 chip. */
+ processor_mask = PROCESSOR_V850EA; /* But support instructions for the extended versions. */
+ }
/* end-sanitize-v850e */
else
{
@@ -1182,7 +1188,7 @@ md_atof (type, litp, sizep)
default:
*sizep = 0;
- return "bad call to md_atof";
+ return _("bad call to md_atof");
}
t = atof_ieee (input_line_pointer, type, words);
@@ -1300,7 +1306,7 @@ md_begin ()
processor_mask = PROCESSOR_V850;
}
else
- as_bad ("Unable to determine default target processor from string: %s",
+ as_bad (_("Unable to determine default target processor from string: %s"),
TARGET_CPU);
v850_hash = hash_new();
@@ -1381,7 +1387,7 @@ handle_ctoff (const struct v850_operand * operand)
if ( operand->bits != 6
|| operand->shift != 0)
{
- as_bad ("ctoff() relocation used on an instruction which does not support it");
+ as_bad (_("ctoff() relocation used on an instruction which does not support it"));
return BFD_RELOC_64; /* Used to indicate an error condition. */
}
@@ -1401,7 +1407,7 @@ handle_sdaoff (const struct v850_operand * operand)
if ( operand->bits != 16
|| operand->shift != 16)
{
- as_bad ("sdaoff() relocation used on an instruction which does not support it");
+ as_bad (_("sdaoff() relocation used on an instruction which does not support it"));
return BFD_RELOC_64; /* Used to indicate an error condition. */
}
@@ -1420,7 +1426,7 @@ handle_zdaoff (const struct v850_operand * operand)
if ( operand->bits != 16
|| operand->shift != 16)
{
- as_bad ("zdaoff() relocation used on an instruction which does not support it");
+ as_bad (_("zdaoff() relocation used on an instruction which does not support it"));
return BFD_RELOC_64; /* Used to indicate an error condition. */
}
@@ -1440,7 +1446,7 @@ handle_tdaoff (const struct v850_operand * operand)
if (operand->bits != 7)
{
- as_bad ("tdaoff() relocation used on an instruction which does not support it");
+ as_bad (_("tdaoff() relocation used on an instruction which does not support it"));
return BFD_RELOC_64; /* Used to indicate an error condition. */
}
@@ -1638,7 +1644,7 @@ md_assemble (str)
opcode = (struct v850_opcode *) hash_find (v850_hash, str);
if (opcode == NULL)
{
- as_bad ("Unrecognized opcode: `%s'", str);
+ as_bad (_("Unrecognized opcode: `%s'"), str);
ignore_rest_of_line ();
return;
}
@@ -1659,7 +1665,7 @@ md_assemble (str)
if ((opcode->processors & processor_mask) == 0)
{
- errmsg = "Target processor does not support this instruction.";
+ errmsg = _("Target processor does not support this instruction.");
goto error;
}
@@ -1750,7 +1756,7 @@ md_assemble (str)
case BFD_RELOC_32:
if ((operand->flags & V850E_IMMEDIATE32) == 0)
{
- errmsg = "immediate operand is too large";
+ errmsg = _("immediate operand is too large");
goto error;
}
@@ -1763,13 +1769,17 @@ md_assemble (str)
default:
fprintf (stderr, "reloc: %d\n", reloc);
- as_bad ("AAARG -> unhandled constant reloc");
+ as_bad (_("AAARG -> unhandled constant reloc"));
break;
}
- insn = v850_insert_operand (insn, operand, ex.X_add_number,
- (char *) NULL, 0,
- copy_of_instruction);
+ if (fc > MAX_INSN_FIXUPS)
+ as_fatal ("too many fixups");
+
+ fixups[ fc ].exp = ex;
+ fixups[ fc ].opindex = * opindex_ptr;
+ fixups[ fc ].reloc = reloc;
+ fc++;
}
else
{
@@ -1778,7 +1788,7 @@ md_assemble (str)
{
if ((operand->flags & V850E_IMMEDIATE32) == 0)
{
- errmsg = "immediate operand is too large";
+ errmsg = _("immediate operand is too large");
goto error;
}
@@ -1789,7 +1799,7 @@ md_assemble (str)
/* end-sanitize-v850e */
if (fc > MAX_INSN_FIXUPS)
- as_fatal ("too many fixups");
+ as_fatal (_("too many fixups"));
fixups[ fc ].exp = ex;
fixups[ fc ].opindex = * opindex_ptr;
@@ -1805,12 +1815,12 @@ md_assemble (str)
{
if (!register_name (& ex))
{
- errmsg = "invalid register name";
+ errmsg = _("invalid register name");
}
else if ((operand->flags & V850_NOT_R0)
&& ex.X_add_number == 0)
{
- errmsg = "register r0 cannot be used here";
+ errmsg = _("register r0 cannot be used here");
/* Force an error message to be generated by
skipping over any following potential matches
@@ -1826,7 +1836,7 @@ md_assemble (str)
/* end-sanitize-v850e */
))
{
- errmsg = "invalid system register name";
+ errmsg = _("invalid system register name");
}
}
else if ((operand->flags & V850_OPERAND_EP) != 0)
@@ -1839,7 +1849,7 @@ md_assemble (str)
/* Put things back the way we found them. */
*input_line_pointer = c;
input_line_pointer = start;
- errmsg = "expected EP register";
+ errmsg = _("expected EP register");
goto error;
}
@@ -1856,7 +1866,7 @@ md_assemble (str)
{
if (!cc_name (& ex))
{
- errmsg = "invalid condition code name";
+ errmsg = _("invalid condition code name");
}
}
/* start-sanitize-v850e */
@@ -1874,15 +1884,15 @@ md_assemble (str)
expression (& ex);
if (ex.X_op != O_constant)
- errmsg = "constant expression expected";
+ errmsg = _("constant expression expected");
else if (ex.X_add_number & 0xffff0000)
{
if (ex.X_add_number & 0xffff)
- errmsg = "constant too big to fit into instruction";
+ errmsg = _("constant too big to fit into instruction");
else if ((insn & 0x001fffc0) == 0x00130780)
ex.X_add_number >>= 16;
else
- errmsg = "constant too big to fit into instruction";
+ errmsg = _("constant too big to fit into instruction");
}
extra_data_after_insn = true;
@@ -1895,7 +1905,7 @@ md_assemble (str)
expression (& ex);
if (ex.X_op != O_constant)
- errmsg = "constant expression expected";
+ errmsg = _("constant expression expected");
extra_data_after_insn = true;
extra_data_len = 4;
@@ -1924,9 +1934,9 @@ md_assemble (str)
field is missing) then report this. */
if (opindex_ptr[1] != 0
&& (v850_operands [opindex_ptr [1]].flags & V850_OPERAND_REG))
- errmsg = "syntax error: value is missing before the register name";
+ errmsg = _("syntax error: value is missing before the register name");
else
- errmsg = "syntax error: register not expected";
+ errmsg = _("syntax error: register not expected");
}
}
else if (system_register_name (& ex, false
@@ -1936,12 +1946,12 @@ md_assemble (str)
)
&& (operand->flags & V850_OPERAND_SRG) == 0)
{
- errmsg = "syntax error: system register not expected";
+ errmsg = _("syntax error: system register not expected");
}
else if (cc_name (&ex)
&& (operand->flags & V850_OPERAND_CC) == 0)
{
- errmsg = "syntax error: condition code not expected";
+ errmsg = _("syntax error: condition code not expected");
}
else
{
@@ -1957,7 +1967,7 @@ md_assemble (str)
if (((insn & 0x07e0) == 0x0200)
&& ex.X_op == O_constant
&& (ex.X_add_number < (- (1 << (operand->bits - 1))) || ex.X_add_number > ((1 << operand->bits) - 1)))
- errmsg = "immediate operand is too large";
+ errmsg = _("immediate operand is too large");
/* end-sanitize-v850e */
}
@@ -1969,15 +1979,15 @@ md_assemble (str)
switch (ex.X_op)
{
case O_illegal:
- errmsg = "illegal operand";
+ errmsg = _("illegal operand");
goto error;
case O_absent:
- errmsg = "missing operand";
+ errmsg = _("missing operand");
goto error;
case O_register:
if ((operand->flags & (V850_OPERAND_REG | V850_OPERAND_SRG)) == 0)
{
- errmsg = "invalid operand";
+ errmsg = _("invalid operand");
goto error;
}
insn = v850_insert_operand (insn, operand, ex.X_add_number,
@@ -1994,7 +2004,7 @@ md_assemble (str)
default:
/* We need to generate a fixup for this expression. */
if (fc >= MAX_INSN_FIXUPS)
- as_fatal ("too many fixups");
+ as_fatal (_("too many fixups"));
fixups[ fc ].exp = ex;
fixups[ fc ].opindex = * opindex_ptr;
@@ -2046,7 +2056,7 @@ md_assemble (str)
++str;
if (*str != '\0')
- as_bad ("junk at end of line: `%s'", str);
+ as_bad (_("junk at end of line: `%s'"), str);
input_line_pointer = str;
@@ -2193,7 +2203,7 @@ tc_gen_reloc (seg, fixp)
if (reloc->howto == (reloc_howto_type *) NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "reloc %d not supported by object file format",
+ _("reloc %d not supported by object file format"),
(int)fixp->fx_r_type);
xfree (reloc);
@@ -2262,7 +2272,7 @@ md_apply_fix3 (fixp, valuep, seg)
{
/* We don't actually support subtracting a symbol. */
as_bad_where (fixp->fx_file, fixp->fx_line,
- "expression too complex");
+ _("expression too complex"));
}
}
}
@@ -2306,7 +2316,7 @@ md_apply_fix3 (fixp, valuep, seg)
/* fprintf (stderr, "bits: %d, insn: %x\n", operand->bits, insn); */
as_bad_where(fixp->fx_file, fixp->fx_line,
- "unresolved expression that must be resolved");
+ _("unresolved expression that must be resolved"));
fixp->fx_done = 1;
return 1;
}
diff --git a/gas/config/tc-w65.c b/gas/config/tc-w65.c
index d62e185..f291d89 100644
--- a/gas/config/tc-w65.c
+++ b/gas/config/tc-w65.c
@@ -1,6 +1,6 @@
/* tc-w65.c -- Assemble code for the W65816
- Copyright (C) 1995 Free Software Foundation.
+ Copyright (C) 1995, 1998 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@@ -133,7 +133,7 @@ s_longa (xmode)
input_line_pointer += 3;
}
else
- as_bad ("need on or off.");
+ as_bad (_("need on or off."));
demand_empty_rest_of_line ();
}
void
@@ -254,7 +254,7 @@ parse_exp (s, bytes)
input_line_pointer = s;
w65_expression (&immediate, bytes);
if (immediate.X_op == O_absent)
- as_bad ("missing operand");
+ as_bad (_("missing operand"));
new = input_line_pointer;
input_line_pointer = save;
return new;
@@ -318,7 +318,7 @@ get_operands (info, ptr)
}
else
{
- as_bad ("syntax error after <exp");
+ as_bad (_("syntax error after <exp"));
}
}
else
@@ -361,7 +361,7 @@ get_operands (info, ptr)
}
else
{
- as_bad ("syntax error after <exp");
+ as_bad (_("syntax error after <exp"));
}
}
else
@@ -756,7 +756,7 @@ md_assemble (str)
if (opcode == NULL)
{
- as_bad ("unknown opcode");
+ as_bad (_("unknown opcode"));
return;
}
@@ -776,7 +776,7 @@ md_assemble (str)
where[0] = 0x0;
where[1] = 0x0;
- as_bad ("invalid operands for opcode");
+ as_bad (_("invalid operands for opcode"));
return;
}
@@ -788,7 +788,7 @@ void
DEFUN (tc_crawl_symbol_chain, (headers),
object_headers * headers)
{
- printf ("call to tc_crawl_symbol_chain \n");
+ printf (_("call to tc_crawl_symbol_chain \n"));
}
symbolS *
@@ -802,7 +802,7 @@ void
DEFUN (tc_headers_hook, (headers),
object_headers * headers)
{
- printf ("call to tc_headers_hook \n");
+ printf (_("call to tc_headers_hook \n"));
}
/* Various routines to kill one day */
@@ -853,7 +853,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "Bad call to MD_NTOF()";
+ return _("Bad call to MD_NTOF()");
}
t = atof_ieee (input_line_pointer, type, words);
if (t)
@@ -882,7 +882,7 @@ int md_short_jump_size;
void
tc_Nout_fix_to_chars ()
{
- printf ("call to tc_Nout_fix_to_chars \n");
+ printf (_("call to tc_Nout_fix_to_chars \n"));
abort ();
}
@@ -894,7 +894,7 @@ md_create_short_jump (ptr, from_Nddr, to_Nddr, frag, to_symbol)
fragS *frag;
symbolS *to_symbol;
{
- as_fatal ("failed sanity check.");
+ as_fatal (_("failed sanity check."));
}
void
@@ -904,7 +904,7 @@ md_create_long_jump (ptr, from_Nddr, to_Nddr, frag, to_symbol)
fragS *frag;
symbolS *to_symbol;
{
- as_fatal ("failed sanity check.");
+ as_fatal (_("failed sanity check."));
}
diff --git a/gas/configure b/gas/configure
index 3a80aad..b1d4727 100755
--- a/gas/configure
+++ b/gas/configure
@@ -28,6 +28,10 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-commonbfdlib build shared BFD/opcodes/libiberty library"
ac_help="$ac_help
+ --disable-nls do not use Native Language Support"
+ac_help="$ac_help
+ --with-included-gettext use the GNU gettext library included here"
+ac_help="$ac_help
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer"
@@ -586,7 +590,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:590: checking host system type" >&5
+echo "configure:594: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -607,7 +611,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:611: checking target system type" >&5
+echo "configure:615: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -625,7 +629,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:629: checking build system type" >&5
+echo "configure:633: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -660,7 +664,7 @@ test "$host_alias" != "$target_alias" &&
# 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:664: checking for a BSD compatible install" >&5
+echo "configure:668: 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
@@ -714,7 +718,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:718: checking whether build environment is sane" >&5
+echo "configure:722: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -771,7 +775,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:775: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:779: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -817,7 +821,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:821: checking for working aclocal" >&5
+echo "configure:825: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -830,7 +834,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:834: checking for working autoconf" >&5
+echo "configure:838: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -843,7 +847,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:847: checking for working automake" >&5
+echo "configure:851: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -856,7 +860,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:860: checking for working autoheader" >&5
+echo "configure:864: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -869,7 +873,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:873: checking for working makeinfo" >&5
+echo "configure:877: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -932,7 +936,7 @@ fi
# 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:936: checking for $ac_word" >&5
+echo "configure:940: 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
@@ -961,7 +965,7 @@ fi
# 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:965: checking for $ac_word" >&5
+echo "configure:969: 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
@@ -990,7 +994,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:994: checking for $ac_word" >&5
+echo "configure:998: 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
@@ -1038,7 +1042,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1042: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1046: 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.
@@ -1048,11 +1052,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 1052 "configure"
+#line 1056 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
@@ -1072,12 +1076,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:1076: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1080: 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:1081: checking whether we are using GNU C" >&5
+echo "configure:1085: 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
@@ -1086,7 +1090,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1090: \"$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:1094: \"$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
@@ -1101,7 +1105,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1105: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1109: 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
@@ -1141,7 +1145,7 @@ ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1145: checking for ld used by GCC" >&5
+echo "configure:1149: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
@@ -1159,10 +1163,10 @@ echo "configure:1145: checking for ld used by GCC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1163: checking for GNU ld" >&5
+echo "configure:1167: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1166: checking for non-GNU ld" >&5
+echo "configure:1170: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1198,7 +1202,7 @@ fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1202: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1206: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1214,7 +1218,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1218: checking for BSD-compatible nm" >&5
+echo "configure:1222: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1248,7 +1252,7 @@ echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1252: checking whether ln -s works" >&5
+echo "configure:1256: 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
@@ -1290,8 +1294,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
case "$host" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1294 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1298 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1316,7 +1320,7 @@ case "$host" in
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1320: checking for $ac_word" >&5
+echo "configure:1324: 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
@@ -1347,7 +1351,7 @@ if test -n "$ac_tool_prefix"; 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:1351: checking for $ac_word" >&5
+echo "configure:1355: 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
@@ -1381,7 +1385,7 @@ fi
# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
set dummy ${ac_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1385: checking for $ac_word" >&5
+echo "configure:1389: 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
@@ -1412,7 +1416,7 @@ if test -n "$ac_tool_prefix"; 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:1416: checking for $ac_word" >&5
+echo "configure:1420: 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
@@ -2201,7 +2205,7 @@ EOF
# 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:2205: checking for $ac_word" >&5
+echo "configure:2209: 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
@@ -2230,7 +2234,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:2234: checking for $ac_word" >&5
+echo "configure:2238: 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
@@ -2278,7 +2282,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2282: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2286: 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.
@@ -2288,11 +2292,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2292 "configure"
+#line 2296 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
@@ -2312,12 +2316,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:2316: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2320: 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:2321: checking whether we are using GNU C" >&5
+echo "configure:2325: 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
@@ -2326,7 +2330,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2330: \"$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:2334: \"$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
@@ -2341,7 +2345,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2345: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2349: 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
@@ -2374,7 +2378,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:2378: checking for $ac_word" >&5
+echo "configure:2382: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2404,7 +2408,7 @@ done
test -n "$YACC" || YACC="yacc"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2408: checking how to run the C preprocessor" >&5
+echo "configure:2412: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2419,13 +2423,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2423 "configure"
+#line 2427 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -2436,13 +2440,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2440 "configure"
+#line 2444 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -2470,7 +2474,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:2474: checking for $ac_word" >&5
+echo "configure:2478: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2502,7 +2506,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex""
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2506: checking for $ac_word" >&5
+echo "configure:2510: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2535,7 +2539,7 @@ then
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:2539: checking for yywrap in -l$ac_lib" >&5
+echo "configure:2543: checking for yywrap in -l$ac_lib" >&5
ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2543,7 +2547,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2547 "configure"
+#line 2551 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2554,7 +2558,7 @@ int main() {
yywrap()
; return 0; }
EOF
-if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2577,7 +2581,7 @@ fi
fi
echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:2581: checking lex output file root" >&5
+echo "configure:2585: checking lex output file root" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2598,7 +2602,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:2602: checking whether yytext is a pointer" >&5
+echo "configure:2606: checking whether yytext is a pointer" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2610,14 +2614,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
ac_save_LIBS="$LIBS"
LIBS="$LIBS $LEXLIB"
cat > conftest.$ac_ext <<EOF
-#line 2614 "configure"
+#line 2618 "configure"
#include "confdefs.h"
`cat $LEX_OUTPUT_ROOT.c`
int main() {
; return 0; }
EOF
-if { (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_prog_lex_yytext_pointer=yes
else
@@ -2639,8 +2643,1632 @@ EOF
fi
+ALL_LINGUAS=
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:2649: checking for POSIXized ISC" >&5
+if test -d /etc/conf/kconfig.d &&
+ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
+ echo "$ac_t""yes" 1>&6
+ ISC=yes # If later tests want to check for ISC.
+ cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ if test "$GCC" = yes; then
+ CC="$CC -posix"
+ else
+ CC="$CC -Xp"
+ fi
+else
+ echo "$ac_t""no" 1>&6
+ ISC=
+fi
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:2670: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2675 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 2700 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 2718 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2739 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:2774: checking for working const" >&5
+if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2779 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this. */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this. */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this. */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in an arm
+ of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:2828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_const=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+ cat >> confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:2849: checking for inline" >&5
+if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat > conftest.$ac_ext <<EOF
+#line 2856 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:2863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+ inline | yes) ;;
+ no) cat >> confdefs.h <<\EOF
+#define inline
+EOF
+ ;;
+ *) cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:2889: checking for off_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2894 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_off_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+ cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:2922: checking for size_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2927 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_size_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+ cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+fi
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
+echo "configure:2957: checking for working alloca.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2962 "configure"
+#include "confdefs.h"
+#include <alloca.h>
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
+EOF
+if { (eval echo configure:2969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ ac_cv_header_alloca_h=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_alloca_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:2990: checking for alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2995 "configure"
+#include "confdefs.h"
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ ac_cv_func_alloca_works=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+ # that cause trouble. Some versions do not even contain alloca or
+ # contain a buggy version. If you still want to use their alloca,
+ # use ar to extract alloca.o from them instead of compiling alloca.c.
+ ALLOCA=alloca.o
+ cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:3050: checking whether alloca needs Cray hooks" >&5
+if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3055 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "webecray" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_os_cray=yes
+else
+ rm -rf conftest*
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_os_cray" 1>&6
+if test $ac_cv_os_cray = yes; then
+for ac_func in _getb67 GETB67 getb67; do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3080: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3085 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+
+ break
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:3135: checking stack direction for C alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3143 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+ exit (find_stack_direction() < 0);
+}
+EOF
+if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_c_stack_direction=1
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+
+fi
+
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3187: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3192 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3226: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3231 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:3279: checking for working mmap" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3287 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the filesystem buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propogated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize();
+
+ /*
+ * First, make a file with some known garbage in it.
+ */
+ data = malloc(pagesize);
+ if (!data)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand();
+ umask(0);
+ fd = creat("conftestmmap", 0600);
+ if (fd < 0)
+ exit(1);
+ if (write(fd, data, pagesize) != pagesize)
+ exit(1);
+ close(fd);
+
+ /*
+ * Next, try to mmap the file at a fixed address which
+ * already has something else allocated at it. If we can,
+ * also make sure that we see the same garbage.
+ */
+ fd = open("conftestmmap", O_RDWR);
+ if (fd < 0)
+ exit(1);
+ data2 = malloc(2 * pagesize);
+ if (!data2)
+ exit(1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit(1);
+
+ /*
+ * Finally, make sure that changes to the mapped area
+ * do not percolate back to the file as seen by read().
+ * (This is a bug on some variants of i386 svr4.0.)
+ */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = malloc(pagesize);
+ if (!data3)
+ exit(1);
+ if (read(fd, data3, pagesize) != pagesize)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit(1);
+ close(fd);
+ unlink("conftestmmap");
+ exit(0);
+}
+
+EOF
+if { (eval echo configure:3427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_func_mmap_fixed_mapped=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
+ for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h values.h sys/param.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3455: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3460 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3495: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3500 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ for ac_func in stpcpy
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3552: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3557 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STPCPY 1
+EOF
+
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:3614: checking for LC_MESSAGES" >&5
+if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3619 "configure"
+#include "confdefs.h"
+#include <locale.h>
+int main() {
+return LC_MESSAGES
+; return 0; }
+EOF
+if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
+EOF
+
+ fi
+ fi
+ echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
+echo "configure:3647: checking whether NLS is requested" >&5
+ # Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval="$enable_nls"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ echo "$ac_t""$USE_NLS" 1>&6
+
+
+ USE_INCLUDED_LIBINTL=no
+
+ if test "$USE_NLS" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define ENABLE_NLS 1
+EOF
+
+ echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
+echo "configure:3667: checking whether included gettext is requested" >&5
+ # Check whether --with-included-gettext or --without-included-gettext was given.
+if test "${with_included_gettext+set}" = set; then
+ withval="$with_included_gettext"
+ nls_cv_force_use_gnu_gettext=$withval
+else
+ nls_cv_force_use_gnu_gettext=no
+fi
+
+ echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
+echo "configure:3686: checking for libintl.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3691 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
+echo "configure:3713: checking for gettext in libc" >&5
+if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3718 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
+
+ if test "$gt_cv_func_gettext_libc" != "yes"; then
+ echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
+echo "configure:3741: checking for bindtextdomain in -lintl" >&5
+ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lintl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3749 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char bindtextdomain();
+
+int main() {
+bindtextdomain()
+; return 0; }
+EOF
+if { (eval echo configure:3760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
+echo "configure:3776: checking for gettext in libintl" >&5
+if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3781 "configure"
+#include "confdefs.h"
+
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ gt_cv_func_gettext_libintl=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libintl=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+EOF
+
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3816: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$MSGFMT" != "no"; then
+ for ac_func in dcgettext
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3850: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3855 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3905: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3940: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ cat > conftest.$ac_ext <<EOF
+#line 3972 "configure"
+#include "confdefs.h"
+
+int main() {
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+; return 0; }
+EOF
+if { (eval echo configure:3980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+fi
+rm -f conftest*
+ INSTOBJEXT=.mo
+ fi
+ fi
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+
+ if test "$CATOBJEXT" = "NONE"; then
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ INTLOBJS="\$(GETTOBJS)"
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4012: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4046: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4081: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ 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
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+ 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
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
+echo "configure:4171: checking for catalogs to be installed" >&5
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ echo "$ac_t""$LINGUAS" 1>&6
+ fi
+
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ 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
+
+
+ if test -f $srcdir/po2tbl.sed.in; then
+ if test "$CATOBJEXT" = ".cat"; then
+ ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
+echo "configure:4199: checking for linux/version.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4204 "configure"
+#include "confdefs.h"
+#include <linux/version.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ msgformat=linux
+else
+ echo "$ac_t""no" 1>&6
+msgformat=xopen
+fi
+
+
+ sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
+ fi
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/po2tbl.sed.in > po2tbl.sed
+ fi
+
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+
+
+
+ MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
+
+
+ l=
+
+
+ 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
+
+
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:2644: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4272: 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"
@@ -2658,19 +4286,19 @@ fi
echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
-echo "configure:2662: checking for Cygwin32 environment" >&5
+echo "configure:4290: checking for Cygwin32 environment" >&5
if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2667 "configure"
+#line 4295 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN32__;
; return 0; }
EOF
-if { (eval echo configure:2674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_cygwin32=yes
else
@@ -2687,19 +4315,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6
CYGWIN32=
test "$am_cv_cygwin32" = yes && CYGWIN32=yes
echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
-echo "configure:2691: checking for Mingw32 environment" >&5
+echo "configure:4319: checking for Mingw32 environment" >&5
if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2696 "configure"
+#line 4324 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:2703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_mingw32=yes
else
@@ -2718,7 +4346,7 @@ test "$am_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2722: checking for executable suffix" >&5
+echo "configure:4350: checking for executable suffix" >&5
if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2753,17 +4381,17 @@ for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h e
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2757: checking for $ac_hdr" >&5
+echo "configure:4385: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2762 "configure"
+#line 4390 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2793,7 +4421,7 @@ done
# Put this here so that autoconf's "cross-compiling" message doesn't confuse
# people who are not cross-compiling but are compiling cross-assemblers.
echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
-echo "configure:2797: checking whether compiling a cross-assembler" >&5
+echo "configure:4425: checking whether compiling a cross-assembler" >&5
if test "${host}" = "${target}"; then
cross_gas=no
else
@@ -2808,19 +4436,19 @@ echo "$ac_t""$cross_gas" 1>&6
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2812: checking for working alloca.h" >&5
+echo "configure:4440: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2817 "configure"
+#line 4445 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -2841,12 +4469,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2845: checking for alloca" >&5
+echo "configure:4473: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2850 "configure"
+#line 4478 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2869,7 +4497,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -2901,12 +4529,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2905: checking whether alloca needs Cray hooks" >&5
+echo "configure:4533: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2910 "configure"
+#line 4538 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2931,12 +4559,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2935: checking for $ac_func" >&5
+echo "configure:4563: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2940 "configure"
+#line 4568 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2959,7 +4587,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2986,7 +4614,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2990: checking stack direction for C alloca" >&5
+echo "configure:4618: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2994,7 +4622,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2998 "configure"
+#line 4626 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3013,7 +4641,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -3035,21 +4663,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:3039: checking for inline" >&5
+echo "configure:4667: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
+#line 4674 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:3053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -3079,12 +4707,12 @@ esac
for ac_func in unlink remove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3083: checking for $ac_func" >&5
+echo "configure:4711: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3088 "configure"
+#line 4716 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3107,7 +4735,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3136,12 +4764,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3140: checking for $ac_func" >&5
+echo "configure:4768: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3145 "configure"
+#line 4773 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3164,7 +4792,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3193,12 +4821,12 @@ done
# enough, but on some of those systems, the assert macro relies on requoting
# working properly!
echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
-echo "configure:3197: checking for working assert macro" >&5
+echo "configure:4825: checking for working assert macro" >&5
if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3202 "configure"
+#line 4830 "configure"
#include "confdefs.h"
#include <assert.h>
#include <stdio.h>
@@ -3214,7 +4842,7 @@ assert (a == b
; return 0; }
EOF
-if { (eval echo configure:3218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_assert_ok=yes
else
@@ -3255,12 +4883,12 @@ gas_test_headers="
"
echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
-echo "configure:3259: checking whether declaration is required for strstr" >&5
+echo "configure:4887: checking whether declaration is required for strstr" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3264 "configure"
+#line 4892 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -3271,7 +4899,7 @@ x = (f) strstr;
; return 0; }
EOF
-if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_strstr=no
else
@@ -3292,12 +4920,12 @@ EOF
echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
-echo "configure:3296: checking whether declaration is required for malloc" >&5
+echo "configure:4924: checking whether declaration is required for malloc" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3301 "configure"
+#line 4929 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -3308,7 +4936,7 @@ x = (f) malloc;
; return 0; }
EOF
-if { (eval echo configure:3312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_malloc=no
else
@@ -3329,12 +4957,12 @@ EOF
echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
-echo "configure:3333: checking whether declaration is required for free" >&5
+echo "configure:4961: checking whether declaration is required for free" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3338 "configure"
+#line 4966 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -3345,7 +4973,7 @@ x = (f) free;
; return 0; }
EOF
-if { (eval echo configure:3349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_free=no
else
@@ -3366,12 +4994,12 @@ EOF
echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
-echo "configure:3370: checking whether declaration is required for sbrk" >&5
+echo "configure:4998: checking whether declaration is required for sbrk" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3375 "configure"
+#line 5003 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -3382,7 +5010,7 @@ x = (f) sbrk;
; return 0; }
EOF
-if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_sbrk=no
else
@@ -3406,12 +5034,12 @@ EOF
# for it?
echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
-echo "configure:3410: checking whether declaration is required for errno" >&5
+echo "configure:5038: checking whether declaration is required for errno" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3415 "configure"
+#line 5043 "configure"
#include "confdefs.h"
#ifdef HAVE_ERRNO_H
@@ -3426,7 +5054,7 @@ x = (f) errno;
; return 0; }
EOF
-if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_errno=no
else
@@ -3549,7 +5177,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -3627,9 +5255,29 @@ s%@LEX@%$LEX%g
s%@LEXLIB@%$LEXLIB%g
s%@CPP@%$CPP%g
s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
+s%@ALLOCA@%$ALLOCA%g
+s%@USE_NLS@%$USE_NLS%g
+s%@MSGFMT@%$MSGFMT%g
+s%@GMSGFMT@%$GMSGFMT%g
+s%@XGETTEXT@%$XGETTEXT%g
+s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
+s%@CATALOGS@%$CATALOGS%g
+s%@CATOBJEXT@%$CATOBJEXT%g
+s%@DATADIRNAME@%$DATADIRNAME%g
+s%@GMOFILES@%$GMOFILES%g
+s%@INSTOBJEXT@%$INSTOBJEXT%g
+s%@INTLDEPS@%$INTLDEPS%g
+s%@INTLLIBS@%$INTLLIBS%g
+s%@INTLOBJS@%$INTLOBJS%g
+s%@POFILES@%$POFILES%g
+s%@POSUB@%$POSUB%g
+s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
+s%@GT_NO@%$GT_NO%g
+s%@GT_YES@%$GT_YES%g
+s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
+s%@l@%$l%g
s%@MAINT@%$MAINT%g
s%@EXEEXT@%$EXEEXT%g
-s%@ALLOCA@%$ALLOCA%g
CEOF
EOF
@@ -3671,7 +5319,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in po/Makefile.in:po/Make-in"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -3854,6 +5502,8 @@ rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itb
case ${target_cpu_type} in
m32r) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;;
esac
+
+ sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
exit 0
EOF
chmod +x $CONFIG_STATUS
diff --git a/gas/configure.in b/gas/configure.in
index 39f7266..daca513 100644
--- a/gas/configure.in
+++ b/gas/configure.in
@@ -625,6 +625,9 @@ AC_PROG_CC
AC_PROG_YACC
AM_PROG_LEX
+ALL_LINGUAS=
+CY_GNU_GETTEXT
+
AM_MAINTAINER_MODE
AM_CYGWIN32
AM_EXEEXT
@@ -700,7 +703,7 @@ dnl the build directory which include the right .h file. Make sure
dnl the old symlinks don't exist, so that a reconfigure in an existing
dnl directory behaves reasonably.
-AC_OUTPUT(Makefile doc/Makefile .gdbinit:gdbinit.in,
+AC_OUTPUT(Makefile doc/Makefile .gdbinit:gdbinit.in po/Makefile.in:po/Make-in,
[rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
@@ -708,7 +711,9 @@ AC_OUTPUT(Makefile doc/Makefile .gdbinit:gdbinit.in,
echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
case ${target_cpu_type} in
m32r) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;;
- esac],
+ esac
+
+ sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile],
[target_cpu_type=${target_cpu_type}
obj_format=${obj_format}
te_file=${te_file}])
diff --git a/gas/ecoff.c b/gas/ecoff.c
index 0821922..f8e538f 100644
--- a/gas/ecoff.c
+++ b/gas/ecoff.c
@@ -1,5 +1,5 @@
/* ECOFF debugging support.
- Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>. A
good deal of it comes directly from mips-tfile.c, by Michael
@@ -768,13 +768,24 @@ enum aux_type {
If PAGE_SIZE is > 4096, the string length in the shash_t structure
can't be represented (assuming there are strings > 4096 bytes). */
+/* FIXME: Yes, there can be such strings while emitting C++ class debug
+ info. Templates are the offender here, the test case in question
+ having a mangled class name of
+
+ t7rb_tree4Z4xkeyZt4pair2ZC4xkeyZt7xsocket1Z4UserZt9select1st2Zt4pair\
+ 2ZC4xkeyZt7xsocket1Z4UserZ4xkeyZt4less1Z4xkey
+
+ Repeat that a couple dozen times while listing the class members and
+ you've got strings over 4k. Hack around this for now by increasing
+ the page size. A proper solution would abandon this structure scheme
+ certainly for very large strings, and possibly entirely. */
+
#ifndef PAGE_SIZE
-#define PAGE_SIZE 4096 /* size of varray pages */
+#define PAGE_SIZE (8*1024) /* size of varray pages */
#endif
#define PAGE_USIZE ((unsigned long) PAGE_SIZE)
-
#ifndef MAX_CLUSTER_PAGES /* # pages to get from system */
#define MAX_CLUSTER_PAGES 63
#endif
@@ -1482,7 +1493,6 @@ static forward_t *allocate_forward PARAMS ((void));
static thead_t *allocate_thead PARAMS ((void));
static void free_thead PARAMS ((thead_t *ptr));
static lineno_list_t *allocate_lineno_list PARAMS ((void));
-static void generate_ecoff_stab PARAMS ((int, const char *, int, int, int));
/* This function should be called when the assembler starts up. */
@@ -1560,7 +1570,7 @@ add_string (vp, hash_tbl, str, ret_hash)
register shash_t *hash_ptr;
if (len >= PAGE_USIZE)
- as_fatal ("String too big (%lu bytes)", len);
+ as_fatal (_("String too big (%lu bytes)"), len);
hash_ptr = (shash_t *) hash_find (hash_tbl, str);
if (hash_ptr == (shash_t *) NULL)
@@ -1586,7 +1596,7 @@ add_string (vp, hash_tbl, str, ret_hash)
err = hash_insert (hash_tbl, str, (char *) hash_ptr);
if (err)
- as_fatal ("Inserting \"%s\" into string hash table: %s",
+ as_fatal (_("Inserting \"%s\" into string hash table: %s"),
str, err);
}
@@ -1618,7 +1628,7 @@ add_ecoff_symbol (str, type, storage, sym_value, addend, value, indx)
shash_t *hash_ptr = (shash_t *) NULL;
if (cur_file_ptr == (efdr_t *) NULL)
- as_fatal ("no current file pointer");
+ as_fatal (_("no current file pointer"));
vp = &cur_file_ptr->symbols;
@@ -1705,7 +1715,7 @@ add_ecoff_symbol (str, type, storage, sym_value, addend, value, indx)
case st_End:
pscope = cur_file_ptr->cur_scope;
if (pscope == (scope_t *) NULL)
- as_fatal ("too many st_End's");
+ as_fatal (_("too many st_End's"));
else
{
st_t begin_type = (st_t) pscope->lsym->ecoff_sym.asym.st;
@@ -1811,7 +1821,7 @@ add_aux_sym_symint (aux_word)
register aux_t *aux_ptr;
if (cur_file_ptr == (efdr_t *) NULL)
- as_fatal ("no current file pointer");
+ as_fatal (_("no current file pointer"));
vp = &cur_file_ptr->aux_syms;
@@ -1837,7 +1847,7 @@ add_aux_sym_rndx (file_index, sym_index)
register aux_t *aux_ptr;
if (cur_file_ptr == (efdr_t *) NULL)
- as_fatal ("no current file pointer");
+ as_fatal (_("no current file pointer"));
vp = &cur_file_ptr->aux_syms;
@@ -1869,7 +1879,7 @@ add_aux_sym_tir (t, state, hash_tbl)
AUXU aux;
if (cur_file_ptr == (efdr_t *) NULL)
- as_fatal ("no current file pointer");
+ as_fatal (_("no current file pointer"));
vp = &cur_file_ptr->aux_syms;
@@ -2025,7 +2035,7 @@ get_tag (tag, sym, basic_type)
tag_t *tag_ptr;
if (cur_file_ptr == (efdr_t *) NULL)
- as_fatal ("no current file pointer");
+ as_fatal (_("no current file pointer"));
hash_ptr = (shash_t *) hash_find (tag_hash, tag);
@@ -2051,7 +2061,7 @@ get_tag (tag, sym, basic_type)
hash_ptr = allocate_shash ();
err = hash_insert (tag_hash, perm, (char *) hash_ptr);
if (err)
- as_fatal ("Inserting \"%s\" into tag hash table: %s",
+ as_fatal (_("Inserting \"%s\" into tag hash table: %s"),
tag, err);
hash_ptr->string = perm;
}
@@ -2139,7 +2149,7 @@ add_procedure (func)
#endif
if (cur_file_ptr == (efdr_t *) NULL)
- as_fatal ("no current file pointer");
+ as_fatal (_("no current file pointer"));
vp = &cur_file_ptr->procs;
@@ -2211,7 +2221,7 @@ add_file (file_name, indx, fake)
char *file;
if (first_file != (efdr_t *) NULL)
- as_fatal ("fake .file after real one");
+ as_fatal (_("fake .file after real one"));
as_where (&file, (unsigned int *) NULL);
file_name = (const char *) file;
@@ -2299,7 +2309,7 @@ add_file (file_name, indx, fake)
(shash_t **)0);
if (strlen (file_name) > PAGE_USIZE - 2)
- as_fatal ("Filename goes over one page boundary.");
+ as_fatal (_("Filename goes over one page boundary."));
/* Push the start of the filename. We assume that the filename
will be stored at string offset 1. */
@@ -2434,14 +2444,14 @@ ecoff_directive_begin (ignore)
if (cur_file_ptr == (efdr_t *) NULL)
{
- as_warn (".begin directive without a preceding .file directive");
+ as_warn (_(".begin directive without a preceding .file directive"));
demand_empty_rest_of_line ();
return;
}
if (cur_proc_ptr == (proc_t *) NULL)
{
- as_warn (".begin directive without a preceding .ent directive");
+ as_warn (_(".begin directive without a preceding .ent directive"));
demand_empty_rest_of_line ();
return;
}
@@ -2473,14 +2483,14 @@ ecoff_directive_bend (ignore)
if (cur_file_ptr == (efdr_t *) NULL)
{
- as_warn (".bend directive without a preceding .file directive");
+ as_warn (_(".bend directive without a preceding .file directive"));
demand_empty_rest_of_line ();
return;
}
if (cur_proc_ptr == (proc_t *) NULL)
{
- as_warn (".bend directive without a preceding .ent directive");
+ as_warn (_(".bend directive without a preceding .ent directive"));
demand_empty_rest_of_line ();
return;
}
@@ -2493,7 +2503,7 @@ ecoff_directive_bend (ignore)
the symbol. */
endsym = symbol_find (name);
if (endsym == (symbolS *) NULL)
- as_warn (".bend directive names unknown symbol");
+ as_warn (_(".bend directive names unknown symbol"));
else
(void) add_ecoff_symbol ((const char *) NULL, st_End, sc_Text, endsym,
(bfd_vma) 0, (symint_t) 0, (symint_t) 0);
@@ -2537,9 +2547,9 @@ ecoff_directive_def (ignore)
name_end = get_symbol_end ();
if (coff_sym_name != (char *) NULL)
- as_warn (".def pseudo-op used inside of .def/.endef; ignored");
+ as_warn (_(".def pseudo-op used inside of .def/.endef; ignored"));
else if (*name == '\0')
- as_warn ("Empty symbol name in .def; ignored");
+ as_warn (_("Empty symbol name in .def; ignored"));
else
{
if (coff_sym_name != (char *) NULL)
@@ -2577,7 +2587,7 @@ ecoff_directive_dim (ignore)
if (coff_sym_name == (char *) NULL)
{
- as_warn (".dim pseudo-op used outside of .def/.endef; ignored");
+ as_warn (_(".dim pseudo-op used outside of .def/.endef; ignored"));
demand_empty_rest_of_line ();
return;
}
@@ -2592,7 +2602,7 @@ ecoff_directive_dim (ignore)
{
if (*input_line_pointer != '\n'
&& *input_line_pointer != ';')
- as_warn ("Badly formed .dim directive");
+ as_warn (_("Badly formed .dim directive"));
break;
}
}
@@ -2605,7 +2615,7 @@ ecoff_directive_dim (ignore)
{
if (coff_type.num_dims >= N_TQ)
{
- as_warn ("Too many .dim entries");
+ as_warn (_("Too many .dim entries"));
break;
}
coff_type.dimensions[coff_type.num_dims] = dimens[i];
@@ -2626,7 +2636,7 @@ ecoff_directive_scl (ignore)
if (coff_sym_name == (char *) NULL)
{
- as_warn (".scl pseudo-op used outside of .def/.endef; ignored");
+ as_warn (_(".scl pseudo-op used outside of .def/.endef; ignored"));
demand_empty_rest_of_line ();
return;
}
@@ -2652,7 +2662,7 @@ ecoff_directive_size (ignore)
if (coff_sym_name == (char *) NULL)
{
- as_warn (".size pseudo-op used outside of .def/.endef; ignored");
+ as_warn (_(".size pseudo-op used outside of .def/.endef; ignored"));
demand_empty_rest_of_line ();
return;
}
@@ -2667,7 +2677,7 @@ ecoff_directive_size (ignore)
{
if (*input_line_pointer != '\n'
&& *input_line_pointer != ';')
- as_warn ("Badly formed .size directive");
+ as_warn (_("Badly formed .size directive"));
break;
}
}
@@ -2680,7 +2690,7 @@ ecoff_directive_size (ignore)
{
if (coff_type.num_sizes >= N_TQ)
{
- as_warn ("Too many .size entries");
+ as_warn (_("Too many .size entries"));
break;
}
coff_type.sizes[coff_type.num_sizes] = sizes[i];
@@ -2703,7 +2713,7 @@ ecoff_directive_type (ignore)
if (coff_sym_name == (char *) NULL)
{
- as_warn (".type pseudo-op used outside of .def/.endef; ignored");
+ as_warn (_(".type pseudo-op used outside of .def/.endef; ignored"));
demand_empty_rest_of_line ();
return;
}
@@ -2721,7 +2731,7 @@ ecoff_directive_type (ignore)
/* FIXME: We could handle this by setting the continued bit.
There would still be a limit: the .type argument can not
be infinite. */
- as_warn ("The type of %s is too complex; it will be simplified",
+ as_warn (_("The type of %s is too complex; it will be simplified"),
coff_sym_name);
break;
}
@@ -2732,7 +2742,7 @@ ecoff_directive_type (ignore)
else if (ISARY (val))
*--tq_ptr = tq_Array;
else
- as_fatal ("Unrecognized .type argument");
+ as_fatal (_("Unrecognized .type argument"));
val = DECREF (val);
}
@@ -2771,7 +2781,7 @@ ecoff_directive_tag (ignore)
if (coff_sym_name == (char *) NULL)
{
- as_warn (".tag pseudo-op used outside of .def/.endef; ignored");
+ as_warn (_(".tag pseudo-op used outside of .def/.endef; ignored"));
demand_empty_rest_of_line ();
return;
}
@@ -2798,7 +2808,7 @@ ecoff_directive_val (ignore)
if (coff_sym_name == (char *) NULL)
{
- as_warn (".val pseudo-op used outside of .def/.endef; ignored");
+ as_warn (_(".val pseudo-op used outside of .def/.endef; ignored"));
demand_empty_rest_of_line ();
return;
}
@@ -2806,7 +2816,7 @@ ecoff_directive_val (ignore)
expression (&exp);
if (exp.X_op != O_constant && exp.X_op != O_symbol)
{
- as_bad (".val expression is too copmlex");
+ as_bad (_(".val expression is too copmlex"));
demand_empty_rest_of_line ();
return;
}
@@ -2837,7 +2847,7 @@ ecoff_directive_endef (ignore)
if (coff_sym_name == (char *) NULL)
{
- as_warn (".endef pseudo-op used before .def; ignored");
+ as_warn (_(".endef pseudo-op used before .def; ignored"));
return;
}
@@ -2863,7 +2873,7 @@ ecoff_directive_endef (ignore)
if (coff_type.num_sizes != 1 || diff < 0)
{
- as_warn ("Bad COFF debugging info");
+ as_warn (_("Bad COFF debugging info"));
return;
}
@@ -2912,7 +2922,7 @@ ecoff_directive_endef (ignore)
{
if (coff_tag == (char *) NULL)
{
- as_warn ("No tag specified for %s", name);
+ as_warn (_("No tag specified for %s"), name);
return;
}
@@ -2944,7 +2954,7 @@ ecoff_directive_endef (ignore)
if (coff_type.num_sizes - coff_type.num_dims - coff_type.extra_sizes
!= 1)
{
- as_warn ("Bad COFF debugging information");
+ as_warn (_("Bad COFF debugging information"));
return;
}
else
@@ -3016,14 +3026,14 @@ ecoff_directive_end (ignore)
if (cur_file_ptr == (efdr_t *) NULL)
{
- as_warn (".end directive without a preceding .file directive");
+ as_warn (_(".end directive without a preceding .file directive"));
demand_empty_rest_of_line ();
return;
}
if (cur_proc_ptr == (proc_t *) NULL)
{
- as_warn (".end directive without a preceding .ent directive");
+ as_warn (_(".end directive without a preceding .ent directive"));
demand_empty_rest_of_line ();
return;
}
@@ -3034,7 +3044,7 @@ ecoff_directive_end (ignore)
ch = *name;
if (! is_name_beginner (ch))
{
- as_warn (".end directive has no name");
+ as_warn (_(".end directive has no name"));
*input_line_pointer = name_end;
demand_empty_rest_of_line ();
return;
@@ -3046,7 +3056,7 @@ ecoff_directive_end (ignore)
symbol. */
ent = symbol_find (name);
if (ent == (symbolS *) NULL)
- as_warn (".end directive names unknown symbol");
+ as_warn (_(".end directive names unknown symbol"));
else
(void) add_ecoff_symbol ((const char *) NULL, st_End, sc_Text,
symbol_new ("L0\001", now_seg,
@@ -3075,7 +3085,7 @@ ecoff_directive_ent (ignore)
if (cur_proc_ptr != (proc_t *) NULL)
{
- as_warn ("second .ent directive found before .end directive");
+ as_warn (_("second .ent directive found before .end directive"));
demand_empty_rest_of_line ();
return;
}
@@ -3086,7 +3096,7 @@ ecoff_directive_ent (ignore)
ch = *name;
if (! is_name_beginner (ch))
{
- as_warn (".ent directive has no name");
+ as_warn (_(".ent directive has no name"));
*input_line_pointer = name_end;
demand_empty_rest_of_line ();
return;
@@ -3149,7 +3159,7 @@ ecoff_directive_file (ignore)
if (cur_proc_ptr != (proc_t *) NULL)
{
- as_warn ("No way to handle .file within .ent/.end section");
+ as_warn (_("No way to handle .file within .ent/.end section"));
demand_empty_rest_of_line ();
return;
}
@@ -3174,14 +3184,14 @@ ecoff_directive_fmask (ignore)
if (cur_proc_ptr == (proc_t *) NULL)
{
- as_warn (".fmask outside of .ent");
+ as_warn (_(".fmask outside of .ent"));
demand_empty_rest_of_line ();
return;
}
if (get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn ("Bad .fmask directive");
+ as_warn (_("Bad .fmask directive"));
--input_line_pointer;
demand_empty_rest_of_line ();
return;
@@ -3203,7 +3213,7 @@ ecoff_directive_frame (ignore)
if (cur_proc_ptr == (proc_t *) NULL)
{
- as_warn (".frame outside of .ent");
+ as_warn (_(".frame outside of .ent"));
demand_empty_rest_of_line ();
return;
}
@@ -3214,7 +3224,7 @@ ecoff_directive_frame (ignore)
if (*input_line_pointer++ != ','
|| get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn ("Bad .frame directive");
+ as_warn (_("Bad .frame directive"));
--input_line_pointer;
demand_empty_rest_of_line ();
return;
@@ -3243,14 +3253,14 @@ ecoff_directive_mask (ignore)
if (cur_proc_ptr == (proc_t *) NULL)
{
- as_warn (".mask outside of .ent");
+ as_warn (_(".mask outside of .ent"));
demand_empty_rest_of_line ();
return;
}
if (get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn ("Bad .mask directive");
+ as_warn (_("Bad .mask directive"));
--input_line_pointer;
demand_empty_rest_of_line ();
return;
@@ -3273,14 +3283,14 @@ ecoff_directive_loc (ignore)
if (cur_file_ptr == (efdr_t *) NULL)
{
- as_warn (".loc before .file");
+ as_warn (_(".loc before .file"));
demand_empty_rest_of_line ();
return;
}
if (now_seg != text_section)
{
- as_warn (".loc outside of .text");
+ as_warn (_(".loc outside of .text"));
demand_empty_rest_of_line ();
return;
}
@@ -3377,7 +3387,8 @@ mark_stabs (ignore)
}
/* Parse .weakext directives. */
-
+#ifndef TC_MIPS
+/* For TC_MIPS use the version in tc-mips.c. */
void
ecoff_directive_weakext (ignore)
int ignore;
@@ -3398,7 +3409,7 @@ ecoff_directive_weakext (ignore)
{
if (S_IS_DEFINED (symbolP))
{
- as_bad ("Ignoring attempt to redefine symbol `%s'.",
+ as_bad (_("Ignoring attempt to redefine symbol `%s'."),
S_GET_NAME (symbolP));
ignore_rest_of_line ();
return;
@@ -3411,7 +3422,7 @@ ecoff_directive_weakext (ignore)
expression (&exp);
if (exp.X_op != O_symbol)
{
- as_bad ("bad .weakext directive");
+ as_bad (_("bad .weakext directive"));
ignore_rest_of_line();
return;
}
@@ -3423,6 +3434,7 @@ ecoff_directive_weakext (ignore)
demand_empty_rest_of_line ();
}
+#endif /* not TC_MIPS */
/* Handle .stabs directives. The actual parsing routine is done by a
generic routine. This routine is called via OBJ_PROCESS_STAB.
@@ -3479,7 +3491,7 @@ ecoff_stab (sec, what, string, type, other, desc)
/* We don't handle .stabd. */
if (what != 's' && what != 'n')
{
- as_bad (".stab%c is not supported", what);
+ as_bad (_(".stab%c is not supported"), what);
return;
}
@@ -3489,7 +3501,7 @@ ecoff_stab (sec, what, string, type, other, desc)
/* We ignore the other field. */
if (other != 0)
- as_warn (".stab%c: ignoring non-zero other field", what);
+ as_warn (_(".stab%c: ignoring non-zero other field"), what);
/* Make sure we have a current file. */
if (cur_file_ptr == (efdr_t *) NULL)
@@ -3523,7 +3535,7 @@ ecoff_stab (sec, what, string, type, other, desc)
dummy_symr.index = desc;
if (dummy_symr.index != desc)
{
- as_warn ("Line number (%d) for .stab%c directive cannot fit in index field (20 bits)",
+ as_warn (_("Line number (%d) for .stab%c directive cannot fit in index field (20 bits)"),
desc, what);
return;
}
@@ -3559,7 +3571,7 @@ ecoff_stab (sec, what, string, type, other, desc)
}
else if (! is_name_beginner ((unsigned char) *input_line_pointer))
{
- as_warn ("Illegal .stab%c directive, bad character", what);
+ as_warn (_("Illegal .stab%c directive, bad character"), what);
return;
}
else
@@ -3642,7 +3654,7 @@ ecoff_frob_symbol (sym)
if (sym->bsym->flags & BSF_WEAK)
{
if (S_IS_COMMON (sym))
- as_bad ("Symbol `%s' can not be both weak and common",
+ as_bad (_("Symbol `%s' can not be both weak and common"),
S_GET_NAME (sym));
}
}
@@ -4016,7 +4028,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
begin_sym = sym_ptr->proc_ptr->sym->as_sym;
if (S_GET_SEGMENT (as_sym)
!= S_GET_SEGMENT (begin_sym))
- as_warn (".begin/.bend in different segments");
+ as_warn (_(".begin/.bend in different segments"));
sym_ptr->ecoff_sym.asym.value =
S_GET_VALUE (as_sym) - S_GET_VALUE (begin_sym);
}
@@ -4203,7 +4215,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
know (begin_ptr->as_sym != (symbolS *) NULL);
if (S_GET_SEGMENT (as_sym)
!= S_GET_SEGMENT (begin_ptr->as_sym))
- as_warn (".begin/.bend in different segments");
+ as_warn (_(".begin/.bend in different segments"));
sym_ptr->ecoff_sym.asym.value =
(S_GET_VALUE (as_sym)
- S_GET_VALUE (begin_ptr->as_sym));
@@ -4228,7 +4240,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
begin_sym = sym_ptr->proc_ptr->sym->as_sym;
if (S_GET_SEGMENT (as_sym)
!= S_GET_SEGMENT (begin_sym))
- as_warn (".begin/.bend in different segments");
+ as_warn (_(".begin/.bend in different segments"));
sym_ptr->ecoff_sym.asym.value =
S_GET_VALUE (as_sym) - S_GET_VALUE (begin_sym);
}
@@ -4726,7 +4738,7 @@ ecoff_build_debug (hdr, bufp, backend)
cur_file_ptr->cur_scope = cur_file_ptr->cur_scope->prev;
if (! end_warning && ! cur_file_ptr->fake)
{
- as_warn ("Missing .end or .bend at end of file");
+ as_warn (_("Missing .end or .bend at end of file"));
end_warning = 1;
}
}
@@ -5217,110 +5229,13 @@ ecoff_set_gp_prolog_size (sz)
cur_proc_ptr->pdr.gp_prologue = sz;
if (cur_proc_ptr->pdr.gp_prologue != sz)
{
- as_warn ("GP prologue size exceeds field size, using 0 instead");
+ as_warn (_("GP prologue size exceeds field size, using 0 instead"));
cur_proc_ptr->pdr.gp_prologue = 0;
}
cur_proc_ptr->pdr.gp_used = 1;
}
-static void
-generate_ecoff_stab (what, string, type, other, desc)
- int what;
- const char *string;
- int type;
- int other;
- int desc;
-{
- efdr_t *save_file_ptr = cur_file_ptr;
- symbolS *sym;
- symint_t value;
- st_t st;
- sc_t sc;
- symint_t indx;
- localsym_t *hold = NULL;
-
- /* We don't handle .stabd. */
- if (what != 's' && what != 'n')
- {
- as_bad (".stab%c is not supported", what);
- return;
- }
-
- /* We ignore the other field. */
- if (other != 0)
- as_warn (".stab%c: ignoring non-zero other field", what);
-
- /* Make sure we have a current file. */
- if (cur_file_ptr == (efdr_t *) NULL)
- {
- add_file ((const char *) NULL, 0, 1);
- save_file_ptr = cur_file_ptr;
- }
-
- /* For stabs in ECOFF, the first symbol must be @stabs. This is a
- signal to gdb. */
- if (stabs_seen == 0)
- mark_stabs (0);
-
- /* Line number stabs are handled differently, since they have two
- values, the line number and the address of the label. We use the
- index field (aka desc) to hold the line number, and the value
- field to hold the address. The symbol type is st_Label, which
- should be different from the other stabs, so that gdb can
- recognize it. */
- if (type == N_SLINE)
- {
- SYMR dummy_symr;
-
-#ifndef NO_LISTING
- if (listing)
- listing_source_line ((unsigned int) desc);
-#endif
-
- dummy_symr.index = desc;
- if (dummy_symr.index != desc)
- {
- as_warn ("Line number (%d) for .stab%c directive cannot fit in index field (20 bits)",
- desc, what);
- return;
- }
-
- sym = symbol_find_or_make ((char *)string);
- value = 0;
- st = st_Label;
- sc = sc_Text;
- indx = desc;
- }
- else
- {
-#ifndef NO_LISTING
- if (listing && (type == N_SO || type == N_SOL))
- listing_source_file (string);
-#endif
-
- sym = symbol_find_or_make ((char *)string);
- sc = sc_Nil;
- st = st_Nil;
- value = 0;
- indx = ECOFF_MARK_STAB (type);
- }
-
- /* Don't store the stabs symbol we are creating as the type of the
- ECOFF symbol. We want to compute the type of the ECOFF symbol
- independently. */
- if (sym != (symbolS *) NULL)
- hold = sym->ecoff_symbol;
-
- (void) add_ecoff_symbol (string, st, sc, sym, (bfd_vma) 0, value, indx);
-
- if (sym != (symbolS *) NULL)
- sym->ecoff_symbol = hold;
-
- /* Restore normal file type. */
- cur_file_ptr = save_file_ptr;
-}
-
int
ecoff_no_current_file ()
{
diff --git a/gas/gasp.c b/gas/gasp.c
index d64c242..1b72838 100644
--- a/gas/gasp.c
+++ b/gas/gasp.c
@@ -67,6 +67,7 @@ extern char *malloc ();
#include "libiberty.h"
#include "sb.h"
#include "macro.h"
+#include "asintl.h"
char *program_version = "1.2";
@@ -475,7 +476,7 @@ hash_add_to_string_table (tab, key, name, again)
if (ptr->value.s.len)
{
if (!again)
- ERROR ((stderr, "redefinition not allowed\n"));
+ ERROR ((stderr, _("redefinition not allowed\n")));
}
ptr->type = hash_string;
@@ -549,7 +550,7 @@ checkconst (op, term)
if (term->add_symbol.len
|| term->sub_symbol.len)
{
- ERROR ((stderr, "the %c operator cannot take non-absolute arguments.\n", op));
+ ERROR ((stderr, _("the %c operator cannot take non-absolute arguments.\n"), op));
}
}
@@ -626,13 +627,13 @@ level_0 (idx, string, lhs)
{
sb acc;
sb_new (&acc);
- ERROR ((stderr, "string where expression expected.\n"));
+ ERROR ((stderr, _("string where expression expected.\n")));
idx = getstring (idx, string, &acc);
sb_kill (&acc);
}
else
{
- ERROR ((stderr, "can't find primary in expression.\n"));
+ ERROR ((stderr, _("can't find primary in expression.\n")));
idx++;
}
return sb_skip_white (idx, string);
@@ -672,7 +673,7 @@ level_1 (idx, string, lhs)
idx++;
idx = level_5 (sb_skip_white (idx, string), string, lhs);
if (string->ptr[idx] != ')')
- ERROR ((stderr, "misplaced closing parens.\n"));
+ ERROR ((stderr, _("misplaced closing parens.\n")));
else
idx++;
break;
@@ -709,7 +710,7 @@ level_2 (idx, string, lhs)
checkconst ('/', lhs);
checkconst ('/', &rhs);
if (rhs.value == 0)
- ERROR ((stderr, "attempt to divide by zero.\n"));
+ ERROR ((stderr, _("attempt to divide by zero.\n")));
else
lhs->value /= rhs.value;
break;
@@ -741,7 +742,7 @@ level_3 (idx, string, lhs)
lhs->value += rhs.value;
if (lhs->add_symbol.name && rhs.add_symbol.name)
{
- ERROR ((stderr, "can't add two relocatable expressions\n"));
+ ERROR ((stderr, _("can't add two relocatable expressions\n")));
}
/* change nn+symbol to symbol + nn */
if (rhs.add_symbol.name)
@@ -946,7 +947,7 @@ include_buf (name, ptr, type, index)
{
sp++;
if (sp - include_stack >= MAX_INCLUDES)
- FATAL ((stderr, "unreasonable nesting.\n"));
+ FATAL ((stderr, _("unreasonable nesting.\n")));
sb_new (&sp->name);
sb_add_sb (&sp->name, name);
sp->handle = 0;
@@ -1024,7 +1025,7 @@ get_line (in)
{
if (online)
{
- WARNING ((stderr, "End of file not at start of line.\n"));
+ WARNING ((stderr, _("End of file not at start of line.\n")));
if (copysource)
putc ('\n', outfile);
ch = '\n';
@@ -1145,7 +1146,7 @@ change_base (idx, in, out)
base = 10;
break;
default:
- ERROR ((stderr, "Illegal base character %c.\n", in->ptr[idx]));
+ ERROR ((stderr, _("Illegal base character %c.\n"), in->ptr[idx]));
base = 10;
break;
}
@@ -1260,7 +1261,7 @@ do_radix (ptr)
radix = 16;
break;
default:
- ERROR ((stderr, "radix is %c must be one of b, q, d or h", radix));
+ ERROR ((stderr, _("radix is %c must be one of b, q, d or h"), radix));
}
}
@@ -1296,7 +1297,7 @@ get_opsize (idx, in, size)
case '\t':
break;
default:
- ERROR ((stderr, "size must be one of b, w or l, is %c.\n", in->ptr[idx]));
+ ERROR ((stderr, _("size must be one of b, w or l, is %c.\n"), in->ptr[idx]));
break;
}
idx++;
@@ -1404,9 +1405,9 @@ do_datab (idx, in)
idx = get_opsize (idx, in, &opsize);
- idx = exp_get_abs ("datab repeat must be constant.\n", idx, in, &repeat);
+ idx = exp_get_abs (_("datab repeat must be constant.\n"), idx, in, &repeat);
idx = sb_skip_comma (idx, in);
- idx = exp_get_abs ("datab data must be absolute.\n", idx, in, &fill);
+ idx = exp_get_abs (_("datab data must be absolute.\n"), idx, in, &fill);
fprintf (outfile, ".fill\t%d,%d,%d\n", repeat, opsize, fill);
}
@@ -1420,14 +1421,14 @@ do_align (idx, in)
{
int al, have_fill, fill;
- idx = exp_get_abs ("align needs absolute expression.\n", idx, in, &al);
+ idx = exp_get_abs (_("align needs absolute expression.\n"), idx, in, &al);
idx = sb_skip_white (idx, in);
have_fill = 0;
fill = 0;
if (! eol (idx, in))
{
idx = sb_skip_comma (idx, in);
- idx = exp_get_abs (".align needs absolute fill value.\n", idx, in,
+ idx = exp_get_abs (_(".align needs absolute fill value.\n"), idx, in,
&fill);
have_fill = 1;
}
@@ -1435,7 +1436,7 @@ do_align (idx, in)
if (al != 1
&& al != 2
&& al != 4)
- WARNING ((stderr, "alignment must be one of 1, 2 or 4.\n"));
+ WARNING ((stderr, _("alignment must be one of 1, 2 or 4.\n")));
fprintf (outfile, ".align %d", al);
if (have_fill)
@@ -1460,7 +1461,7 @@ do_res (idx, in, type)
idx = sb_skip_white (idx, in);
if (in->ptr[idx] == ',')
idx++;
- idx = exp_get_abs ("res needs absolute expression for fill count.\n", idx, in, &count);
+ idx = exp_get_abs (_("res needs absolute expression for fill count.\n"), idx, in, &count);
if (type == 'c' || type == 'z')
count++;
@@ -1540,13 +1541,13 @@ do_form (idx, in)
if (strncasecmp (in->ptr + idx, "LIN=", 4) == 0)
{
idx += 4;
- idx = exp_get_abs ("form LIN= needs absolute expresssion.\n", idx, in, &lines);
+ idx = exp_get_abs (_("form LIN= needs absolute expresssion.\n"), idx, in, &lines);
}
- if (strncasecmp (in->ptr + idx, "COL=", 4) == 0)
+ if (strncasecmp (in->ptr + idx, _("COL="), 4) == 0)
{
idx += 4;
- idx = exp_get_abs ("form COL= needs absolute expresssion.\n", idx, in, &columns);
+ idx = exp_get_abs (_("form COL= needs absolute expresssion.\n"), idx, in, &columns);
}
idx++;
@@ -1588,7 +1589,7 @@ get_any_string (idx, in, out, expand, pretend_quoted)
int val;
char buf[20];
/* Turns the next expression into a string */
- idx = exp_get_abs ("% operator needs absolute expression",
+ idx = exp_get_abs (_("% operator needs absolute expression"),
idx + 1,
in,
&val);
@@ -1650,7 +1651,7 @@ skip_openp (idx, in)
{
idx = sb_skip_white (idx, in);
if (in->ptr[idx] != '(')
- ERROR ((stderr, "misplaced ( .\n"));
+ ERROR ((stderr, _("misplaced ( .\n")));
idx = sb_skip_white (idx + 1, in);
return idx;
}
@@ -1665,7 +1666,7 @@ skip_closep (idx, in)
{
idx = sb_skip_white (idx, in);
if (in->ptr[idx] != ')')
- ERROR ((stderr, "misplaced ).\n"));
+ ERROR ((stderr, _("misplaced ).\n")));
idx = sb_skip_white (idx + 1, in);
return idx;
}
@@ -1719,7 +1720,7 @@ doinstr (idx, in, out)
idx = sb_skip_comma (idx, in);
if (isdigit ((unsigned char) in->ptr[idx]))
{
- idx = exp_get_abs (".instr needs absolute expresson.\n", idx, in, &start);
+ idx = exp_get_abs (_(".instr needs absolute expresson.\n"), idx, in, &start);
}
else
{
@@ -1757,9 +1758,9 @@ dosubstr (idx, in, out)
idx = skip_openp (idx, in);
idx = get_and_process (idx, in, &string);
idx = sb_skip_comma (idx, in);
- idx = exp_get_abs ("need absolute position.\n", idx, in, &pos);
+ idx = exp_get_abs (_("need absolute position.\n"), idx, in, &pos);
idx = sb_skip_comma (idx, in);
- idx = exp_get_abs ("need absolute length.\n", idx, in, &len);
+ idx = exp_get_abs (_("need absolute length.\n"), idx, in, &len);
idx = skip_closep (idx, in);
@@ -2008,7 +2009,7 @@ process_file ()
}
if (!had_end && !mri)
- WARNING ((stderr, "END missing from end of file.\n"));
+ WARNING ((stderr, _("END missing from end of file.\n")));
}
@@ -2038,11 +2039,11 @@ do_assigna (idx, in)
sb_new (&tmp);
process_assigns (idx, in, &tmp);
- idx = exp_get_abs (".ASSIGNA needs constant expression argument.\n", 0, &tmp, &val);
+ idx = exp_get_abs (_(".ASSIGNA needs constant expression argument.\n"), 0, &tmp, &val);
if (!label.len)
{
- ERROR ((stderr, ".ASSIGNA without label.\n"));
+ ERROR ((stderr, _(".ASSIGNA without label.\n")));
}
else
{
@@ -2067,7 +2068,7 @@ do_assignc (idx, in)
if (!label.len)
{
- ERROR ((stderr, ".ASSIGNS without label.\n"));
+ ERROR ((stderr, _(".ASSIGNS without label.\n")));
}
else
{
@@ -2134,7 +2135,7 @@ condass_lookup_name (inbuf, idx, out, warn)
{
if (warn)
{
- WARNING ((stderr, "Can't find preprocessor variable %s.\n", sb_name (&condass_acc)));
+ WARNING ((stderr, _("Can't find preprocessor variable %s.\n"), sb_name (&condass_acc)));
}
else
{
@@ -2199,7 +2200,7 @@ whatcond (idx, in, val)
}
if (cond == NEVER)
{
- ERROR ((stderr, "Comparison operator must be one of EQ, NE, LT, LE, GT or GE.\n"));
+ ERROR ((stderr, _("Comparison operator must be one of EQ, NE, LT, LE, GT or GE.\n")));
cond = NEVER;
}
idx = sb_skip_white (idx + 2, in);
@@ -2233,7 +2234,7 @@ istrue (idx, in)
if (cond != EQ && cond != NE)
{
- ERROR ((stderr, "Comparison operator for strings must be EQ or NE\n"));
+ ERROR ((stderr, _("Comparison operator for strings must be EQ or NE\n")));
res = 0;
}
else
@@ -2245,17 +2246,17 @@ istrue (idx, in)
int vala;
int valb;
int cond;
- idx = exp_get_abs ("Conditional operator must have absolute operands.\n", idx, in, &vala);
+ idx = exp_get_abs (_("Conditional operator must have absolute operands.\n"), idx, in, &vala);
idx = whatcond (idx, in, &cond);
idx = sb_skip_white (idx, in);
if (in->ptr[idx] == '"')
{
- WARNING ((stderr, "String compared against expression.\n"));
+ WARNING ((stderr, _("String compared against expression.\n")));
res = 0;
}
else
{
- idx = exp_get_abs ("Conditional operator must have absolute operands.\n", idx, in, &valb);
+ idx = exp_get_abs (_("Conditional operator must have absolute operands.\n"), idx, in, &valb);
switch (cond)
{
default:
@@ -2300,7 +2301,7 @@ do_aif (idx, in)
{
if (ifi >= IFNESTING)
{
- FATAL ((stderr, "AIF nesting unreasonable.\n"));
+ FATAL ((stderr, _("AIF nesting unreasonable.\n")));
}
ifi++;
ifstack[ifi].on = ifstack[ifi-1].on ? istrue (idx, in) : 0;
@@ -2315,7 +2316,7 @@ do_aelse ()
ifstack[ifi].on = ifstack[ifi-1].on ? !ifstack[ifi].on : 0;
if (ifstack[ifi].hadelse)
{
- ERROR ((stderr, "Multiple AELSEs in AIF.\n"));
+ ERROR ((stderr, _("Multiple AELSEs in AIF.\n")));
}
ifstack[ifi].hadelse = 1;
}
@@ -2331,7 +2332,7 @@ do_aendi ()
}
else
{
- ERROR ((stderr, "AENDI without AIF.\n"));
+ ERROR ((stderr, _("AENDI without AIF.\n")));
}
}
@@ -2354,10 +2355,10 @@ do_if (idx, in, cond)
if (ifi >= IFNESTING)
{
- FATAL ((stderr, "IF nesting unreasonable.\n"));
+ FATAL ((stderr, _("IF nesting unreasonable.\n")));
}
- idx = exp_get_abs ("Conditional operator must have absolute operands.\n",
+ idx = exp_get_abs (_("Conditional operator must have absolute operands.\n"),
idx, in, &val);
switch (cond)
{
@@ -2436,7 +2437,7 @@ do_ifc (idx, in, ifnc)
if (ifi >= IFNESTING)
{
- FATAL ((stderr, "IF nesting unreasonable.\n"));
+ FATAL ((stderr, _("IF nesting unreasonable.\n")));
}
sb_new (&first);
@@ -2446,7 +2447,7 @@ do_ifc (idx, in, ifnc)
if (idx >= in->len || in->ptr[idx] != ',')
{
- ERROR ((stderr, "Bad format for IF or IFNC.\n"));
+ ERROR ((stderr, _("Bad format for IF or IFNC.\n")));
return;
}
@@ -2466,9 +2467,9 @@ static void
do_aendr ()
{
if (!mri)
- ERROR ((stderr, "AENDR without a AREPEAT.\n"));
+ ERROR ((stderr, _("AENDR without a AREPEAT.\n")));
else
- ERROR ((stderr, "ENDR without a REPT.\n"));
+ ERROR ((stderr, _("ENDR without a REPT.\n")));
}
/* .AWHILE */
@@ -2491,7 +2492,7 @@ do_awhile (idx, in)
doit = istrue (0, &exp);
if (! buffer_and_nest ("AWHILE", "AENDW", &sub, get_line))
- FATAL ((stderr, "AWHILE without a AENDW at %d.\n", line - 1));
+ FATAL ((stderr, _("AWHILE without a AENDW at %d.\n"), line - 1));
/* Turn
.AWHILE exp
@@ -2529,7 +2530,7 @@ do_awhile (idx, in)
static void
do_aendw ()
{
- ERROR ((stderr, "AENDW without a AENDW.\n"));
+ ERROR ((stderr, _("AENDW without a AENDW.\n")));
}
@@ -2574,13 +2575,13 @@ do_arepeat (idx, in)
sb_new (&copy);
sb_new (&sub);
process_assigns (idx, in, &exp);
- idx = exp_get_abs ("AREPEAT must have absolute operand.\n", 0, &exp, &rc);
+ idx = exp_get_abs (_("AREPEAT must have absolute operand.\n"), 0, &exp, &rc);
if (!mri)
ret = buffer_and_nest ("AREPEAT", "AENDR", &sub, get_line);
else
ret = buffer_and_nest ("REPT", "ENDR", &sub, get_line);
if (! ret)
- FATAL ((stderr, "AREPEAT without a AENDR at %d.\n", line - 1));
+ FATAL ((stderr, _("AREPEAT without a AENDR at %d.\n"), line - 1));
if (rc > 0)
{
/* Push back the text following the repeat, and another repeat block
@@ -2622,7 +2623,7 @@ do_arepeat (idx, in)
static void
do_endm ()
{
- ERROR ((stderr, ".ENDM without a matching .MACRO.\n"));
+ ERROR ((stderr, _(".ENDM without a matching .MACRO.\n")));
}
/* MRI IRP pseudo-op. */
@@ -2656,7 +2657,7 @@ do_local (idx, line)
int idx;
sb *line;
{
- ERROR ((stderr, "LOCAL outside of MACRO"));
+ ERROR ((stderr, _("LOCAL outside of MACRO")));
}
static void
@@ -2669,7 +2670,7 @@ do_macro (idx, in)
err = define_macro (idx, in, &label, get_line, (const char **) NULL);
if (err != NULL)
- ERROR ((stderr, "macro at line %d: %s\n", line - 1, err));
+ ERROR ((stderr, _("macro at line %d: %s\n"), line - 1, err));
}
static int
@@ -2692,7 +2693,7 @@ macro_op (idx, in)
ERROR ((stderr, "%s\n", err));
sb_new (&name);
- sb_add_string (&name, "macro expansion");
+ sb_add_string (&name, _("macro expansion"));
include_buf (&name, &out, include_macro, include_next_index ());
@@ -2744,12 +2745,12 @@ getstring (idx, in, acc)
else {
int code;
idx++;
- idx = exp_get_abs ("Character code in string must be absolute expression.\n",
+ idx = exp_get_abs (_("Character code in string must be absolute expression.\n"),
idx, in, &code);
sb_add_char (acc, code);
if (in->ptr[idx] != '>')
- ERROR ((stderr, "Missing > for character code.\n"));
+ ERROR ((stderr, _("Missing > for character code.\n")));
idx++;
}
}
@@ -2808,7 +2809,7 @@ do_sdata (idx, in, type)
{
if (acc.len > 255)
{
- ERROR ((stderr, "string for SDATAC longer than 255 characters (%d).\n", acc.len));
+ ERROR ((stderr, _("string for SDATAC longer than 255 characters (%d).\n"), acc.len));
}
fprintf (outfile, "%d", acc.len);
nc = 1;
@@ -2836,7 +2837,7 @@ do_sdata (idx, in, type)
if (!alternate && in->ptr[idx] != ',' && idx != in->len)
{
fprintf (outfile, "\n");
- ERROR ((stderr, "illegal character in SDATA line (0x%x).\n", in->ptr[idx]));
+ ERROR ((stderr, _("illegal character in SDATA line (0x%x).\n"), in->ptr[idx]));
break;
}
idx++;
@@ -2857,10 +2858,10 @@ do_sdatab (idx, in)
sb acc;
sb_new (&acc);
- idx = exp_get_abs ("Must have absolute SDATAB repeat count.\n", idx, in, &repeat);
+ idx = exp_get_abs (_("Must have absolute SDATAB repeat count.\n"), idx, in, &repeat);
if (repeat <= 0)
{
- ERROR ((stderr, "Must have positive SDATAB repeat count (%d).\n", repeat));
+ ERROR ((stderr, _("Must have positive SDATAB repeat count (%d).\n"), repeat));
repeat = 1;
}
@@ -2888,7 +2889,7 @@ new_file (name)
return 0;
if (isp == MAX_INCLUDES)
- FATAL ((stderr, "Unreasonable include depth (%ld).\n", (long) isp));
+ FATAL ((stderr, _("Unreasonable include depth (%ld).\n"), (long) isp));
sp++;
sp->handle = newone;
@@ -2942,7 +2943,7 @@ do_include (idx, in)
if (!includes)
{
if (! new_file (sb_name (&t)))
- FATAL ((stderr, "Can't open include file `%s'.\n", sb_name (&t)));
+ FATAL ((stderr, _("Can't open include file `%s'.\n"), sb_name (&t)));
}
sb_kill (&cat);
sb_kill (&t);
@@ -3016,7 +3017,7 @@ include_next_index ()
static int index;
if (!unreasonable
&& index > MAX_REASONABLE)
- FATAL ((stderr, "Unreasonable expansion (-u turns off check).\n"));
+ FATAL ((stderr, _("Unreasonable expansion (-u turns off check).\n")));
return ++index;
}
@@ -3237,7 +3238,7 @@ process_pseudo_op (idx, line, acc)
#if 0
/* This one causes lots of pain when trying to preprocess
ordinary code */
- WARNING ((stderr, "Unrecognised pseudo op `%s'.\n", sb_name (acc)));
+ WARNING ((stderr, _("Unrecognised pseudo op `%s'.\n"), sb_name (acc)));
#endif
return 0;
}
@@ -3304,7 +3305,7 @@ process_pseudo_op (idx, line, acc)
do_aendi ();
return 1;
case K_ORG:
- ERROR ((stderr, "ORG command not allowed.\n"));
+ ERROR ((stderr, _("ORG command not allowed.\n")));
break;
case K_RADIX:
do_radix (line);
@@ -3521,7 +3522,7 @@ do_define (string)
sb_add_char (&value, *string);
string++;
}
- exp_get_abs ("Invalid expression on command line.\n", 0, &value, &res);
+ exp_get_abs (_("Invalid expression on command line.\n"), 0, &value, &res);
sb_kill (&value);
break;
}
@@ -3562,7 +3563,7 @@ show_usage (file, status)
FILE *file;
int status;
{
- fprintf (file, "\
+ fprintf (file, _("\
Usage: %s \n\
[-a] [--alternate] enter alternate macro mode\n\
[-c char] [--commentchar char] change the comment character from !\n\
@@ -3570,16 +3571,16 @@ Usage: %s \n\
[-h] [--help] print this message\n\
[-M] [--mri] enter MRI compatibility mode\n\
[-o out] [--output out] set the output file\n\
- [-p] [--print] print line numbers\n", program_name);
- fprintf (file, "\
+ [-p] [--print] print line numbers\n"), program_name);
+ fprintf (file, _("\
[-s] [--copysource] copy source through as comments \n\
[-u] [--unreasonable] allow unreasonable nesting\n\
[-v] [--version] print the program version\n\
[-Dname=value] create preprocessor variable called name, with value\n\
[-Ipath] add to include path list\n\
- [in-file]\n");
+ [in-file]\n"));
if (status == 0)
- printf ("\nReport bugs to bug-gnu-utils@gnu.org\n");
+ printf (_("\nReport bugs to bug-gnu-utils@gnu.org\n"));
exit (status);
}
@@ -3587,7 +3588,7 @@ Usage: %s \n\
static void
show_help ()
{
- printf ("%s: Gnu Assembler Macro Preprocessor\n",
+ printf (_("%s: Gnu Assembler Macro Preprocessor\n"),
program_name);
show_usage (stdout, 0);
}
@@ -3604,7 +3605,9 @@ main (argc, argv)
ifstack[0].on = 1;
ifi = 0;
-
+ setlocale (LC_MESSAGES, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
program_name = argv[0];
xmalloc_set_program_name (program_name);
@@ -3667,11 +3670,11 @@ main (argc, argv)
/*NOTREACHED*/
case 'v':
/* This output is intended to follow the GNU standards document. */
- printf ("GNU assembler pre-processor %s\n", program_version);
- printf ("Copyright 1996 Free Software Foundation, Inc.\n");
- printf ("\
+ printf (_("GNU assembler pre-processor %s\n"), program_version);
+ printf (_("Copyright 1996 Free Software Foundation, Inc.\n"));
+ printf (_("\
This program is free software; you may redistribute it under the terms of\n\
-the GNU General Public License. This program has absolutely no warranty.\n");
+the GNU General Public License. This program has absolutely no warranty.\n"));
exit (0);
/*NOTREACHED*/
case 0:
@@ -3690,7 +3693,7 @@ the GNU General Public License. This program has absolutely no warranty.\n");
outfile = fopen (out_name, "w");
if (!outfile)
{
- fprintf (stderr, "%s: Can't open output file `%s'.\n",
+ fprintf (stderr, _("%s: Can't open output file `%s'.\n"),
program_name, out_name);
exit (1);
}
@@ -3713,7 +3716,7 @@ the GNU General Public License. This program has absolutely no warranty.\n");
}
else
{
- fprintf (stderr, "%s: Can't open input file `%s'.\n",
+ fprintf (stderr, _("%s: Can't open input file `%s'.\n"),
program_name, argv[optind]);
exit (1);
}
@@ -3732,9 +3735,9 @@ as_abort (file, line, fn)
const char *file, *fn;
int line;
{
- fprintf (stderr, "Internal error, aborting at %s line %d", file, line);
+ fprintf (stderr, _("Internal error, aborting at %s line %d"), file, line);
if (fn)
fprintf (stderr, " in %s", fn);
- fprintf (stderr, "\nPlease report this bug.\n");
+ fprintf (stderr, _("\nPlease report this bug.\n"));
exit (1);
}
diff --git a/gas/po/Make-in b/gas/po/Make-in
new file mode 100644
index 0000000..82d3590
--- /dev/null
+++ b/gas/po/Make-in
@@ -0,0 +1,250 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# 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.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+gnulocaledir = $(prefix)/share/locale
+gettextsrcdir = $(prefix)/share/gettext/po
+subdir = po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
+
+CC = @CC@
+GENCAT = @GENCAT@
+GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
+MSGMERGE = PATH=../src:$$PATH msgmerge
+
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
+INCLUDES = -I.. -I$(top_srcdir)/intl
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+SOURCES = cat-id-tbl.c
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
+stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
+
+.c.o:
+ $(COMPILE) $<
+
+.po.pox:
+ $(MAKE) $(PACKAGE).pot
+ $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && $(GENCAT) $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(srcdir)/$(PACKAGE).pot: @MAINT@ $(POTFILES)
+ $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ --add-comments --keyword=_ --keyword=N_ \
+ --files-from=$(srcdir)/POTFILES.in
+ rm -f $(srcdir)/$(PACKAGE).pot
+ mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
+
+$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
+$(srcdir)/stamp-cat-id: $(PACKAGE).pot
+ rm -f cat-id-tbl.tmp
+ sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
+ | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
+ if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
+ rm cat-id-tbl.tmp; \
+ else \
+ echo cat-id-tbl.c changed; \
+ rm -f $(srcdir)/cat-id-tbl.c; \
+ mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
+ fi
+ cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(datadir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $$dir; \
+ else \
+ $(top_srcdir)/mkinstalldirs $$dir; \
+ fi; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(gettextsrcdir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+ $(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ done
+ rm -f $(gettextsrcdir)/po-Makefile.in.in
+
+check: all
+
+cat-id-tbl.o: ../intl/libgettext.h
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: update-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(PACKAGE).pot
+ PATH=`pwd`/../src:$$PATH; \
+ cd $(srcdir); \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ mv $$lang.po $$lang.old.po; \
+ echo "$$lang:"; \
+ if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
+ rm -f $$lang.old.po; \
+ else \
+ echo "msgmerge for $$cat failed!"; \
+ rm -f $$lang.po; \
+ mv $$lang.old.po $$lang.po; \
+ fi; \
+ done
+
+POTFILES: POTFILES.in
+ ( if test 'x$(srcdir)' != 'x.'; then \
+ posrcprefix='$(top_srcdir)/'; \
+ else \
+ posrcprefix="../"; \
+ fi; \
+ rm -f $@-t $@ \
+ && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
+ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+POTFILES.in: @MAINT@ ../Makefile
+ cd .. && $(MAKE) po/POTFILES.in
+
+Makefile: Make-in ../config.status POTFILES
+ cd .. \
+ && CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
+ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/gas/po/POTFILES.in b/gas/po/POTFILES.in
new file mode 100644
index 0000000..476c67c
--- /dev/null
+++ b/gas/po/POTFILES.in
@@ -0,0 +1,157 @@
+app.c
+app.c
+as.c
+as.c
+as.h
+atof-generic.c
+atof-generic.c
+bignum-copy.c
+bignum-copy.c
+bignum.h
+bit_fix.h
+cond.c
+cond.c
+config/e-i386coff.c
+config/e-i386elf.c
+config/e-mipsecoff.c
+config/e-mipself.c
+config/obj-aout.c
+config/obj-aout.h
+config/obj-bout.c
+config/obj-bout.h
+config/obj-coff.c
+config/obj-coff.h
+config/obj-ecoff.c
+config/obj-ecoff.h
+config/obj-elf.c
+config/obj-elf.h
+config/obj-evax.c
+config/obj-evax.h
+config/obj-hp300.c
+config/obj-hp300.h
+config/obj-ieee.c
+config/obj-ieee.h
+config/obj-som.c
+config/obj-som.h
+config/obj-vms.c
+config/obj-vms.h
+config/tc-a29k.c
+config/tc-a29k.h
+config/tc-alpha.c
+config/tc-alpha.h
+config/tc-arc.c
+config/tc-arc.h
+config/tc-arm.c
+config/tc-arm.h
+config/tc-d10v.c
+config/tc-d10v.h
+config/tc-h8300.c
+config/tc-h8300.h
+config/tc-h8500.c
+config/tc-h8500.h
+config/tc-hppa.c
+config/tc-hppa.h
+config/tc-i386.c
+config/tc-i386.h
+config/tc-i860.c
+config/tc-i860.h
+config/tc-i960.c
+config/tc-i960.h
+config/tc-m32r.c
+config/tc-m32r.h
+config/tc-m68k.c
+config/tc-m68k.h
+config/tc-m88k.c
+config/tc-m88k.h
+config/tc-mips.c
+config/tc-mips.h
+config/tc-mn10200.c
+config/tc-mn10200.h
+config/tc-mn10300.c
+config/tc-mn10300.h
+config/tc-ns32k.c
+config/tc-ns32k.h
+config/tc-ppc.c
+config/tc-ppc.h
+config/tc-sh.c
+config/tc-sh.h
+config/tc-sparc.c
+config/tc-sparc.h
+config/tc-tahoe.c
+config/tc-tahoe.h
+config/tc-tic30.c
+config/tc-tic30.h
+config/tc-v850.c
+config/tc-v850.h
+config/tc-vax.c
+config/tc-vax.h
+config/tc-w65.c
+config/tc-w65.h
+config/tc-z8k.c
+config/tc-z8k.h
+depend.c
+depend.c
+ecoff.c
+ecoff.c
+ecoff.h
+ehopt.c
+ehopt.c
+emul-target.h
+emul.h
+expr.c
+expr.c
+expr.h
+flonum-copy.c
+flonum-copy.c
+flonum-konst.c
+flonum-konst.c
+flonum-mult.c
+flonum-mult.c
+flonum.h
+frags.c
+frags.c
+frags.h
+gasp.c
+hash.c
+hash.c
+hash.h
+input-file.c
+input-file.c
+input-file.h
+input-scrub.c
+input-scrub.c
+itbl-ops.c
+itbl-ops.h
+listing.c
+listing.c
+listing.h
+literal.c
+literal.c
+macro.c
+macro.c
+macro.h
+messages.c
+messages.c
+obj.h
+output-file.c
+output-file.c
+output-file.h
+read.c
+read.c
+read.h
+sb.c
+sb.c
+sb.h
+stabs.c
+stabs.c
+struc-symbol.h
+subsegs.c
+subsegs.c
+subsegs.h
+symbols.c
+symbols.c
+symbols.h
+tc.h
+write.c
+write.c
+write.h
diff --git a/gas/read.c b/gas/read.c
index 0716a5f..331a256 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -124,33 +124,33 @@ char lex_type[256] =
* In: a character.
* Out: 1 if this character ends a line.
*/
-#define _ (0)
+#define Z_ (0)
char is_end_of_line[256] =
{
#ifdef CR_EOL
- 99, _, _, _, _, _, _, _, _, _, 99, _, _, 99, _, _, /* @abcdefghijklmno */
+ 99, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, 99, Z_, Z_, 99, Z_, Z_, /* @abcdefghijklmno */
#else
- 99, _, _, _, _, _, _, _, _, _, 99, _, _, _, _, _, /* @abcdefghijklmno */
+ 99, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, 99, Z_, Z_, Z_, Z_, Z_, /* @abcdefghijklmno */
#endif
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
#ifdef TC_HPPA
- _,99, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* _!"#$%&'()*+,-./ */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* 0123456789:;<=>? */
+ Z_,99, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* _!"#$%&'()*+,-./ */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* 0123456789:;<=>? */
#else
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, 99, _, _, _, _, /* 0123456789:;<=>? */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, 99, Z_, Z_, Z_, Z_, /* 0123456789:;<=>? */
#endif
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
};
-#undef _
+#undef Z_
/* Functions private to this file. */
@@ -419,7 +419,7 @@ pop_insert (table)
{
errtxt = hash_insert (po_hash, pop->poc_name, (char *) pop);
if (errtxt && (!pop_override_ok || strcmp (errtxt, "exists")))
- as_fatal ("error constructing %s pseudo-op table: %s", pop_table_name,
+ as_fatal (_("error constructing %s pseudo-op table: %s"), pop_table_name,
errtxt);
}
}
@@ -712,7 +712,7 @@ read_a_source_file (name)
char *s2 = s;
while (*s2)
{
- if (isupper (*s2))
+ if (isupper ((unsigned char) *s2))
*s2 = tolower (*s2);
s2++;
}
@@ -779,7 +779,7 @@ read_a_source_file (name)
/* Print the error msg now, while we still can */
if (pop == NULL)
{
- as_bad ("Unknown pseudo-op: `%s'", s);
+ as_bad (_("Unknown pseudo-op: `%s'"), s);
*input_line_pointer = c;
s_ignore (0);
continue;
@@ -897,7 +897,7 @@ read_a_source_file (name)
continue;
if ((LOCAL_LABELS_DOLLAR || LOCAL_LABELS_FB)
- && isdigit (c))
+ && isdigit ((unsigned char) c))
{
/* local label ("4:") */
char *backup = input_line_pointer;
@@ -906,7 +906,7 @@ read_a_source_file (name)
temp = c - '0';
- while (isdigit (*input_line_pointer))
+ while (isdigit ((unsigned char) *input_line_pointer))
{
temp = (temp * 10) + *input_line_pointer - '0';
++input_line_pointer;
@@ -920,7 +920,7 @@ read_a_source_file (name)
if (dollar_label_defined (temp))
{
- as_fatal ("label \"%d$\" redefined", temp);
+ as_fatal (_("label \"%d$\" redefined"), temp);
}
define_dollar_label (temp);
@@ -1137,7 +1137,7 @@ void
s_abort (ignore)
int ignore;
{
- as_fatal (".abort detected. Abandoning ship.");
+ as_fatal (_(".abort detected. Abandoning ship."));
}
/* Guts of .align directive. N is the power of two to which to align.
@@ -1242,7 +1242,7 @@ s_align (arg, bytes_p)
for (i = 0; (align & 1) == 0; align >>= 1, ++i)
;
if (align != 1)
- as_bad ("Alignment not a power of 2");
+ as_bad (_("Alignment not a power of 2"));
align = i;
}
}
@@ -1250,7 +1250,7 @@ s_align (arg, bytes_p)
if (align > 15)
{
align = 15;
- as_bad ("Alignment too large: %u assumed", align);
+ as_bad (_("Alignment too large: %u assumed"), align);
}
if (*input_line_pointer != ',')
@@ -1282,7 +1282,7 @@ s_align (arg, bytes_p)
if (! fill_p)
{
if (arg < 0)
- as_warn ("expected fill pattern missing");
+ as_warn (_("expected fill pattern missing"));
do_align (align, (char *) NULL, 0, max);
}
else
@@ -1304,7 +1304,7 @@ s_align (arg, bytes_p)
{
char ab[16];
- if (fill_len > sizeof ab)
+ if ((size_t) fill_len > sizeof ab)
abort ();
md_number_to_chars (ab, fill, fill_len);
do_align (align, ab, fill_len, max);
@@ -1360,7 +1360,7 @@ s_comm (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after symbol-name: rest of line ignored.");
+ as_bad (_("Expected comma after symbol-name: rest of line ignored."));
if (flag_mri)
mri_comment_end (stop, stopc);
ignore_rest_of_line ();
@@ -1369,7 +1369,7 @@ s_comm (ignore)
input_line_pointer++; /* skip ',' */
if ((temp = get_absolute_expression ()) < 0)
{
- as_warn (".COMMon length (%ld.) <0! Ignored.", (long) temp);
+ as_warn (_(".COMMon length (%ld.) <0! Ignored."), (long) temp);
if (flag_mri)
mri_comment_end (stop, stopc);
ignore_rest_of_line ();
@@ -1380,7 +1380,7 @@ s_comm (ignore)
*p = c;
if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
{
- as_bad ("Ignoring attempt to re-define symbol `%s'.",
+ as_bad (_("Ignoring attempt to re-define symbol `%s'."),
S_GET_NAME (symbolP));
if (flag_mri)
mri_comment_end (stop, stopc);
@@ -1390,7 +1390,7 @@ s_comm (ignore)
if (S_GET_VALUE (symbolP))
{
if (S_GET_VALUE (symbolP) != (valueT) temp)
- as_bad ("Length of .comm \"%s\" is already %ld. Not changed to %ld.",
+ as_bad (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."),
S_GET_NAME (symbolP),
(long) S_GET_VALUE (symbolP),
(long) temp);
@@ -1479,7 +1479,7 @@ s_mri_common (small)
if (S_IS_DEFINED (sym) && ! S_IS_COMMON (sym))
{
- as_bad ("attempt to re-define symbol `%s'", S_GET_NAME (sym));
+ as_bad (_("attempt to re-define symbol `%s'"), S_GET_NAME (sym));
mri_comment_end (stop, stopc);
ignore_rest_of_line ();
return;
@@ -1601,7 +1601,7 @@ s_app_line (ignore)
if (l < 0)
/* Some of the back ends can't deal with non-positive line numbers.
Besides, it's silly. */
- as_warn ("Line numbers must be positive; line number %d rejected.", l+1);
+ as_warn (_("Line numbers must be positive; line number %d rejected."), l+1);
else
{
new_logical_line ((char *) NULL, l);
@@ -1628,7 +1628,7 @@ s_end (ignore)
if (! is_end_of_line[(unsigned char) *input_line_pointer]
&& *input_line_pointer != '*'
&& *input_line_pointer != '!')
- as_warn ("start address not supported");
+ as_warn (_("start address not supported"));
}
}
@@ -1638,7 +1638,7 @@ void
s_err (ignore)
int ignore;
{
- as_bad (".err encountered");
+ as_bad (_(".err encountered"));
demand_empty_rest_of_line ();
}
@@ -1657,9 +1657,9 @@ s_fail (ignore)
temp = get_absolute_expression ();
if (temp >= 500)
- as_warn (".fail %ld encountered", (long) temp);
+ as_warn (_(".fail %ld encountered"), (long) temp);
else
- as_bad (".fail %ld encountered", (long) temp);
+ as_bad (_(".fail %ld encountered"), (long) temp);
if (flag_mri)
mri_comment_end (stop, stopc);
@@ -1671,61 +1671,91 @@ void
s_fill (ignore)
int ignore;
{
- long temp_repeat = 0;
- long temp_size = 1;
- register long temp_fill = 0;
+ expressionS rep_exp;
+ long size = 1;
+ register long fill = 0;
char *p;
#ifdef md_flush_pending_output
md_flush_pending_output ();
#endif
- temp_repeat = get_absolute_expression ();
+ get_known_segmented_expression (&rep_exp);
if (*input_line_pointer == ',')
{
input_line_pointer++;
- temp_size = get_absolute_expression ();
+ size = get_absolute_expression ();
if (*input_line_pointer == ',')
{
input_line_pointer++;
- temp_fill = get_absolute_expression ();
+ fill = get_absolute_expression ();
}
}
+
/* This is to be compatible with BSD 4.2 AS, not for any rational reason. */
#define BSD_FILL_SIZE_CROCK_8 (8)
- if (temp_size > BSD_FILL_SIZE_CROCK_8)
+ if (size > BSD_FILL_SIZE_CROCK_8)
{
- as_warn (".fill size clamped to %d.", BSD_FILL_SIZE_CROCK_8);
- temp_size = BSD_FILL_SIZE_CROCK_8;
+ as_warn (_(".fill size clamped to %d."), BSD_FILL_SIZE_CROCK_8);
+ size = BSD_FILL_SIZE_CROCK_8;
}
- if (temp_size < 0)
+ if (size < 0)
{
- as_warn ("Size negative: .fill ignored.");
- temp_size = 0;
+ as_warn (_("Size negative: .fill ignored."));
+ size = 0;
}
- else if (temp_repeat <= 0)
+ else if (rep_exp.X_op == O_constant && rep_exp.X_add_number <= 0)
{
- if (temp_repeat < 0)
- as_warn ("Repeat < 0, .fill ignored");
- temp_size = 0;
+ if (rep_exp.X_add_number < 0)
+ as_warn (_("Repeat < 0, .fill ignored"));
+ size = 0;
}
- if (temp_size && !need_pass_2)
+ if (size && !need_pass_2)
{
- p = frag_var (rs_fill, (int) temp_size, (int) temp_size,
- (relax_substateT) 0, (symbolS *) 0, (offsetT) temp_repeat,
- (char *) 0);
- memset (p, 0, (unsigned int) temp_size);
+ if (rep_exp.X_op == O_constant)
+ {
+ p = frag_var (rs_fill, (int) size, (int) size,
+ (relax_substateT) 0, (symbolS *) 0,
+ (offsetT) rep_exp.X_add_number,
+ (char *) 0);
+ }
+ else
+ {
+ /* We don't have a constant repeat count, so we can't use
+ rs_fill. We can get the same results out of rs_space,
+ but its argument is in bytes, so we must multiply the
+ repeat count by size. */
+
+ symbolS *rep_sym;
+ rep_sym = make_expr_symbol (&rep_exp);
+ if (size != 1)
+ {
+ expressionS size_exp;
+ size_exp.X_op = O_constant;
+ size_exp.X_add_number = size;
+
+ rep_exp.X_op = O_multiply;
+ rep_exp.X_add_symbol = rep_sym;
+ rep_exp.X_op_symbol = make_expr_symbol (&size_exp);
+ rep_exp.X_add_number = 0;
+ rep_sym = make_expr_symbol (&rep_exp);
+ }
+
+ p = frag_var (rs_space, (int) size, (int) size,
+ (relax_substateT) 0, rep_sym, (offsetT) 0, (char *) 0);
+ }
+ memset (p, 0, (unsigned int) size);
/* The magic number BSD_FILL_SIZE_CROCK_4 is from BSD 4.2 VAX
* flavoured AS. The following bizzare behaviour is to be
* compatible with above. I guess they tried to take up to 8
* bytes from a 4-byte expression and they forgot to sign
* extend. Un*x Sux. */
#define BSD_FILL_SIZE_CROCK_4 (4)
- md_number_to_chars (p, (valueT) temp_fill,
- (temp_size > BSD_FILL_SIZE_CROCK_4
+ md_number_to_chars (p, (valueT) fill,
+ (size > BSD_FILL_SIZE_CROCK_4
? BSD_FILL_SIZE_CROCK_4
- : (int) temp_size));
+ : (int) size));
/* Note: .fill (),0 emits no frag (since we are asked to .fill 0 bytes)
* but emits no error message because it seems a legal thing to do.
* It is a degenerate case of .fill but could be emitted by a compiler.
@@ -1833,7 +1863,7 @@ s_linkonce (ignore)
else if (strcasecmp (s, "same_contents") == 0)
type = LINKONCE_SAME_CONTENTS;
else
- as_warn ("unrecognized .linkonce type `%s'", s);
+ as_warn (_("unrecognized .linkonce type `%s'"), s);
*input_line_pointer = c;
}
@@ -1846,7 +1876,7 @@ s_linkonce (ignore)
flagword flags;
if ((bfd_applicable_section_flags (stdoutput) & SEC_LINK_ONCE) == 0)
- as_warn (".linkonce is not supported for this object file format");
+ as_warn (_(".linkonce is not supported for this object file format"));
flags = bfd_get_section_flags (stdoutput, now_seg);
flags |= SEC_LINK_ONCE;
@@ -1868,11 +1898,11 @@ s_linkonce (ignore)
break;
}
if (! bfd_set_section_flags (stdoutput, now_seg, flags))
- as_bad ("bfd_set_section_flags: %s",
+ as_bad (_("bfd_set_section_flags: %s"),
bfd_errmsg (bfd_get_error ()));
}
#else /* ! defined (BFD_ASSEMBLER) */
- as_warn (".linkonce is not supported for this object file format");
+ as_warn (_(".linkonce is not supported for this object file format"));
#endif /* ! defined (BFD_ASSEMBLER) */
#endif /* ! defined (obj_handle_link_once) */
@@ -1915,13 +1945,13 @@ s_lcomm_internal (needs_align, bytes_p)
if (*input_line_pointer == '\n')
{
- as_bad ("Missing size expression");
+ as_bad (_("Missing size expression"));
return;
}
if ((temp = get_absolute_expression ()) < 0)
{
- as_warn ("BSS length (%d.) <0! Ignored.", temp);
+ as_warn (_("BSS length (%d.) <0! Ignored."), temp);
ignore_rest_of_line ();
return;
}
@@ -1937,7 +1967,7 @@ s_lcomm_internal (needs_align, bytes_p)
seg_info (bss_seg)->bss = 1;
#ifdef BFD_ASSEMBLER
if (! bfd_set_section_flags (stdoutput, bss_seg, SEC_ALLOC))
- as_warn ("error setting flags for \".sbss\": %s",
+ as_warn (_("error setting flags for \".sbss\": %s"),
bfd_errmsg (bfd_get_error ()));
#endif
}
@@ -1969,7 +1999,7 @@ s_lcomm_internal (needs_align, bytes_p)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after size");
+ as_bad (_("Expected comma after size"));
ignore_rest_of_line ();
return;
}
@@ -1977,7 +2007,7 @@ s_lcomm_internal (needs_align, bytes_p)
SKIP_WHITESPACE ();
if (*input_line_pointer == '\n')
{
- as_bad ("Missing alignment");
+ as_bad (_("Missing alignment"));
return;
}
align = get_absolute_expression ();
@@ -1991,19 +2021,19 @@ s_lcomm_internal (needs_align, bytes_p)
for (i = 0; (align & 1) == 0; align >>= 1, ++i)
;
if (align != 1)
- as_bad ("Alignment not a power of 2");
+ as_bad (_("Alignment not a power of 2"));
align = i;
}
}
if (align > max_alignment)
{
align = max_alignment;
- as_warn ("Alignment too large: %d. assumed.", align);
+ as_warn (_("Alignment too large: %d. assumed."), align);
}
else if (align < 0)
{
align = 0;
- as_warn ("Alignment negative. 0 assumed.");
+ as_warn (_("Alignment negative. 0 assumed."));
}
record_alignment (bss_seg, align);
} /* if needs align */
@@ -2064,7 +2094,7 @@ s_lcomm_internal (needs_align, bytes_p)
#endif
}
else
- as_bad ("Ignoring attempt to re-define symbol `%s'.",
+ as_bad (_("Ignoring attempt to re-define symbol `%s'."),
S_GET_NAME (symbolP));
subseg_set (current_seg, current_subseg);
@@ -2104,7 +2134,7 @@ s_lsym (ignore)
if (*input_line_pointer != ',')
{
*p = 0;
- as_bad ("Expected comma after name \"%s\"", name);
+ as_bad (_("Expected comma after name \"%s\""), name);
*p = c;
ignore_rest_of_line ();
return;
@@ -2114,7 +2144,7 @@ s_lsym (ignore)
if (exp.X_op != O_constant
&& exp.X_op != O_register)
{
- as_bad ("bad expression");
+ as_bad (_("bad expression"));
ignore_rest_of_line ();
return;
}
@@ -2141,7 +2171,7 @@ s_lsym (ignore)
}
else
{
- as_bad ("Symbol %s already defined", name);
+ as_bad (_("Symbol %s already defined"), name);
}
*p = c;
demand_empty_rest_of_line ();
@@ -2249,7 +2279,7 @@ s_macro (ignore)
|| (! flag_m68k_mri
&& *name == '.'
&& hash_find (po_hash, name + 1) != NULL))
- as_warn ("attempt to redefine pseudo-op `%s' ignored",
+ as_warn (_("attempt to redefine pseudo-op `%s' ignored"),
name);
}
@@ -2307,16 +2337,16 @@ do_org (segment, exp, fill)
int fill;
{
if (segment != now_seg && segment != absolute_section)
- as_bad ("invalid segment \"%s\"; segment \"%s\" assumed",
+ as_bad (_("invalid segment \"%s\"; segment \"%s\" assumed"),
segment_name (segment), segment_name (now_seg));
if (now_seg == absolute_section)
{
if (fill != 0)
- as_warn ("ignoring fill value in absolute section");
+ as_warn (_("ignoring fill value in absolute section"));
if (exp->X_op != O_constant)
{
- as_bad ("only constant offsets supported in absolute section");
+ as_bad (_("only constant offsets supported in absolute section"));
exp->X_add_number = 0;
}
abs_section_offset = exp->X_add_number;
@@ -2344,7 +2374,7 @@ s_org (ignore)
support that--use a linker script instead. */
if (flag_m68k_mri)
{
- as_bad ("MRI style ORG pseudo-op not supported");
+ as_bad (_("MRI style ORG pseudo-op not supported"));
ignore_rest_of_line ();
return;
}
@@ -2432,7 +2462,7 @@ s_mri_sect (type)
if (c == 'C' || c == 'D' || c == 'M' || c == 'R')
*type = c;
else
- as_bad ("unrecognized section type");
+ as_bad (_("unrecognized section type"));
++input_line_pointer;
#ifdef BFD_ASSEMBLER
@@ -2449,7 +2479,7 @@ s_mri_sect (type)
if (flags != SEC_NO_FLAGS)
{
if (! bfd_set_section_flags (stdoutput, seg, flags))
- as_warn ("error setting flags for \"%s\": %s",
+ as_warn (_("error setting flags for \"%s\": %s"),
bfd_section_name (stdoutput, seg),
bfd_errmsg (bfd_get_error ()));
}
@@ -2500,7 +2530,7 @@ s_mri_sect (type)
else if (strcasecmp (sectype, "romdata") == 0)
*type = 'R';
else
- as_warn ("unrecognized section type `%s'", sectype);
+ as_warn (_("unrecognized section type `%s'"), sectype);
*input_line_pointer = c;
}
@@ -2514,7 +2544,7 @@ s_mri_sect (type)
c = get_symbol_end ();
if (strcasecmp (seccmd, "absolute") == 0)
{
- as_bad ("absolute sections are not supported");
+ as_bad (_("absolute sections are not supported"));
*input_line_pointer = c;
ignore_rest_of_line ();
return;
@@ -2529,7 +2559,7 @@ s_mri_sect (type)
}
else
{
- as_warn ("unrecognized section command `%s'", seccmd);
+ as_warn (_("unrecognized section command `%s'"), seccmd);
*input_line_pointer = c;
}
}
@@ -2539,7 +2569,8 @@ s_mri_sect (type)
#else /* ! TC_I960 */
/* The MRI assembler seems to use different forms of .sect for
different targets. */
- abort ();
+ as_bad ("MRI mode not supported for this target");
+ ignore_rest_of_line ();
#endif /* ! TC_I960 */
#endif /* ! TC_M68K */
}
@@ -2603,7 +2634,7 @@ s_rept (ignore)
sb_new (&one);
if (! buffer_and_nest ("REPT", "ENDR", &one, get_line_sb))
{
- as_bad ("rept without endr");
+ as_bad (_("rept without endr"));
return;
}
@@ -2645,7 +2676,7 @@ s_set (equiv)
if (*input_line_pointer != ',')
{
*end_name = 0;
- as_bad ("Expected comma after name \"%s\"", name);
+ as_bad (_("Expected comma after name \"%s\""), name);
*end_name = delim;
ignore_rest_of_line ();
return;
@@ -2672,7 +2703,24 @@ s_set (equiv)
if ((symbolP = symbol_find (name)) == NULL
&& (symbolP = md_undefined_symbol (name)) == NULL)
{
- symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag);
+#ifndef NO_LISTING
+ /* When doing symbol listings, play games with dummy fragments living
+ outside the normal fragment chain to record the file and line info
+ for this symbol. */
+ if (listing & LISTING_SYMBOLS)
+ {
+ extern struct list_info_struct *listing_tail;
+ fragS *dummy_frag = xmalloc (sizeof(fragS));
+ memset (dummy_frag, 0, sizeof(fragS));
+ dummy_frag->fr_type = rs_fill;
+ dummy_frag->line = listing_tail;
+ symbolP = symbol_new (name, undefined_section, 0, dummy_frag);
+ dummy_frag->fr_symbol = symbolP;
+ }
+ else
+#endif
+ symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag);
+
#ifdef OBJ_COFF
/* "set" symbols are local unless otherwise specified. */
SF_SET_LOCAL (symbolP);
@@ -2687,7 +2735,7 @@ s_set (equiv)
if (equiv
&& S_IS_DEFINED (symbolP)
&& S_GET_SEGMENT (symbolP) != reg_section)
- as_bad ("symbol `%s' already defined", S_GET_NAME (symbolP));
+ as_bad (_("symbol `%s' already defined"), S_GET_NAME (symbolP));
pseudo_set (symbolP);
demand_empty_rest_of_line ();
@@ -2770,7 +2818,7 @@ s_space (mult)
|| (mult != 0 && mult != 1 && val.X_add_number != 0))
{
if (exp.X_op != O_constant)
- as_bad ("Unsupported variable size or fill value");
+ as_bad (_("Unsupported variable size or fill value"));
else
{
offsetT i;
@@ -2794,9 +2842,10 @@ s_space (mult)
bytes = repeat;
if (repeat <= 0)
{
- if (! flag_mri || repeat < 0)
- as_warn (".space repeat count is %s, ignored",
- repeat ? "negative" : "zero");
+ if (! flag_mri)
+ as_warn (_(".space repeat count is zero, ignored"));
+ else if (repeat < 0)
+ as_warn (_(".space repeat count is negative, ignored"));
goto getout;
}
@@ -2825,12 +2874,12 @@ s_space (mult)
{
if (now_seg == absolute_section)
{
- as_bad ("space allocation too complex in absolute section");
+ as_bad (_("space allocation too complex in absolute section"));
subseg_set (text_section, 0);
}
if (mri_common_symbol != NULL)
{
- as_bad ("space allocation too complex in common section");
+ as_bad (_("space allocation too complex in common section"));
mri_common_symbol = NULL;
}
if (!need_pass_2)
@@ -2878,7 +2927,7 @@ s_float_space (float_type)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("missing value");
+ as_bad (_("missing value"));
if (flag_mri)
mri_comment_end (stop, stopc);
ignore_rest_of_line ();
@@ -2891,7 +2940,8 @@ s_float_space (float_type)
/* Skip any 0{letter} that may be present. Don't even check if the
* letter is legal. */
- if (input_line_pointer[0] == '0' && isalpha (input_line_pointer[1]))
+ if (input_line_pointer[0] == '0'
+ && isalpha ((unsigned char) input_line_pointer[1]))
input_line_pointer += 2;
/* Accept :xxxx, where the x's are hex digits, for a floating point
@@ -2916,7 +2966,7 @@ s_float_space (float_type)
know (flen > 0);
if (err)
{
- as_bad ("Bad floating literal: %s", err);
+ as_bad (_("Bad floating literal: %s"), err);
if (flag_mri)
mri_comment_end (stop, stopc);
ignore_rest_of_line ();
@@ -2991,11 +3041,11 @@ ignore_rest_of_line () /* For suspect lines: gives warning. */
{
if (!is_end_of_line[(unsigned char) *input_line_pointer])
{
- if (isprint (*input_line_pointer))
- as_bad ("Rest of line ignored. First ignored character is `%c'.",
+ if (isprint ((unsigned char) *input_line_pointer))
+ as_bad (_("Rest of line ignored. First ignored character is `%c'."),
*input_line_pointer);
else
- as_bad ("Rest of line ignored. First ignored character valued 0x%x.",
+ as_bad (_("Rest of line ignored. First ignored character valued 0x%x."),
*input_line_pointer);
while (input_line_pointer < buffer_limit
&& !is_end_of_line[(unsigned char) *input_line_pointer])
@@ -3034,12 +3084,16 @@ pseudo_set (symbolP)
(void) expression (&exp);
if (exp.X_op == O_illegal)
- as_bad ("illegal expression; zero assumed");
+ as_bad (_("illegal expression; zero assumed"));
else if (exp.X_op == O_absent)
- as_bad ("missing expression; zero assumed");
+ as_bad (_("missing expression; zero assumed"));
else if (exp.X_op == O_big)
- as_bad ("%s number invalid; zero assumed",
- exp.X_add_number > 0 ? "bignum" : "floating point");
+ {
+ if (exp.X_add_number > 0)
+ as_bad (_("bignum invalid; zero assumed"));
+ else
+ as_bad (_("floating point number invalid; zero assumed"));
+ }
else if (exp.X_op == O_subtract
&& (S_GET_SEGMENT (exp.X_add_symbol)
== S_GET_SEGMENT (exp.X_op_symbol))
@@ -3067,7 +3121,8 @@ pseudo_set (symbolP)
S_CLEAR_EXTERNAL (symbolP);
#endif /* OBJ_AOUT or OBJ_BOUT */
S_SET_VALUE (symbolP, (valueT) exp.X_add_number);
- symbolP->sy_frag = &zero_address_frag;
+ if (exp.X_op != O_constant)
+ symbolP->sy_frag = &zero_address_frag;
break;
case O_register:
@@ -3197,7 +3252,7 @@ cons_worker (nbytes, rva)
if (exp.X_op == O_symbol)
exp.X_op = O_symbol_rva;
else
- as_fatal ("rva without symbol");
+ as_fatal (_("rva without symbol"));
}
emit_expr (&exp, (unsigned int) nbytes);
++c;
@@ -3233,7 +3288,6 @@ s_rva (size)
cons_worker (size, 1);
}
-
/* Put the contents of expression EXP into the object file using
NBYTES bytes. If need_pass_2 is 1, this does nothing. */
@@ -3314,13 +3368,16 @@ emit_expr (exp, nbytes)
#endif
#endif
+ if (check_eh_frame (exp, &nbytes))
+ return;
+
op = exp->X_op;
/* Allow `.word 0' in the absolute section. */
if (now_seg == absolute_section)
{
if (op != O_constant || exp->X_add_number != 0)
- as_bad ("attempt to store value in absolute section");
+ as_bad (_("attempt to store value in absolute section"));
abs_section_offset += nbytes;
return;
}
@@ -3358,19 +3415,19 @@ emit_expr (exp, nbytes)
if (op == O_absent || op == O_illegal)
{
- as_warn ("zero assumed for missing expression");
+ as_warn (_("zero assumed for missing expression"));
exp->X_add_number = 0;
op = O_constant;
}
else if (op == O_big && exp->X_add_number <= 0)
{
- as_bad ("floating point number invalid; zero assumed");
+ as_bad (_("floating point number invalid; zero assumed"));
exp->X_add_number = 0;
op = O_constant;
}
else if (op == O_register)
{
- as_warn ("register value used as expression");
+ as_warn (_("register value used as expression"));
op = O_constant;
}
@@ -3458,7 +3515,7 @@ emit_expr (exp, nbytes)
&& ((get & mask) != mask
|| (get & hibit) == 0))
{ /* Leading bits contain both 0s & 1s. */
- as_warn ("Value 0x%lx truncated to 0x%lx.",
+ as_warn (_("Value 0x%lx truncated to 0x%lx."),
(unsigned long) get, (unsigned long) use);
}
/* put bytes in right order. */
@@ -3466,7 +3523,7 @@ emit_expr (exp, nbytes)
}
else if (op == O_big)
{
- int size;
+ unsigned int size;
LITTLENUM_TYPE *nums;
know (nbytes % CHARS_PER_LITTLENUM == 0);
@@ -3474,7 +3531,7 @@ emit_expr (exp, nbytes)
size = exp->X_add_number * CHARS_PER_LITTLENUM;
if (nbytes < size)
{
- as_warn ("Bignum truncated to %d bytes", nbytes);
+ as_warn (_("Bignum truncated to %d bytes"), nbytes);
size = nbytes;
}
@@ -3551,7 +3608,7 @@ emit_expr (exp, nbytes)
r = BFD_RELOC_64;
break;
default:
- as_bad ("unsupported BFD relocation size %u", nbytes);
+ as_bad (_("unsupported BFD relocation size %u"), nbytes);
r = BFD_RELOC_32;
break;
}
@@ -3640,7 +3697,7 @@ parse_bitfield_cons (exp, nbytes)
if (exp->X_op == O_absent)
{
- as_warn ("using a bit field width of zero");
+ as_warn (_("using a bit field width of zero"));
exp->X_add_number = 0;
exp->X_op = O_constant;
} /* implied zero width bitfield */
@@ -3648,7 +3705,7 @@ parse_bitfield_cons (exp, nbytes)
if (exp->X_op != O_constant)
{
*input_line_pointer = '\0';
- as_bad ("field width \"%s\" too complex for a bitfield", hold);
+ as_bad (_("field width \"%s\" too complex for a bitfield"), hold);
*input_line_pointer = ':';
demand_empty_rest_of_line ();
return;
@@ -3656,7 +3713,7 @@ parse_bitfield_cons (exp, nbytes)
if ((width = exp->X_add_number) > (BITS_PER_CHAR * nbytes))
{
- as_warn ("field width %lu too big to fit in %d bytes: truncated to %d bits",
+ as_warn (_("field width %lu too big to fit in %d bytes: truncated to %d bits"),
width, nbytes, (BITS_PER_CHAR * nbytes));
width = BITS_PER_CHAR * nbytes;
} /* too big */
@@ -3677,7 +3734,7 @@ parse_bitfield_cons (exp, nbytes)
char cache = *input_line_pointer;
*input_line_pointer = '\0';
- as_bad ("field value \"%s\" too complex for a bitfield", hold);
+ as_bad (_("field value \"%s\" too complex for a bitfield"), hold);
*input_line_pointer = cache;
demand_empty_rest_of_line ();
return;
@@ -3719,7 +3776,7 @@ parse_mri_cons (exp, nbytes)
TC_PARSE_CONS_EXPRESSION (exp, nbytes);
else
{
- int scan = 0;
+ unsigned int scan;
unsigned int result = 0;
/* An MRI style string. Cut into as many bytes as will fit into
@@ -3729,7 +3786,7 @@ parse_mri_cons (exp, nbytes)
++input_line_pointer;
else if (*input_line_pointer == 'E')
{
- as_bad ("EBCDIC constants are not supported");
+ as_bad (_("EBCDIC constants are not supported"));
++input_line_pointer;
}
@@ -3799,7 +3856,7 @@ parse_repeat_cons (exp, nbytes)
if (count.X_op != O_constant
|| count.X_add_number <= 0)
{
- as_warn ("Unresolvable or nonpositive repeat count; using 1");
+ as_warn (_("Unresolvable or nonpositive repeat count; using 1"));
return;
}
@@ -3850,7 +3907,7 @@ hex_float (float_type, bytes)
break;
default:
- as_bad ("Unknown floating type type '%c'", float_type);
+ as_bad (_("Unknown floating type type '%c'"), float_type);
return -1;
}
@@ -3872,7 +3929,7 @@ hex_float (float_type, bytes)
if (i >= length)
{
- as_warn ("Floating point constant too large");
+ as_warn (_("Floating point constant too large"));
return -1;
}
d = hex_value (*input_line_pointer) << 4;
@@ -3952,7 +4009,8 @@ float_cons (float_type)
* has no use for such information. Lusers beware: you get
* diagnostics if your input is ill-conditioned.
*/
- if (input_line_pointer[0] == '0' && isalpha (input_line_pointer[1]))
+ if (input_line_pointer[0] == '0'
+ && isalpha ((unsigned char) input_line_pointer[1]))
input_line_pointer += 2;
/* Accept :xxxx, where the x's are hex digits, for a floating
@@ -3974,7 +4032,7 @@ float_cons (float_type)
know (length > 0);
if (err)
{
- as_bad ("Bad floating literal: %s", err);
+ as_bad (_("Bad floating literal: %s"), err);
ignore_rest_of_line ();
return;
}
@@ -3996,7 +4054,7 @@ float_cons (float_type)
if (count_exp.X_op != O_constant
|| count_exp.X_add_number <= 0)
{
- as_warn ("unresolvable or nonpositive repeat count; using 1");
+ as_warn (_("unresolvable or nonpositive repeat count; using 1"));
}
else
count = count_exp.X_add_number;
@@ -4146,7 +4204,7 @@ output_big_sleb128 (p, bignum, size)
int size;
{
char *orig = p;
- valueT val;
+ valueT val = 0;
int loaded = 0;
unsigned byte;
@@ -4192,7 +4250,7 @@ output_big_uleb128 (p, bignum, size)
int size;
{
char *orig = p;
- valueT val;
+ valueT val = 0;
int loaded = 0;
unsigned byte;
@@ -4251,19 +4309,19 @@ emit_leb128_expr(exp, sign)
if (op == O_absent || op == O_illegal)
{
- as_warn ("zero assumed for missing expression");
+ as_warn (_("zero assumed for missing expression"));
exp->X_add_number = 0;
op = O_constant;
}
else if (op == O_big && exp->X_add_number <= 0)
{
- as_bad ("floating point number invalid; zero assumed");
+ as_bad (_("floating point number invalid; zero assumed"));
exp->X_add_number = 0;
op = O_constant;
}
else if (op == O_register)
{
- as_warn ("register value used as expression");
+ as_warn (_("register value used as expression"));
op = O_constant;
}
@@ -4400,7 +4458,7 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
FRAG_APPEND_1_CHAR (c);
if (*input_line_pointer != '>')
{
- as_bad ("Expected <nn>");
+ as_bad (_("Expected <nn>"));
}
input_line_pointer++;
break;
@@ -4433,7 +4491,7 @@ next_char_of_string ()
break;
case '\n':
- as_warn ("Unterminated string: Newline inserted.");
+ as_warn (_("Unterminated string: Newline inserted."));
bump_line_counters ();
break;
@@ -4516,7 +4574,7 @@ next_char_of_string ()
case '\n':
/* To be compatible with BSD 4.2 as: give the luser a linefeed!! */
- as_warn ("Unterminated string: Newline inserted.");
+ as_warn (_("Unterminated string: Newline inserted."));
c = '\n';
bump_line_counters ();
break;
@@ -4524,7 +4582,7 @@ next_char_of_string ()
default:
#ifdef ONLY_STANDARD_ESCAPES
- as_bad ("Bad escaped character in string, '?' assumed");
+ as_bad (_("Bad escaped character in string, '?' assumed"));
c = '?';
#endif /* ONLY_STANDARD_ESCAPES */
@@ -4550,7 +4608,7 @@ get_segmented_expression (expP)
|| expP->X_op == O_absent
|| expP->X_op == O_big)
{
- as_bad ("expected address expression; zero assumed");
+ as_bad (_("expected address expression; zero assumed"));
expP->X_op = O_constant;
expP->X_add_number = 0;
retval = absolute_section;
@@ -4570,10 +4628,10 @@ get_known_segmented_expression (expP)
expression. */
if (expP->X_add_symbol != NULL
&& S_GET_SEGMENT (expP->X_add_symbol) != expr_section)
- as_warn ("symbol \"%s\" undefined; zero assumed",
+ as_warn (_("symbol \"%s\" undefined; zero assumed"),
S_GET_NAME (expP->X_add_symbol));
else
- as_warn ("some symbol undefined; zero assumed");
+ as_warn (_("some symbol undefined; zero assumed"));
retval = absolute_section;
expP->X_op = O_constant;
expP->X_add_number = 0;
@@ -4591,7 +4649,7 @@ get_absolute_expression ()
if (exp.X_op != O_constant)
{
if (exp.X_op != O_absent)
- as_bad ("bad or irreducible absolute expression; zero assumed");
+ as_bad (_("bad or irreducible absolute expression; zero assumed"));
exp.X_add_number = 0;
}
return exp.X_add_number;
@@ -4629,7 +4687,7 @@ demand_copy_C_string (len_pointer)
s = 0;
len = 1;
*len_pointer = 0;
- as_bad ("This string may not contain \'\\0\'");
+ as_bad (_("This string may not contain \'\\0\'"));
}
}
}
@@ -4668,7 +4726,7 @@ demand_copy_string (lenP)
}
else
{
- as_warn ("Missing string");
+ as_warn (_("Missing string"));
retval = NULL;
ignore_rest_of_line ();
}
@@ -4698,7 +4756,7 @@ equals (sym_name, reassign)
int reassign;
{
register symbolS *symbolP; /* symbol we are working with */
- char *stop;
+ char *stop = NULL;
char stopc;
input_line_pointer++;
@@ -4728,7 +4786,7 @@ equals (sym_name, reassign)
if (! reassign
&& S_IS_DEFINED (symbolP)
&& S_GET_SEGMENT (symbolP) != reg_section)
- as_bad ("symbol `%s' already defined", S_GET_NAME (symbolP));
+ as_bad (_("symbol `%s' already defined"), S_GET_NAME (symbolP));
pseudo_set (symbolP);
}