diff options
Diffstat (limited to 'src/libcpu')
-rw-r--r-- | src/libcpu/ChangeLog | 22 | ||||
-rw-r--r-- | src/libcpu/Makefile | 672 | ||||
-rw-r--r-- | src/libcpu/Makefile.am | 57 | ||||
-rw-r--r-- | src/libcpu/Makefile.in | 308 | ||||
-rw-r--r-- | src/libcpu/i386_data.h | 35 | ||||
-rw-r--r-- | src/libcpu/i386_disasm.c | 35 | ||||
-rw-r--r-- | src/libcpu/i386_gendis.c | 35 | ||||
-rw-r--r-- | src/libcpu/i386_lex.c | 148 | ||||
-rw-r--r-- | src/libcpu/i386_lex.l | 33 | ||||
-rw-r--r-- | src/libcpu/i386_parse.c | 429 | ||||
-rw-r--r-- | src/libcpu/i386_parse.h | 38 | ||||
-rw-r--r-- | src/libcpu/i386_parse.y | 33 | ||||
-rw-r--r-- | src/libcpu/memory-access.h | 33 | ||||
-rw-r--r-- | src/libcpu/x86_64_disasm.c | 35 |
14 files changed, 1375 insertions, 538 deletions
diff --git a/src/libcpu/ChangeLog b/src/libcpu/ChangeLog index 76340a13..a20f4407 100644 --- a/src/libcpu/ChangeLog +++ b/src/libcpu/ChangeLog @@ -1,3 +1,25 @@ +2014-04-13 Mark Wielaard <mjw@redhat.com> + + * Makefile.am (i386_gendis_LDADD): Remove libmudflap. + +2013-04-24 Mark Wielaard <mjw@redhat.com> + + * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. + +2012-10-10 Roland McGrath <roland@hack.frob.com> + + * Makefile.am (%_defs, $(srcdir)/%_dis.h): Redirect to temp file, + mv into place with separate command. + +2012-06-26 Roland McGrath <roland@hack.frob.com> + + * Makefile.am [!MAINTAINER_MODE] ($(srcdir)/%_dis.h): New rule. + +2012-02-24 Mark Wielaard <mjw@redhat.com> + + * Makefile.am (CLEANFILES): Move %_dis.h to... + (MAINTAINERCLEANFILES): here. + 2012-01-21 Ulrich Drepper <drepper@gmail.com> * i386_disasm.c (ADD_NSTRING): Define. diff --git a/src/libcpu/Makefile b/src/libcpu/Makefile new file mode 100644 index 00000000..1d74028a --- /dev/null +++ b/src/libcpu/Makefile @@ -0,0 +1,672 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# libcpu/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + + + +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/elfutils +pkgincludedir = $(includedir)/elfutils +pkglibdir = $(libdir)/elfutils +pkglibexecdir = $(libexecdir)/elfutils +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am i386_lex.c i386_parse.c \ + $(top_srcdir)/config/depcomp $(top_srcdir)/config/ylwrap \ + $(am__noinst_HEADERS_DIST) ChangeLog +#noinst_PROGRAMS = i386_gendis$(EXEEXT) +subdir = libcpu +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/zip.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libcpu_i386_a_AR = $(AR) $(ARFLAGS) +libcpu_i386_a_LIBADD = +am_libcpu_i386_a_OBJECTS = i386_disasm.$(OBJEXT) +libcpu_i386_a_OBJECTS = $(am_libcpu_i386_a_OBJECTS) +libcpu_x86_64_a_AR = $(AR) $(ARFLAGS) +libcpu_x86_64_a_LIBADD = +am_libcpu_x86_64_a_OBJECTS = x86_64_disasm.$(OBJEXT) +libcpu_x86_64_a_OBJECTS = $(am_libcpu_x86_64_a_OBJECTS) +PROGRAMS = $(noinst_PROGRAMS) +am_i386_gendis_OBJECTS = i386_gendis.$(OBJEXT) i386_lex.$(OBJEXT) \ + i386_parse.$(OBJEXT) +i386_gendis_OBJECTS = $(am_i386_gendis_OBJECTS) +i386_gendis_DEPENDENCIES = $(libeu) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +am__skiplex = test -f $@ || +AM_V_LEX = $(am__v_LEX_$(V)) +am__v_LEX_ = $(am__v_LEX_$(AM_DEFAULT_VERBOSITY)) +am__v_LEX_0 = @echo " LEX " $@; +am__v_LEX_1 = +YLWRAP = $(top_srcdir)/config/ylwrap +am__skipyacc = test -f $@ || +am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ + -e s/c++$$/h++/ -e s/c$$/h/ +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) +AM_V_YACC = $(am__v_YACC_$(V)) +am__v_YACC_ = $(am__v_YACC_$(AM_DEFAULT_VERBOSITY)) +am__v_YACC_0 = @echo " YACC " $@; +am__v_YACC_1 = +SOURCES = $(libcpu_i386_a_SOURCES) $(libcpu_x86_64_a_SOURCES) \ + $(i386_gendis_SOURCES) +DIST_SOURCES = $(libcpu_i386_a_SOURCES) $(libcpu_x86_64_a_SOURCES) \ + $(i386_gendis_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__noinst_HEADERS_DIST = memory-access.h i386_parse.h i386_data.h +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /huge-ssd/aosp-arm64/external/elfutils/src/config/missing aclocal-1.14 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +AUTOCONF = ${SHELL} /huge-ssd/aosp-arm64/external/elfutils/src/config/missing autoconf +AUTOHEADER = ${SHELL} /huge-ssd/aosp-arm64/external/elfutils/src/config/missing autoheader +AUTOMAKE = ${SHELL} /huge-ssd/aosp-arm64/external/elfutils/src/config/missing automake-1.14 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CC_BIARCH = gcc -m32 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEBUGPRED = 0 +DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"' +DEPDIR = .deps +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +GETTEXT_MACRO_VERSION = 0.18 +GMSGFMT = /usr/bin/msgfmt +GMSGFMT_015 = /usr/bin/msgfmt +GREP = /bin/grep +HAVE_VALGRIND = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LDFLAGS = +LEX = flex +LEXLIB = -lfl +LEX_OUTPUT_ROOT = lex.$(<F:lex.l=) +LIBEBL_SUBDIR = elfutils +LIBOBJS = +LIBS = +LTLIBOBJS = +MAINT = # +MAKEINFO = ${SHELL} /huge-ssd/aosp-arm64/external/elfutils/src/config/missing makeinfo +MKDIR_P = /bin/mkdir -p +MODVERSION = Build on enh.mtv.corp.google.com 2015-02-18T19:32:04-0800 +MSGFMT = /usr/bin/msgfmt +MSGFMT_015 = /usr/bin/msgfmt +MSGMERGE = /usr/bin/msgmerge +NM = nm +OBJEXT = o +PACKAGE = elfutils +PACKAGE_BUGREPORT = https://bugzilla.redhat.com/ +PACKAGE_NAME = elfutils +PACKAGE_STRING = elfutils 0.161 +PACKAGE_TARNAME = elfutils +PACKAGE_URL = +PACKAGE_VERSION = 0.161 +PATH_SEPARATOR = : +RANLIB = ranlib +READELF = readelf +SET_MAKE = +SHELL = /bin/sh +STRIP = +USE_NLS = yes +VERSION = 0.161 +XGETTEXT = /usr/bin/xgettext +XGETTEXT_015 = /usr/bin/xgettext +XGETTEXT_EXTRA_OPTIONS = +YACC = bison -y +YFLAGS = +abs_builddir = /huge-ssd/aosp-arm64/external/elfutils/src/libcpu +abs_srcdir = /huge-ssd/aosp-arm64/external/elfutils/src/libcpu +abs_top_builddir = /huge-ssd/aosp-arm64/external/elfutils/src +abs_top_srcdir = /huge-ssd/aosp-arm64/external/elfutils/src +ac_ct_AR = ar +ac_ct_CC = gcc +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +base_cpu = none +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +eu_version = 161 +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /huge-ssd/aosp-arm64/external/elfutils/src/config/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +zip_LIBS = -lz +AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ + -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ + -I$(srcdir)/../libdw -I$(srcdir)/../libasm +AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 $(if \ + $($(*F)_no_Werror),,-Werror) $(if \ + $($(*F)_no_Wunused),,-Wunused -Wextra) $($(*F)_CFLAGS) -fpic \ + -fdollars-in-identifiers +COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) +CLEANFILES = *.gcno *.gcda $(foreach P,i386 x86_64,$P_defs \ + $P.mnemonics) +textrel_msg = echo "WARNING: TEXTREL found in '$@'" +#textrel_found = $(textrel_msg) +textrel_found = $(textrel_msg); exit 1 +textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi +LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) -P$(<F:lex.l=) +AM_YFLAGS = -p$(<F:parse.y=) +noinst_LIBRARIES = libcpu_i386.a libcpu_x86_64.a +libcpu_i386_a_SOURCES = i386_disasm.c i386_dis.h +libcpu_x86_64_a_SOURCES = x86_64_disasm.c x86_64_dis.h +i386_gendis_SOURCES = i386_gendis.c i386_lex.l i386_parse.y +#noinst_HEADERS = memory-access.h i386_parse.h i386_data.h +i386_lex_no_Werror = yes +libeu = ../lib/libeu.a +i386_lex_CFLAGS = -Wno-unused-label -Wno-unused-function -Wno-sign-compare +i386_parse_CFLAGS = -DNMNES="`wc -l < i386.mnemonics`" +i386_gendis_LDADD = $(libeu) -lm +EXTRA_DIST = defs/i386 +MAINTAINERCLEANFILES = $(foreach P,i386 x86_64, $P_dis.h) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .l .o .obj .y +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/config/eu.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits libcpu/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnits libcpu/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/config/eu.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +libcpu_i386.a: $(libcpu_i386_a_OBJECTS) $(libcpu_i386_a_DEPENDENCIES) $(EXTRA_libcpu_i386_a_DEPENDENCIES) + $(AM_V_at)-rm -f libcpu_i386.a + $(AM_V_AR)$(libcpu_i386_a_AR) libcpu_i386.a $(libcpu_i386_a_OBJECTS) $(libcpu_i386_a_LIBADD) + $(AM_V_at)$(RANLIB) libcpu_i386.a + +libcpu_x86_64.a: $(libcpu_x86_64_a_OBJECTS) $(libcpu_x86_64_a_DEPENDENCIES) $(EXTRA_libcpu_x86_64_a_DEPENDENCIES) + $(AM_V_at)-rm -f libcpu_x86_64.a + $(AM_V_AR)$(libcpu_x86_64_a_AR) libcpu_x86_64.a $(libcpu_x86_64_a_OBJECTS) $(libcpu_x86_64_a_LIBADD) + $(AM_V_at)$(RANLIB) libcpu_x86_64.a + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) + +i386_gendis$(EXEEXT): $(i386_gendis_OBJECTS) $(i386_gendis_DEPENDENCIES) $(EXTRA_i386_gendis_DEPENDENCIES) + @rm -f i386_gendis$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(i386_gendis_OBJECTS) $(i386_gendis_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/i386_disasm.Po +include ./$(DEPDIR)/i386_gendis.Po +include ./$(DEPDIR)/i386_lex.Po +include ./$(DEPDIR)/i386_parse.Po +include ./$(DEPDIR)/x86_64_disasm.Po + +.c.o: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.l.c: + $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) + +.y.c: + $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -rm -f i386_lex.c + -rm -f i386_parse.c + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES clean-noinstPROGRAMS cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + + +%.os: %.c %.o + if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ + -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ + then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ + rm -f "$(DEPDIR)/$*.Tpo"; \ + else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + fi +# $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< + +i386_disasm.o: i386.mnemonics $(srcdir)/i386_dis.h +x86_64_disasm.o: x86_64.mnemonics $(srcdir)/x86_64_dis.h + +%_defs: $(srcdir)/defs/i386 + m4 -D$* -DDISASSEMBLER $< > $@T + mv -f $@T $@ + +#$(srcdir)/%_dis.h: %_defs i386_gendis +# ./i386_gendis $< > $@T +# mv -f $@T $@ + +$(srcdir)/%_dis.h: + @echo '*** missing $@; configure with --enable-maintainer-mode' + @false + +%.mnemonics: %_defs + sed '1,/^%%/d;/^#/d;/^[[:space:]]*$$/d;s/[^:]*:\([^[:space:]]*\).*/MNE(\1)/;s/{[^}]*}//g;/INVALID/d' \ + $< | sort -u > $@ +i386_parse.o: i386_parse.c i386.mnemonics +i386_lex.o: i386_parse.h + +i386_parse.h: i386_parse.c ; + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/libcpu/Makefile.am b/src/libcpu/Makefile.am index 7dd25610..3beccf34 100644 --- a/src/libcpu/Makefile.am +++ b/src/libcpu/Makefile.am @@ -1,31 +1,34 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 2002-2011 Red Hat, Inc. -## This file is part of Red Hat elfutils. +## Copyright (C) 2002-2012 Red Hat, Inc. +## This file is part of elfutils. ## -## Red Hat elfutils 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; version 2 of the License. +## This file is free software; you can redistribute it and/or modify +## it under the terms of either ## -## Red Hat elfutils is distributed in the hope that it will be useful, but +## * the GNU Lesser General Public License as published by the Free +## Software Foundation; either version 3 of the License, or (at +## your option) any later version +## +## or +## +## * the GNU General Public License as published by the Free +## Software Foundation; either version 2 of the License, or (at +## your option) any later version +## +## or both in parallel, as here. +## +## elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation, -## Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. -## -## Red Hat elfutils is an included package of the Open Invention Network. -## An included package of the Open Invention Network is a package for which -## Open Invention Network licensees cross-license their patents. No patent -## license is granted, either expressly or impliedly, by designation as an -## included package. Should you wish to participate in the Open Invention -## Network licensing program, please visit www.openinventionnetwork.com -## <http://www.openinventionnetwork.com>. +## You should have received copies of the GNU General Public License and +## the GNU Lesser General Public License along with this program. If +## not, see <http://www.gnu.org/licenses/>. ## include $(top_srcdir)/config/eu.am -INCLUDES += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ +AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ -I$(srcdir)/../libdw -I$(srcdir)/../libasm AM_CFLAGS += -fpic -fdollars-in-identifiers LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) -P$(<F:lex.l=) @@ -43,7 +46,8 @@ i386_disasm.o: i386.mnemonics $(srcdir)/i386_dis.h x86_64_disasm.o: x86_64.mnemonics $(srcdir)/x86_64_dis.h %_defs: $(srcdir)/defs/i386 - m4 -D$* -DDISASSEMBLER $< > $@ + m4 -D$* -DDISASSEMBLER $< > $@T + mv -f $@T $@ if MAINTAINER_MODE noinst_HEADERS = memory-access.h i386_parse.h i386_data.h @@ -51,7 +55,15 @@ noinst_HEADERS = memory-access.h i386_parse.h i386_data.h noinst_PROGRAMS = i386_gendis $(srcdir)/%_dis.h: %_defs i386_gendis - ./i386_gendis $< > $@ + ./i386_gendis $< > $@T + mv -f $@T $@ + +else + +$(srcdir)/%_dis.h: + @echo '*** missing $@; configure with --enable-maintainer-mode' + @false + endif %.mnemonics: %_defs @@ -66,10 +78,11 @@ i386_lex_CFLAGS = -Wno-unused-label -Wno-unused-function -Wno-sign-compare i386_parse.o: i386_parse.c i386.mnemonics i386_parse_CFLAGS = -DNMNES="`wc -l < i386.mnemonics`" i386_lex.o: i386_parse.h -i386_gendis_LDADD = $(libeu) -lm $(libmudflap) +i386_gendis_LDADD = $(libeu) -lm i386_parse.h: i386_parse.c ; EXTRA_DIST = defs/i386 -CLEANFILES += $(foreach P,i386 x86_64,$P_defs $P.mnemonics $P_dis.h) +CLEANFILES += $(foreach P,i386 x86_64,$P_defs $P.mnemonics) +MAINTAINERCLEANFILES = $(foreach P,i386 x86_64, $P_dis.h) diff --git a/src/libcpu/Makefile.in b/src/libcpu/Makefile.in index 1565505e..3c90e34e 100644 --- a/src/libcpu/Makefile.in +++ b/src/libcpu/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,6 +17,51 @@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,14 +80,15 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog \ - i386_lex.c i386_parse.c -@MUDFLAP_TRUE@am__append_1 = -fmudflap +DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am i386_lex.c i386_parse.c \ + $(top_srcdir)/config/depcomp $(top_srcdir)/config/ylwrap \ + $(am__noinst_HEADERS_DIST) ChangeLog @MAINTAINER_MODE_TRUE@noinst_PROGRAMS = i386_gendis$(EXEEXT) subdir = libcpu ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/zip.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -53,8 +98,11 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libcpu_i386_a_AR = $(AR) $(ARFLAGS) libcpu_i386_a_LIBADD = am_libcpu_i386_a_OBJECTS = i386_disasm.$(OBJEXT) @@ -67,38 +115,93 @@ PROGRAMS = $(noinst_PROGRAMS) am_i386_gendis_OBJECTS = i386_gendis.$(OBJEXT) i386_lex.$(OBJEXT) \ i386_parse.$(OBJEXT) i386_gendis_OBJECTS = $(am_i386_gendis_OBJECTS) -am__DEPENDENCIES_1 = -i386_gendis_DEPENDENCIES = $(libeu) $(am__DEPENDENCIES_1) +i386_gendis_DEPENDENCIES = $(libeu) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = @MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || +AM_V_LEX = $(am__v_LEX_@AM_V@) +am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) +am__v_LEX_0 = @echo " LEX " $@; +am__v_LEX_1 = YLWRAP = $(top_srcdir)/config/ylwrap @MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || -YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) +am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ + -e s/c++$$/h++/ -e s/c$$/h/ +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) +AM_V_YACC = $(am__v_YACC_@AM_V@) +am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) +am__v_YACC_0 = @echo " YACC " $@; +am__v_YACC_1 = SOURCES = $(libcpu_i386_a_SOURCES) $(libcpu_x86_64_a_SOURCES) \ $(i386_gendis_SOURCES) DIST_SOURCES = $(libcpu_i386_a_SOURCES) $(libcpu_x86_64_a_SOURCES) \ $(i386_gendis_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__noinst_HEADERS_DIST = memory-access.h i386_parse.h i386_data.h HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ +CC_BIARCH = @CC_BIARCH@ CFLAGS = @CFLAGS@ +CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUGPRED = @DEBUGPRED@ @@ -107,10 +210,13 @@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ +EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -131,6 +237,7 @@ MODVERSION = @MODVERSION@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NM = @NM@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -141,6 +248,7 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ +READELF = @READELF@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -155,6 +263,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -204,22 +313,20 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zip_LIBS = @zip_LIBS@ -INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ +AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ -I$(srcdir)/../libdw -I$(srcdir)/../libasm -AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 $(if \ $($(*F)_no_Werror),,-Werror) $(if \ - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ - $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ - $(am__append_1) -fpic -fdollars-in-identifiers -@MUDFLAP_FALSE@libmudflap = -@MUDFLAP_TRUE@libmudflap = -lmudflap -COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ - $(COMPILE)) - + $($(*F)_no_Wunused),,-Wunused -Wextra) $($(*F)_CFLAGS) -fpic \ + -fdollars-in-identifiers +COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) CLEANFILES = *.gcno *.gcda $(foreach P,i386 x86_64,$P_defs \ - $P.mnemonics $P_dis.h) -textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi + $P.mnemonics) +textrel_msg = echo "WARNING: TEXTREL found in '$@'" +@FATAL_TEXTREL_FALSE@textrel_found = $(textrel_msg) +@FATAL_TEXTREL_TRUE@textrel_found = $(textrel_msg); exit 1 +textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) -P$(<F:lex.l=) AM_YFLAGS = -p$(<F:parse.y=) noinst_LIBRARIES = libcpu_i386.a libcpu_x86_64.a @@ -231,8 +338,9 @@ i386_lex_no_Werror = yes libeu = ../lib/libeu.a i386_lex_CFLAGS = -Wno-unused-label -Wno-unused-function -Wno-sign-compare i386_parse_CFLAGS = -DNMNES="`wc -l < i386.mnemonics`" -i386_gendis_LDADD = $(libeu) -lm $(libmudflap) +i386_gendis_LDADD = $(libeu) -lm EXTRA_DIST = defs/i386 +MAINTAINERCLEANFILES = $(foreach P,i386 x86_64, $P_dis.h) all: all-am .SUFFIXES: @@ -258,6 +366,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/eu.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -270,20 +379,23 @@ $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libcpu_i386.a: $(libcpu_i386_a_OBJECTS) $(libcpu_i386_a_DEPENDENCIES) - -rm -f libcpu_i386.a - $(libcpu_i386_a_AR) libcpu_i386.a $(libcpu_i386_a_OBJECTS) $(libcpu_i386_a_LIBADD) - $(RANLIB) libcpu_i386.a -libcpu_x86_64.a: $(libcpu_x86_64_a_OBJECTS) $(libcpu_x86_64_a_DEPENDENCIES) - -rm -f libcpu_x86_64.a - $(libcpu_x86_64_a_AR) libcpu_x86_64.a $(libcpu_x86_64_a_OBJECTS) $(libcpu_x86_64_a_LIBADD) - $(RANLIB) libcpu_x86_64.a + +libcpu_i386.a: $(libcpu_i386_a_OBJECTS) $(libcpu_i386_a_DEPENDENCIES) $(EXTRA_libcpu_i386_a_DEPENDENCIES) + $(AM_V_at)-rm -f libcpu_i386.a + $(AM_V_AR)$(libcpu_i386_a_AR) libcpu_i386.a $(libcpu_i386_a_OBJECTS) $(libcpu_i386_a_LIBADD) + $(AM_V_at)$(RANLIB) libcpu_i386.a + +libcpu_x86_64.a: $(libcpu_x86_64_a_OBJECTS) $(libcpu_x86_64_a_DEPENDENCIES) $(EXTRA_libcpu_x86_64_a_DEPENDENCIES) + $(AM_V_at)-rm -f libcpu_x86_64.a + $(AM_V_AR)$(libcpu_x86_64_a_AR) libcpu_x86_64.a $(libcpu_x86_64_a_OBJECTS) $(libcpu_x86_64_a_LIBADD) + $(AM_V_at)$(RANLIB) libcpu_x86_64.a clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) -i386_gendis$(EXEEXT): $(i386_gendis_OBJECTS) $(i386_gendis_DEPENDENCIES) + +i386_gendis$(EXEEXT): $(i386_gendis_OBJECTS) $(i386_gendis_DEPENDENCIES) $(EXTRA_i386_gendis_DEPENDENCIES) @rm -f i386_gendis$(EXEEXT) - $(LINK) $(i386_gendis_OBJECTS) $(i386_gendis_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(i386_gendis_OBJECTS) $(i386_gendis_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -298,45 +410,34 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x86_64_disasm.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .l.c: - $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) + $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) .y.c: - $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) + $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -348,15 +449,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -365,6 +462,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -413,10 +525,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -431,6 +548,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." -rm -f i386_lex.c -rm -f i386_parse.c + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \ @@ -503,18 +621,18 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES clean-noinstPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES clean-noinstPROGRAMS cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am %.os: %.c %.o @@ -530,10 +648,16 @@ i386_disasm.o: i386.mnemonics $(srcdir)/i386_dis.h x86_64_disasm.o: x86_64.mnemonics $(srcdir)/x86_64_dis.h %_defs: $(srcdir)/defs/i386 - m4 -D$* -DDISASSEMBLER $< > $@ + m4 -D$* -DDISASSEMBLER $< > $@T + mv -f $@T $@ @MAINTAINER_MODE_TRUE@$(srcdir)/%_dis.h: %_defs i386_gendis -@MAINTAINER_MODE_TRUE@ ./i386_gendis $< > $@ +@MAINTAINER_MODE_TRUE@ ./i386_gendis $< > $@T +@MAINTAINER_MODE_TRUE@ mv -f $@T $@ + +@MAINTAINER_MODE_FALSE@$(srcdir)/%_dis.h: +@MAINTAINER_MODE_FALSE@ @echo '*** missing $@; configure with --enable-maintainer-mode' +@MAINTAINER_MODE_FALSE@ @false %.mnemonics: %_defs sed '1,/^%%/d;/^#/d;/^[[:space:]]*$$/d;s/[^:]*:\([^[:space:]]*\).*/MNE(\1)/;s/{[^}]*}//g;/INVALID/d' \ diff --git a/src/libcpu/i386_data.h b/src/libcpu/i386_data.h index 42e66500..b8a34c3e 100644 --- a/src/libcpu/i386_data.h +++ b/src/libcpu/i386_data.h @@ -1,28 +1,31 @@ /* Helper routines for disassembler for x86/x86-64. Copyright (C) 2007, 2008 Red Hat, Inc. - This file is part of Red Hat elfutils. + This file is part of elfutils. Written by Ulrich Drepper <drepper@redhat.com>, 2007. - Red Hat elfutils 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; version 2 of the License. + This file is free software; you can redistribute it and/or modify + it under the terms of either - Red Hat elfutils is distributed in the hope that it will be useful, but + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. - - Red Hat elfutils is an included package of the Open Invention Network. - An included package of the Open Invention Network is a package for which - Open Invention Network licensees cross-license their patents. No patent - license is granted, either expressly or impliedly, by designation as an - included package. Should you wish to participate in the Open Invention - Network licensing program, please visit www.openinventionnetwork.com - <http://www.openinventionnetwork.com>. */ + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see <http://www.gnu.org/licenses/>. */ #include <inttypes.h> #include <stddef.h> diff --git a/src/libcpu/i386_disasm.c b/src/libcpu/i386_disasm.c index 6d58f0ea..832241f2 100644 --- a/src/libcpu/i386_disasm.c +++ b/src/libcpu/i386_disasm.c @@ -1,28 +1,31 @@ /* Disassembler for x86. Copyright (C) 2007, 2008, 2009, 2011 Red Hat, Inc. - This file is part of Red Hat elfutils. + This file is part of elfutils. Written by Ulrich Drepper <drepper@redhat.com>, 2007. - Red Hat elfutils 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; version 2 of the License. + This file is free software; you can redistribute it and/or modify + it under the terms of either - Red Hat elfutils is distributed in the hope that it will be useful, but + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. - - Red Hat elfutils is an included package of the Open Invention Network. - An included package of the Open Invention Network is a package for which - Open Invention Network licensees cross-license their patents. No patent - license is granted, either expressly or impliedly, by designation as an - included package. Should you wish to participate in the Open Invention - Network licensing program, please visit www.openinventionnetwork.com - <http://www.openinventionnetwork.com>. */ + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see <http://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H # include <config.h> diff --git a/src/libcpu/i386_gendis.c b/src/libcpu/i386_gendis.c index a8570f19..aae5eae6 100644 --- a/src/libcpu/i386_gendis.c +++ b/src/libcpu/i386_gendis.c @@ -1,28 +1,31 @@ /* Generate tables for x86 disassembler. Copyright (C) 2007, 2008 Red Hat, Inc. - This file is part of Red Hat elfutils. + This file is part of elfutils. Written by Ulrich Drepper <drepper@redhat.com>, 2007. - Red Hat elfutils 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; version 2 of the License. + This file is free software; you can redistribute it and/or modify + it under the terms of either - Red Hat elfutils is distributed in the hope that it will be useful, but + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. - - Red Hat elfutils is an included package of the Open Invention Network. - An included package of the Open Invention Network is a package for which - Open Invention Network licensees cross-license their patents. No patent - license is granted, either expressly or impliedly, by designation as an - included package. Should you wish to participate in the Open Invention - Network licensing program, please visit www.openinventionnetwork.com - <http://www.openinventionnetwork.com>. */ + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see <http://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H # include <config.h> diff --git a/src/libcpu/i386_lex.c b/src/libcpu/i386_lex.c index a4540b92..cb0be8de 100644 --- a/src/libcpu/i386_lex.c +++ b/src/libcpu/i386_lex.c @@ -27,7 +27,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_SUBMINOR_VERSION 37 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -72,7 +72,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -103,6 +102,8 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#endif /* ! C99 */ + #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -171,7 +172,12 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -extern int i386_leng; +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t i386_leng; extern FILE *i386_in, *i386_out; @@ -210,11 +216,6 @@ extern FILE *i386_in, *i386_out; #define unput(c) yyunput( c, (yytext_ptr) ) -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -232,7 +233,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -302,8 +303,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* yy_hold_char holds the character lost when i386_text is formed. */ static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int i386_leng; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t i386_leng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -331,7 +332,7 @@ static void i386__init_buffer (YY_BUFFER_STATE b,FILE *file ); YY_BUFFER_STATE i386__scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE i386__scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE i386__scan_bytes (yyconst char *bytes,int len ); +YY_BUFFER_STATE i386__scan_bytes (yyconst char *bytes,yy_size_t len ); void *i386_alloc (yy_size_t ); void *i386_realloc (void *,yy_size_t ); @@ -363,7 +364,7 @@ void i386_free (void * ); /* Begin user sect3 */ -#define i386_wrap(n) 1 +#define i386_wrap() 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; @@ -536,31 +537,34 @@ int i386__flex_debug = 0; #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *i386_text; -#line 1 "i386_lex.l" -#line 2 "i386_lex.l" +#line 1 "/home/mark/src/elfutils/libcpu/i386_lex.l" +#line 2 "/home/mark/src/elfutils/libcpu/i386_lex.l" /* Copyright (C) 2004, 2005, 2007, 2008 Red Hat, Inc. Written by Ulrich Drepper <drepper@redhat.com>, 2004. - Red Hat elfutils 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; version 2 of the License. + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version - Red Hat elfutils is distributed in the hope that it will be useful, but + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. - - Red Hat elfutils is an included package of the Open Invention Network. - An included package of the Open Invention Network is a package for which - Open Invention Network licensees cross-license their patents. No patent - license is granted, either expressly or impliedly, by designation as an - included package. Should you wish to participate in the Open Invention - Network licensing program, please visit www.openinventionnetwork.com - <http://www.openinventionnetwork.com>. */ + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see <http://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H # include <config.h> @@ -577,7 +581,7 @@ char *i386_text; static void eat_to_eol (void); static void invalid_char (int ch); -#line 581 "i386_lex.c" +#line 585 "i386_lex.c" #define INITIAL 0 #define MAIN 1 @@ -617,7 +621,7 @@ FILE *i386_get_out (void ); void i386_set_out (FILE * out_str ); -int i386_get_leng (void ); +yy_size_t i386_get_leng (void ); char *i386_get_text (void ); @@ -678,7 +682,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - unsigned n; \ + size_t n; \ for ( n = 0; n < max_size && \ (c = getc( i386_in )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -763,10 +767,10 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 54 "i386_lex.l" +#line 57 "/home/mark/src/elfutils/libcpu/i386_lex.l" -#line 770 "i386_lex.c" +#line 774 "i386_lex.c" if ( !(yy_init) ) { @@ -837,7 +841,7 @@ yy_find_action: if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { - int yyl; + yy_size_t yyl; for ( yyl = 0; yyl < i386_leng; ++yyl ) if ( i386_text[yyl] == '\n' ) @@ -858,119 +862,119 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 56 "i386_lex.l" +#line 59 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return kMASK; } YY_BREAK case 2: YY_RULE_SETUP -#line 58 "i386_lex.l" +#line 61 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return kPREFIX; } YY_BREAK case 3: YY_RULE_SETUP -#line 59 "i386_lex.l" +#line 62 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return kSUFFIX; } YY_BREAK case 4: YY_RULE_SETUP -#line 61 "i386_lex.l" +#line 64 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return kSYNONYM; } YY_BREAK case 5: YY_RULE_SETUP -#line 63 "i386_lex.l" +#line 66 "/home/mark/src/elfutils/libcpu/i386_lex.l" { i386_lval.num = strtoul (i386_text, NULL, 10); return kNUMBER; } YY_BREAK case 6: YY_RULE_SETUP -#line 66 "i386_lex.l" +#line 69 "/home/mark/src/elfutils/libcpu/i386_lex.l" { BEGIN (MAIN); return kPERCPERC; } YY_BREAK case 7: YY_RULE_SETUP -#line 69 "i386_lex.l" +#line 72 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return '0'; } YY_BREAK case 8: YY_RULE_SETUP -#line 70 "i386_lex.l" +#line 73 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return '1'; } YY_BREAK case 9: YY_RULE_SETUP -#line 72 "i386_lex.l" +#line 75 "/home/mark/src/elfutils/libcpu/i386_lex.l" { i386_lval.str = xstrndup (i386_text + 1, i386_leng - 2); return kBITFIELD; } YY_BREAK case 10: YY_RULE_SETUP -#line 76 "i386_lex.l" +#line 79 "/home/mark/src/elfutils/libcpu/i386_lex.l" { i386_lval.str = (void *) -1l; return kID; } YY_BREAK case 11: YY_RULE_SETUP -#line 79 "i386_lex.l" +#line 82 "/home/mark/src/elfutils/libcpu/i386_lex.l" { i386_lval.str = xstrndup (i386_text, i386_leng); return kID; } YY_BREAK case 12: YY_RULE_SETUP -#line 82 "i386_lex.l" +#line 85 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return ','; } YY_BREAK case 13: YY_RULE_SETUP -#line 84 "i386_lex.l" +#line 87 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return ':'; } YY_BREAK case 14: /* rule 14 can match eol */ YY_RULE_SETUP -#line 86 "i386_lex.l" +#line 89 "/home/mark/src/elfutils/libcpu/i386_lex.l" { /* IGNORE */ } YY_BREAK case 15: /* rule 15 can match eol */ YY_RULE_SETUP -#line 88 "i386_lex.l" +#line 91 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return '\n'; } YY_BREAK case 16: YY_RULE_SETUP -#line 90 "i386_lex.l" +#line 93 "/home/mark/src/elfutils/libcpu/i386_lex.l" { eat_to_eol (); } YY_BREAK case 17: /* rule 17 can match eol */ YY_RULE_SETUP -#line 92 "i386_lex.l" +#line 95 "/home/mark/src/elfutils/libcpu/i386_lex.l" { /* IGNORE */ } YY_BREAK case 18: /* rule 18 can match eol */ YY_RULE_SETUP -#line 94 "i386_lex.l" +#line 97 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return kSPACE; } YY_BREAK case 19: YY_RULE_SETUP -#line 96 "i386_lex.l" +#line 99 "/home/mark/src/elfutils/libcpu/i386_lex.l" { i386_lval.ch = *i386_text; return kCHAR; } YY_BREAK case 20: YY_RULE_SETUP -#line 98 "i386_lex.l" +#line 101 "/home/mark/src/elfutils/libcpu/i386_lex.l" { invalid_char (*i386_text); } YY_BREAK case 21: YY_RULE_SETUP -#line 101 "i386_lex.l" +#line 104 "/home/mark/src/elfutils/libcpu/i386_lex.l" ECHO; YY_BREAK -#line 974 "i386_lex.c" +#line 978 "i386_lex.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(MAIN): yyterminate(); @@ -1158,21 +1162,21 @@ static int yy_get_next_buffer (void) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1203,7 +1207,7 @@ static int yy_get_next_buffer (void) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); + (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1299,7 +1303,7 @@ static int yy_get_next_buffer (void) yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 61); - return yy_is_jam ? 0 : yy_current_state; + return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) @@ -1314,7 +1318,7 @@ static int yy_get_next_buffer (void) if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register int number_to_move = (yy_n_chars) + 2; + register yy_size_t number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = @@ -1367,7 +1371,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); + yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -1645,7 +1649,7 @@ void i386_pop_buffer_state (void) */ static void i386_ensure_buffer_stack (void) { - int num_to_alloc; + yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { @@ -1737,17 +1741,17 @@ YY_BUFFER_STATE i386__scan_string (yyconst char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to i386_lex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE i386__scan_bytes (yyconst char * yybytes, int _yybytes_len ) +YY_BUFFER_STATE i386__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; @@ -1829,7 +1833,7 @@ FILE *i386_get_out (void) /** Get the length of the current token. * */ -int i386_get_leng (void) +yy_size_t i386_get_leng (void) { return i386_leng; } @@ -1980,7 +1984,7 @@ void i386_free (void * ptr ) #define YYTABLES_NAME "yytables" -#line 101 "i386_lex.l" +#line 104 "/home/mark/src/elfutils/libcpu/i386_lex.l" diff --git a/src/libcpu/i386_lex.l b/src/libcpu/i386_lex.l index 828c5589..1e10dd76 100644 --- a/src/libcpu/i386_lex.l +++ b/src/libcpu/i386_lex.l @@ -2,26 +2,29 @@ /* Copyright (C) 2004, 2005, 2007, 2008 Red Hat, Inc. Written by Ulrich Drepper <drepper@redhat.com>, 2004. - Red Hat elfutils 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; version 2 of the License. + This file is free software; you can redistribute it and/or modify + it under the terms of either - Red Hat elfutils is distributed in the hope that it will be useful, but + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. - - Red Hat elfutils is an included package of the Open Invention Network. - An included package of the Open Invention Network is a package for which - Open Invention Network licensees cross-license their patents. No patent - license is granted, either expressly or impliedly, by designation as an - included package. Should you wish to participate in the Open Invention - Network licensing program, please visit www.openinventionnetwork.com - <http://www.openinventionnetwork.com>. */ + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see <http://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H # include <config.h> diff --git a/src/libcpu/i386_parse.c b/src/libcpu/i386_parse.c index 575fcc52..cf8fe259 100644 --- a/src/libcpu/i386_parse.c +++ b/src/libcpu/i386_parse.c @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 2.7. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "2.7" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -58,8 +58,6 @@ /* Pull parsers. */ #define YYPULL 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse i386_parse @@ -70,36 +68,37 @@ #define yydebug i386_debug #define yynerrs i386_nerrs - /* Copy the first part of user declarations. */ - -/* Line 268 of yacc.c */ -#line 1 "i386_parse.y" +/* Line 371 of yacc.c */ +#line 1 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* Parser for i386 CPU description. Copyright (C) 2004, 2005, 2007, 2008, 2009 Red Hat, Inc. Written by Ulrich Drepper <drepper@redhat.com>, 2004. - Red Hat elfutils 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; version 2 of the License. + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. - Red Hat elfutils is distributed in the hope that it will be useful, but + elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. - - Red Hat elfutils is an included package of the Open Invention Network. - An included package of the Open Invention Network is a package for which - Open Invention Network licensees cross-license their patents. No patent - license is granted, either expressly or impliedly, by designation as an - included package. Should you wish to participate in the Open Invention - Network licensing program, please visit www.openinventionnetwork.com - <http://www.openinventionnetwork.com>. */ + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see <http://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H # include <config.h> @@ -287,14 +286,16 @@ extern FILE *outfile; static size_t best_mnemonic_bits; #endif +/* Line 371 of yacc.c */ +#line 291 "i386_parse.c" -/* Line 268 of yacc.c */ -#line 293 "i386_parse.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +# ifndef YY_NULL +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULL nullptr +# else +# define YY_NULL 0 +# endif +# endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -304,11 +305,17 @@ static size_t best_mnemonic_bits; # define YYERROR_VERBOSE 0 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 +/* In a future release of Bison, this section will be replaced + by #include "y.tab.h". */ +#ifndef YY_I386_I_PARSE_H_INCLUDED +# define YY_I386_I_PARSE_H_INCLUDED +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int i386_debug; #endif - /* Tokens. */ #ifndef YYTOKENTYPE @@ -342,13 +349,11 @@ static size_t best_mnemonic_bits; - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { - -/* Line 293 of yacc.c */ -#line 214 "i386_parse.y" +/* Line 387 of yacc.c */ +#line 217 "/home/mark/src/elfutils/libcpu/i386_parse.y" unsigned long int num; char *str; @@ -359,21 +364,36 @@ typedef union YYSTYPE struct argument *arg; - -/* Line 293 of yacc.c */ -#line 365 "i386_parse.c" +/* Line 387 of yacc.c */ +#line 369 "i386_parse.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif +extern YYSTYPE i386_lval; -/* Copy the second part of user declarations. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int i386_parse (void *YYPARSE_PARAM); +#else +int i386_parse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int i386_parse (void); +#else +int i386_parse (); +#endif +#endif /* ! YYPARSE_PARAM */ +#endif /* !YY_I386_I_PARSE_H_INCLUDED */ -/* Line 343 of yacc.c */ -#line 377 "i386_parse.c" +/* Copy the second part of user declarations. */ + +/* Line 390 of yacc.c */ +#line 397 "i386_parse.c" #ifdef short # undef short @@ -426,24 +446,24 @@ typedef short int yytype_int16; # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint -# define YYID(n) (n) +# define YYID(N) (N) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) @@ -479,6 +499,7 @@ YYID (yyi) # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif @@ -570,20 +591,20 @@ union yyalloc #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do +/* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ while (YYID (0)) # endif # endif @@ -670,14 +691,14 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 244, 244, 254, 255, 258, 260, 262, 264, 276, - 279, 280, 283, 366, 369, 385, 388, 398, 405, 413, - 417, 424, 431, 453, 456, 459, 469, 477, 485, 488, - 520, 529, 536 + 0, 247, 247, 257, 258, 261, 263, 265, 267, 279, + 282, 283, 286, 369, 372, 388, 391, 401, 408, 416, + 420, 427, 434, 456, 459, 462, 472, 480, 488, 491, + 523, 532, 539 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -686,7 +707,7 @@ static const char *const yytname[] = "kSYNONYM", "kID", "kNUMBER", "kPERCPERC", "kBITFIELD", "kCHAR", "kSPACE", "'\\n'", "':'", "','", "'0'", "'1'", "$accept", "spec", "masks", "mask", "instrs", "instr", "bitfieldopt", "bytes", "byte", - "bit", "optargs", "args", "arg", "argcomp", 0 + "bit", "optargs", "args", "arg", "argcomp", YY_NULL }; #endif @@ -768,10 +789,10 @@ static const yytype_uint8 yytable[] = 27, 48, 37, 34, 36, 0, 46, 18 }; -#define yypact_value_is_default(yystate) \ - ((yystate) == (-35)) +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-35))) -#define yytable_value_is_error(yytable_value) \ +#define yytable_value_is_error(Yytable_value) \ YYID (0) static const yytype_int8 yycheck[] = @@ -820,62 +841,35 @@ static const yytype_uint8 yystos[] = #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) - +/* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - /* This macro is provided for backward compatibility. */ - #ifndef YY_LOCATION_PRINT # define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif /* YYLEX -- calling `yylex' with the right arguments. */ - #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else @@ -925,6 +919,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) YYSTYPE const * const yyvaluep; #endif { + FILE *yyo = yyoutput; + YYUSE (yyo); if (!yyvaluep) return; # ifdef YYPRINT @@ -936,7 +932,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) switch (yytype) { default: - break; + break; } } @@ -1176,12 +1172,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = 0; + const char *yyformat = YY_NULL; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1241,11 +1236,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, break; } yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } } } } @@ -1265,10 +1262,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, # undef YYCASE_ } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } if (*yymsg_alloc < yysize) { @@ -1328,32 +1327,27 @@ yydestruct (yymsg, yytype, yyvaluep) { default: - break; + break; } } -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ /* The lookahead symbol. */ int yychar; + +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + /* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; +YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); /* Number of syntax errors so far. */ int yynerrs; @@ -1393,7 +1387,7 @@ yyparse () `yyss': related to states. `yyvs': related to semantic values. - Refer to the stacks thru separate pointers, to allow yyoverflow + Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -1411,7 +1405,7 @@ yyparse () int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ - int yytoken; + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; @@ -1429,9 +1423,8 @@ yyparse () Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1440,14 +1433,6 @@ yyparse () yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. @@ -1588,7 +1573,9 @@ yybackup: yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; @@ -1625,9 +1612,8 @@ yyreduce: switch (yyn) { case 2: - -/* Line 1806 of yacc.c */ -#line 245 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 248 "/home/mark/src/elfutils/libcpu/i386_parse.y" { if (error_message_count != 0) error (EXIT_FAILURE, 0, @@ -1638,30 +1624,26 @@ yyreduce: break; case 5: - -/* Line 1806 of yacc.c */ -#line 259 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 262 "/home/mark/src/elfutils/libcpu/i386_parse.y" { new_bitfield ((yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].num)); } break; case 6: - -/* Line 1806 of yacc.c */ -#line 261 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 264 "/home/mark/src/elfutils/libcpu/i386_parse.y" { new_bitfield ((yyvsp[(2) - (2)].str), -1); } break; case 7: - -/* Line 1806 of yacc.c */ -#line 263 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 266 "/home/mark/src/elfutils/libcpu/i386_parse.y" { new_bitfield ((yyvsp[(2) - (2)].str), -2); } break; case 8: - -/* Line 1806 of yacc.c */ -#line 265 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 268 "/home/mark/src/elfutils/libcpu/i386_parse.y" { struct synonym *newp = xmalloc (sizeof (*newp)); newp->from = (yyvsp[(2) - (3)].str); @@ -1676,9 +1658,8 @@ yyreduce: break; case 12: - -/* Line 1806 of yacc.c */ -#line 284 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 287 "/home/mark/src/elfutils/libcpu/i386_parse.y" { if ((yyvsp[(3) - (6)].field) != NULL && strcmp ((yyvsp[(3) - (6)].field)->name, "RE") != 0 && strcmp ((yyvsp[(3) - (6)].field)->name, "R") != 0) @@ -1764,9 +1745,8 @@ yyreduce: break; case 14: - -/* Line 1806 of yacc.c */ -#line 370 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 373 "/home/mark/src/elfutils/libcpu/i386_parse.y" { struct known_bitfield search; search.name = (yyvsp[(1) - (1)].str); @@ -1784,16 +1764,14 @@ yyreduce: break; case 15: - -/* Line 1806 of yacc.c */ -#line 385 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 388 "/home/mark/src/elfutils/libcpu/i386_parse.y" { (yyval.field) = NULL; } break; case 16: - -/* Line 1806 of yacc.c */ -#line 389 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 392 "/home/mark/src/elfutils/libcpu/i386_parse.y" { check_bits ((yyvsp[(3) - (3)].bit)); @@ -1806,9 +1784,8 @@ yyreduce: break; case 17: - -/* Line 1806 of yacc.c */ -#line 399 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 402 "/home/mark/src/elfutils/libcpu/i386_parse.y" { check_bits ((yyvsp[(1) - (1)].bit)); (yyval.bit) = (yyvsp[(1) - (1)].bit); @@ -1816,9 +1793,8 @@ yyreduce: break; case 18: - -/* Line 1806 of yacc.c */ -#line 406 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 409 "/home/mark/src/elfutils/libcpu/i386_parse.y" { struct bitvalue *runp = (yyvsp[(1) - (2)].bit); while (runp->next != NULL) @@ -1829,16 +1805,14 @@ yyreduce: break; case 19: - -/* Line 1806 of yacc.c */ -#line 414 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 417 "/home/mark/src/elfutils/libcpu/i386_parse.y" { (yyval.bit) = (yyvsp[(1) - (1)].bit); } break; case 20: - -/* Line 1806 of yacc.c */ -#line 418 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 421 "/home/mark/src/elfutils/libcpu/i386_parse.y" { (yyval.bit) = xmalloc (sizeof (struct bitvalue)); (yyval.bit)->type = zeroone; @@ -1848,9 +1822,8 @@ yyreduce: break; case 21: - -/* Line 1806 of yacc.c */ -#line 425 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 428 "/home/mark/src/elfutils/libcpu/i386_parse.y" { (yyval.bit) = xmalloc (sizeof (struct bitvalue)); (yyval.bit)->type = zeroone; @@ -1860,9 +1833,8 @@ yyreduce: break; case 22: - -/* Line 1806 of yacc.c */ -#line 432 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 435 "/home/mark/src/elfutils/libcpu/i386_parse.y" { (yyval.bit) = xmalloc (sizeof (struct bitvalue)); struct known_bitfield search; @@ -1885,23 +1857,20 @@ yyreduce: break; case 23: - -/* Line 1806 of yacc.c */ -#line 454 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 457 "/home/mark/src/elfutils/libcpu/i386_parse.y" { (yyval.arg) = (yyvsp[(2) - (2)].arg); } break; case 24: - -/* Line 1806 of yacc.c */ -#line 456 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 459 "/home/mark/src/elfutils/libcpu/i386_parse.y" { (yyval.arg) = NULL; } break; case 25: - -/* Line 1806 of yacc.c */ -#line 460 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 463 "/home/mark/src/elfutils/libcpu/i386_parse.y" { struct argument *runp = (yyvsp[(1) - (3)].arg); while (runp->next != NULL) @@ -1914,9 +1883,8 @@ yyreduce: break; case 26: - -/* Line 1806 of yacc.c */ -#line 470 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 473 "/home/mark/src/elfutils/libcpu/i386_parse.y" { (yyval.arg) = xmalloc (sizeof (struct argument)); (yyval.arg)->name = combine ((yyvsp[(1) - (1)].name)); @@ -1925,9 +1893,8 @@ yyreduce: break; case 27: - -/* Line 1806 of yacc.c */ -#line 478 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 481 "/home/mark/src/elfutils/libcpu/i386_parse.y" { struct argname *runp = (yyvsp[(1) - (2)].name); while (runp->next != NULL) @@ -1938,16 +1905,14 @@ yyreduce: break; case 28: - -/* Line 1806 of yacc.c */ -#line 486 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 489 "/home/mark/src/elfutils/libcpu/i386_parse.y" { (yyval.name) = (yyvsp[(1) - (1)].name); } break; case 29: - -/* Line 1806 of yacc.c */ -#line 489 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 492 "/home/mark/src/elfutils/libcpu/i386_parse.y" { (yyval.name) = xmalloc (sizeof (struct argname)); (yyval.name)->type = nfield; @@ -1982,9 +1947,8 @@ yyreduce: break; case 30: - -/* Line 1806 of yacc.c */ -#line 521 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 524 "/home/mark/src/elfutils/libcpu/i386_parse.y" { (yyval.name) = xmalloc (sizeof (struct argname)); (yyval.name)->type = string; @@ -1996,9 +1960,8 @@ yyreduce: break; case 31: - -/* Line 1806 of yacc.c */ -#line 530 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 533 "/home/mark/src/elfutils/libcpu/i386_parse.y" { (yyval.name) = xmalloc (sizeof (struct argname)); (yyval.name)->type = string; @@ -2008,9 +1971,8 @@ yyreduce: break; case 32: - -/* Line 1806 of yacc.c */ -#line 537 "i386_parse.y" +/* Line 1792 of yacc.c */ +#line 540 "/home/mark/src/elfutils/libcpu/i386_parse.y" { (yyval.name) = xmalloc (sizeof (struct argname)); (yyval.name)->type = string; @@ -2022,9 +1984,8 @@ yyreduce: break; - -/* Line 1806 of yacc.c */ -#line 2028 "i386_parse.c" +/* Line 1792 of yacc.c */ +#line 1989 "i386_parse.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2187,7 +2148,9 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ @@ -2211,7 +2174,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2253,9 +2216,8 @@ yyreturn: } - -/* Line 2067 of yacc.c */ -#line 547 "i386_parse.y" +/* Line 2055 of yacc.c */ +#line 550 "/home/mark/src/elfutils/libcpu/i386_parse.y" static void @@ -3394,4 +3356,3 @@ create_mnemonic_table (void) } } #endif - diff --git a/src/libcpu/i386_parse.h b/src/libcpu/i386_parse.h index a9486e32..320e2da9 100644 --- a/src/libcpu/i386_parse.h +++ b/src/libcpu/i386_parse.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 2.7. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,6 +30,15 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ +#ifndef YY_I386_I_PARSE_H_INCLUDED +# define YY_I386_I_PARSE_H_INCLUDED +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int i386_debug; +#endif /* Tokens. */ #ifndef YYTOKENTYPE @@ -63,13 +72,11 @@ - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { - -/* Line 2068 of yacc.c */ -#line 214 "i386_parse.y" +/* Line 2058 of yacc.c */ +#line 217 "/home/mark/src/elfutils/libcpu/i386_parse.y" unsigned long int num; char *str; @@ -80,9 +87,8 @@ typedef union YYSTYPE struct argument *arg; - -/* Line 2068 of yacc.c */ -#line 86 "i386_parse.h" +/* Line 2058 of yacc.c */ +#line 92 "i386_parse.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -91,4 +97,18 @@ typedef union YYSTYPE extern YYSTYPE i386_lval; +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int i386_parse (void *YYPARSE_PARAM); +#else +int i386_parse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int i386_parse (void); +#else +int i386_parse (); +#endif +#endif /* ! YYPARSE_PARAM */ +#endif /* !YY_I386_I_PARSE_H_INCLUDED */ diff --git a/src/libcpu/i386_parse.y b/src/libcpu/i386_parse.y index bea0e335..689ba222 100644 --- a/src/libcpu/i386_parse.y +++ b/src/libcpu/i386_parse.y @@ -3,26 +3,29 @@ Copyright (C) 2004, 2005, 2007, 2008, 2009 Red Hat, Inc. Written by Ulrich Drepper <drepper@redhat.com>, 2004. - Red Hat elfutils 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; version 2 of the License. + This file is free software; you can redistribute it and/or modify + it under the terms of either - Red Hat elfutils is distributed in the hope that it will be useful, but + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. - - Red Hat elfutils is an included package of the Open Invention Network. - An included package of the Open Invention Network is a package for which - Open Invention Network licensees cross-license their patents. No patent - license is granted, either expressly or impliedly, by designation as an - included package. Should you wish to participate in the Open Invention - Network licensing program, please visit www.openinventionnetwork.com - <http://www.openinventionnetwork.com>. */ + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see <http://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H # include <config.h> diff --git a/src/libcpu/memory-access.h b/src/libcpu/memory-access.h index c68eb4a0..44210e2f 100644 --- a/src/libcpu/memory-access.h +++ b/src/libcpu/memory-access.h @@ -2,26 +2,29 @@ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2008 Red Hat, Inc. Written by Ulrich Drepper <drepper@redhat.com>, 2001. - Red Hat elfutils 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; version 2 of the License. + This file is free software; you can redistribute it and/or modify + it under the terms of either - Red Hat elfutils is distributed in the hope that it will be useful, but + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. - - Red Hat elfutils is an included package of the Open Invention Network. - An included package of the Open Invention Network is a package for which - Open Invention Network licensees cross-license their patents. No patent - license is granted, either expressly or impliedly, by designation as an - included package. Should you wish to participate in the Open Invention - Network licensing program, please visit www.openinventionnetwork.com - <http://www.openinventionnetwork.com>. */ + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see <http://www.gnu.org/licenses/>. */ #ifndef _MEMORY_ACCESS_H #define _MEMORY_ACCESS_H 1 diff --git a/src/libcpu/x86_64_disasm.c b/src/libcpu/x86_64_disasm.c index b793b78d..947bc94e 100644 --- a/src/libcpu/x86_64_disasm.c +++ b/src/libcpu/x86_64_disasm.c @@ -1,28 +1,31 @@ /* Disassembler for x86-64. Copyright (C) 2007, 2008 Red Hat, Inc. - This file is part of Red Hat elfutils. + This file is part of elfutils. Written by Ulrich Drepper <drepper@redhat.com>, 2007. - Red Hat elfutils 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; version 2 of the License. + This file is free software; you can redistribute it and/or modify + it under the terms of either - Red Hat elfutils is distributed in the hope that it will be useful, but + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. - - Red Hat elfutils is an included package of the Open Invention Network. - An included package of the Open Invention Network is a package for which - Open Invention Network licensees cross-license their patents. No patent - license is granted, either expressly or impliedly, by designation as an - included package. Should you wish to participate in the Open Invention - Network licensing program, please visit www.openinventionnetwork.com - <http://www.openinventionnetwork.com>. */ + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see <http://www.gnu.org/licenses/>. */ #define i386_disasm x86_64_disasm #define DISFILE "x86_64_dis.h" |