Verified Commit 2de912ab authored by Stephen Kitt's avatar Stephen Kitt

Merge tag 'upstream/1.1.1'

Upstream version 1.1.1
parents 36772e7b f7d770ce
......@@ -8,4 +8,8 @@
- 'dist' build targed has been fixed.
- pkg-config support.
- Lexer generated using newer version of flex.
\ No newline at end of file
04.08.2015 (1.1.1)
- Bug fix #1 - FCML-based HSDIS crashes when used with WinPerfAsmProfiler
- Some minor build related changes
- Internal unit tests have been disabled for MinGW and Cygwin builds.
- \DEBUG option has been added to hsdis (Debug) for VS2013 project.
# Makefile.in generated by automake 1.13.4 from Makefile.am.
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -14,7 +14,17 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
......@@ -78,11 +88,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in COPYING compile config.guess config.sub \
depcomp install-sh missing ylwrap ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
......@@ -90,6 +95,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
......@@ -153,6 +160,9 @@ ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = include src check example docs/doxygen
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \
COPYING ChangeLog INSTALL NEWS README compile config.guess \
config.sub depcomp install-sh ltmain.sh missing ylwrap
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
......@@ -244,6 +254,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
......@@ -402,7 +413,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......@@ -423,8 +433,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
config.h: stamp-h1
@if test ! -f $@; then rm -f stamp-h1; else :; fi
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
@test -f $@ || rm -f stamp-h1
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
......@@ -633,10 +643,16 @@ dist-xz: distdir
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
......@@ -671,16 +687,17 @@ distcheck: dist
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_inst
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
&& $(am__cd) $(distdir)/_build/sub \
&& ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
......@@ -857,6 +874,8 @@ uninstall-am:
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
.PRECIOUS: Makefile
# 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.
......
This diff is collapsed.
......@@ -2,5 +2,8 @@
if CPP_WRAPPER
CPPDIR = cpp-tests
endif
if ENABLE_INTERNAL_TESTS
INTERNAL_TESTS_DIR = internal-tests
endif
SUBDIRS = stf internal-tests public-tests $(CPPDIR)
SUBDIRS = stf $(INTERNAL_TESTS_DIR) public-tests $(CPPDIR)
# Makefile.in generated by automake 1.13.4 from Makefile.am.
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -14,7 +14,17 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
......@@ -78,7 +88,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = check
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
......@@ -86,6 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
......@@ -145,6 +155,7 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = stf internal-tests public-tests cpp-tests
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
......@@ -220,6 +231,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
......@@ -299,7 +311,8 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@CPP_WRAPPER_TRUE@CPPDIR = cpp-tests
SUBDIRS = stf internal-tests public-tests $(CPPDIR)
@ENABLE_INTERNAL_TESTS_TRUE@INTERNAL_TESTS_DIR = internal-tests
SUBDIRS = stf $(INTERNAL_TESTS_DIR) public-tests $(CPPDIR)
all: all-recursive
.SUFFIXES:
......@@ -315,7 +328,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu check/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu check/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......@@ -610,6 +622,8 @@ uninstall-am:
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile
# 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.
......
# Makefile.in generated by automake 1.13.4 from Makefile.am.
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -15,7 +15,17 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
......@@ -81,8 +91,6 @@ host_triplet = @host@
noinst_PROGRAMS = fcml_cpp_check$(EXEEXT)
TESTS = $(am__EXEEXT_1)
subdir = check/cpp-tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp $(top_srcdir)/test-driver
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
......@@ -90,6 +98,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
......@@ -392,6 +401,8 @@ TEST_LOGS = $(am__test_logs2:.test.log=.log)
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
$(TEST_LOG_FLAGS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
$(top_srcdir)/test-driver
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
......@@ -442,6 +453,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
......@@ -555,7 +567,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu check/cpp-tests/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu check/cpp-tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......@@ -808,7 +819,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
if test -n "$$am__remaking_logs"; then \
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
"recursion detected" >&2; \
else \
elif test -n "$$redo_logs"; then \
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
fi; \
if $(am__make_dryrun); then :; else \
......@@ -1097,6 +1108,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
recheck tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile
# 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.
......
......@@ -30,85 +30,9 @@ fcml_internal_check_SOURCES = main.c \
symbols_t.h \
symbols_t.c
# Include all tested units directly to the executable.
nodist_fcml_internal_check_SOURCES = ../../src/fcml_intel_lexer.h \
../../src/fcml_intel_lexer.c \
../../src/fcml_gas_lexer.h \
../../src/fcml_gas_lexer.c \
../../src/fcml_intel_parser_def.h \
../../src/fcml_intel_parser_def.c \
../../src/fcml_gas_parser_def.h \
../../src/fcml_gas_parser_def.c \
../../src/fcml_apc_ast.c \
../../src/fcml_apc_ast.h \
../../src/fcml_assembler.c \
../../src/fcml_ceh.c \
../../src/fcml_ceh.h \
../../src/fcml_choosers.c \
../../src/fcml_coll.c \
../../src/fcml_coll.h \
../../src/fcml_common_dialect.c \
../../src/fcml_common_dialect.h \
../../src/fcml_common_lex.h \
../../src/fcml_common_utils.c \
../../src/fcml_debug.h \
../../src/fcml_decoding_tree.c \
../../src/fcml_decoding_tree.h \
../../src/fcml_def.c \
../../src/fcml_def_enc.c \
../../src/fcml_def.h \
../../src/fcml_dialect.c \
../../src/fcml_dialect_int.c \
../../src/fcml_dialect_int.h \
../../src/fcml_disassembler.c \
../../src/fcml_encoding.c \
../../src/fcml_encoding.h \
../../src/fcml_env_int.c \
../../src/fcml_env_int.h \
../../src/fcml_gas_dialect.c \
../../src/fcml_gas_parser.c \
../../src/fcml_gas_parser.h \
../../src/fcml_gas_rend.c \
../../src/fcml_gas_rend.h \
../../src/fcml_hints.c \
../../src/fcml_hints.h \
../../src/fcml_intel_dialect.c \
../../src/fcml_intel_parser.c \
../../src/fcml_intel_parser.h \
../../src/fcml_intel_rend.c \
../../src/fcml_intel_rend.h \
../../src/fcml_messages.c \
../../src/fcml_messages.h \
../../src/fcml_mnemonic_parser.c \
../../src/fcml_mnemonic_parser.h \
../../src/fcml_modrm_decoder.c \
../../src/fcml_modrm_decoder.h \
../../src/fcml_modrm_encoder.c \
../../src/fcml_modrm_encoder.h \
../../src/fcml_modrm.h \
../../src/fcml_optimizers.c \
../../src/fcml_parser.c \
../../src/fcml_parser_data.h \
../../src/fcml_parser_utils.c \
../../src/fcml_parser_utils.h \
../../src/fcml_parser_int.c \
../../src/fcml_parser_int.h \
../../src/fcml_renderer.c \
../../src/fcml_rend_utils.c \
../../src/fcml_rend_utils.h \
../../src/fcml_stream.c \
../../src/fcml_trace.h \
../../src/fcml_utils.c \
../../src/fcml_utils.h \
../../src/fcml_stream.h \
../../src/fcml_lag_assembler.h \
../../src/fcml_lag_assembler.c \
../../src/fcml_symbols.c
fcml_internal_check_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/check/stf
fcml_internal_check_LDADD = $(top_srcdir)/check/stf/libstf.la
fcml_internal_check_LDADD = $(top_srcdir)/check/stf/libstf.la $(top_srcdir)/src/libfcml.la
check_SCRIPTS = fcml_internal_check
......
This source diff could not be displayed because it is too large. You can view the blob instead.
# Makefile.in generated by automake 1.13.4 from Makefile.am.
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -15,7 +15,17 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
......@@ -81,8 +91,6 @@ host_triplet = @host@
noinst_PROGRAMS = fcml_public_check$(EXEEXT)
TESTS = $(am__EXEEXT_1)
subdir = check/public-tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp $(top_srcdir)/test-driver
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
......@@ -90,6 +98,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
......@@ -400,6 +409,8 @@ TEST_LOGS = $(am__test_logs2:.test.log=.log)
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
$(TEST_LOG_FLAGS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
$(top_srcdir)/test-driver
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
......@@ -450,6 +461,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
......@@ -613,7 +625,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu check/public-tests/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu check/public-tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......@@ -690,14 +701,14 @@ distclean-compile:
@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@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@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@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
......@@ -1256,7 +1267,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
if test -n "$$am__remaking_logs"; then \
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
"recursion detected" >&2; \
else \
elif test -n "$$redo_logs"; then \
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
fi; \
if $(am__make_dryrun); then :; else \
......@@ -1545,6 +1556,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
recheck tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile
# 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.
......
......@@ -25,92 +25,111 @@
/* Test suite initialization. */
fcml_bool fcml_tf_disassembler_suite_init(void) {
return FCML_TRUE;
return FCML_TRUE;
}
fcml_bool fcml_tf_disassembler_suite_cleanup(void) {
return FCML_TRUE;
return FCML_TRUE;
}
/* Tests. */
struct fcml_st_td_code_sample {
fcml_uint8_t *code;
fcml_size len;
};
fcml_uint8_t td_sample_instruction_1[] = {0x48, 0x66, 0xFF, 0x57, 0x01};
fcml_uint8_t td_sample_instruction_2[] = {0x0F};
struct fcml_st_td_code_sample fcml_td_code_samples[] = {
{td_sample_instruction_1, sizeof(td_sample_instruction_1)},
{td_sample_instruction_2, sizeof(td_sample_instruction_2)},
{NULL, 0}
};
void fcml_tf_disassembler_no_instruction_found(void) {
fcml_uint8_t code[] = { 0x48, 0x66, 0xFF, 0x57, 0x01 };
fcml_ceh_error error;
/* Initializes the Intel dialect instance. */
fcml_st_dialect *dialect;
if( ( error = fcml_fn_dialect_init_intel( FCML_INTEL_DIALECT_CF_DEFAULT, &dialect ) ) ) {
STF_FAIL("Can not initialize Dialect.");
return;
}
/* Initializes disassembler for the Intel dialect. */
fcml_st_disassembler *disassembler;
if( ( error = fcml_fn_disassembler_init( dialect, &disassembler ) ) ) {
STF_FAIL("Can not initialize Intel.");
fcml_fn_dialect_free( dialect );
return;
}
/* Prepares disassembler result. */
fcml_st_disassembler_result dis_result;
fcml_fn_disassembler_result_prepare( &dis_result );
/* Disassembles the code. */
fcml_st_disassembler_context context = {0};
context.disassembler = disassembler;
context.configuration.fail_if_unknown_instruction = FCML_FALSE;
context.entry_point.ip = 0x401000;
context.entry_point.op_mode = FCML_OM_64_BIT;
context.code = code;
context.code_length = sizeof( code );
if( ( error = fcml_fn_disassemble( &context, &dis_result ) ) ) {
STF_FAIL("Disassembling failed.");
fcml_fn_disassembler_free( disassembler );
fcml_fn_dialect_free( dialect );
return;
}
STF_ASSERT_EQUAL( 1, dis_result.instruction.operands_count );
STF_ASSERT_EQUAL( FCML_OT_IMMEDIATE, dis_result.instruction.operands[0].type );
STF_ASSERT_EQUAL( FCML_DS_8, dis_result.instruction.operands[0].immediate.size );
STF_ASSERT_EQUAL( 0x48, dis_result.instruction.operands[0].immediate.int8 );
STF_ASSERT_EQUAL( FCML_FALSE, dis_result.instruction.operands[0].immediate.is_signed );
STF_ASSERT_EQUAL( FCML_OT_IMMEDIATE, dis_result.instruction.operands[0].type );
STF_ASSERT_EQUAL( FP_DB, dis_result.instruction_details.pseudo_op );
STF_ASSERT_EQUAL( FCML_FALSE, dis_result.instruction.is_conditional );
STF_ASSERT_EQUAL( 0, dis_result.instruction.hints );
STF_ASSERT_EQUAL( 0, dis_result.instruction.prefixes );
STF_ASSERT_EQUAL( 0, dis_result.instruction_details.addr_mode );
STF_ASSERT_EQUAL( 0, dis_result.instruction_details.instruction );
STF_ASSERT_EQUAL( 1, dis_result.instruction_details.instruction_size );
STF_ASSERT_EQUAL( FCML_FALSE, dis_result.instruction_details.is_shortcut );
STF_ASSERT_EQUAL( FCML_FALSE, dis_result.instruction_details.modrm_details.is_modrm );
STF_ASSERT_EQUAL( FCML_FALSE, dis_result.instruction_details.modrm_details.is_rip );
STF_ASSERT_EQUAL( 0x00, dis_result.instruction_details.modrm_details.modrm );
STF_ASSERT_EQUAL( FCML_FALSE, dis_result.instruction_details.modrm_details.sib.is_not_null );
STF_ASSERT_EQUAL( 0x00, dis_result.instruction_details.opcode_field_s_bit );
STF_ASSERT_EQUAL( 0x00, dis_result.instruction_details.opcode_field_w_bit );
STF_ASSERT_EQUAL( 0, dis_result.instruction_details.prefixes_details.prefixes_count );
STF_ASSERT_STRING_EQUAL( "db", dis_result.instruction.mnemonic );
STF_ASSERT_EQUAL( F_UNKNOWN, dis_result.instruction_details.instruction );
/* Free everything. */
fcml_fn_disassembler_result_free( &dis_result );
fcml_fn_disassembler_free( disassembler );
fcml_fn_dialect_free( dialect );
struct fcml_st_td_code_sample *code = &fcml_td_code_samples[0];
while(code->code) {
fcml_ceh_error error;
/* Initializes the Intel dialect instance. */
fcml_st_dialect *dialect;
if( ( error = fcml_fn_dialect_init_intel( FCML_INTEL_DIALECT_CF_DEFAULT, &dialect ) ) ) {
STF_FAIL("Can not initialize Dialect.");
return;
}
/* Initializes disassembler for the Intel dialect. */
fcml_st_disassembler *disassembler;
if( ( error = fcml_fn_disassembler_init( dialect, &disassembler ) ) ) {
STF_FAIL("Can not initialize Intel.");
fcml_fn_dialect_free( dialect );
return;
}
/* Prepares disassembler result. */
fcml_st_disassembler_result dis_result;
fcml_fn_disassembler_result_prepare( &dis_result );
/* Disassembles the code. */
fcml_st_disassembler_context context = {0};
context.disassembler = disassembler;
context.configuration.fail_if_unknown_instruction = FCML_FALSE;
context.entry_point.ip = 0x401000;
context.entry_point.op_mode = FCML_OM_64_BIT;
context.code = code->code;
context.code_length = code->len;
if( ( error = fcml_fn_disassemble( &context, &dis_result ) ) ) {
STF_FAIL("Disassembling failed.");
fcml_fn_disassembler_free( disassembler );
fcml_fn_dialect_free( dialect );
return;
}
STF_ASSERT_EQUAL( 1, dis_result.instruction.operands_count );
STF_ASSERT_EQUAL( FCML_OT_IMMEDIATE, dis_result.instruction.operands[0].type );
STF_ASSERT_EQUAL( FCML_DS_8, dis_result.instruction.operands[0].immediate.size );
STF_ASSERT_EQUAL( code->code[0], dis_result.instruction.operands[0].immediate.int8 );
STF_ASSERT_EQUAL( FCML_FALSE, dis_result.instruction.operands[0].immediate.is_signed );
STF_ASSERT_EQUAL( FCML_OT_IMMEDIATE, dis_result.instruction.operands[0].type );
STF_ASSERT_EQUAL( FP_DB, dis_result.instruction_details.pseudo_op );
STF_ASSERT_EQUAL( FCML_FALSE, dis_result.instruction.is_conditional );
STF_ASSERT_EQUAL( 0, dis_result.instruction.hints );
STF_ASSERT_EQUAL( 0, dis_result.instruction.prefixes );
STF_ASSERT_EQUAL( 0, dis_result.instruction_details.addr_mode );
STF_ASSERT_EQUAL( 0, dis_result.instruction_details.instruction );
STF_ASSERT_EQUAL( 1, dis_result.instruction_details.instruction_size );
STF_ASSERT_EQUAL( FCML_FALSE, dis_result.instruction_details.is_shortcut );
STF_ASSERT_EQUAL( FCML_FALSE, dis_result.instruction_details.modrm_details.is_modrm );
STF_ASSERT_EQUAL( FCML_FALSE, dis_result.instruction_details.modrm_details.is_rip );
STF_ASSERT_EQUAL( 0x00, dis_result.instruction_details.modrm_details.modrm );
STF_ASSERT_EQUAL( FCML_FALSE, dis_result.instruction_details.modrm_details.sib.is_not_null );
STF_ASSERT_EQUAL( 0x00, dis_result.instruction_details.opcode_field_s_bit );
STF_ASSERT_EQUAL( 0x00, dis_result.instruction_details.opcode_field_w_bit );
STF_ASSERT_EQUAL( 0, dis_result.instruction_details.prefixes_details.prefixes_count );
STF_ASSERT_STRING_EQUAL( "db", dis_result.instruction.mnemonic );
STF_ASSERT_EQUAL( F_UNKNOWN, dis_result.instruction_details.instruction );
/* Free everything. */
fcml_fn_disassembler_result_free( &dis_result );
fcml_fn_disassembler_free( disassembler );
fcml_fn_dialect_free( dialect );
code++;
}
}
fcml_stf_test_case fcml_ti_disassembler[] = {
{ "fcml_tf_disassembler_no_instruction_found", fcml_tf_disassembler_no_instruction_found },
FCML_STF_NULL_TEST
{ "fcml_tf_disassembler_no_instruction_found", fcml_tf_disassembler_no_instruction_found },
FCML_STF_NULL_TEST
};
fcml_stf_test_suite fcml_si_disassembler = {
"suite-fcml-disassembler", fcml_tf_disassembler_suite_init, fcml_tf_disassembler_suite_cleanup, fcml_ti_disassembler
"suite-fcml-disassembler", fcml_tf_disassembler_suite_init, fcml_tf_disassembler_suite_cleanup, fcml_ti_disassembler
};
# Makefile.in generated by automake 1.13.4 from Makefile.am.
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -15,7 +15,17 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
......@@ -79,8 +89,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = check/stf
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
......@@ -88,6 +96,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/configure.ac