Verified Commit 7c6c18e9 authored by Stephen Kitt's avatar Stephen Kitt

Merge tag 'upstream/1.1.3'

Upstream version 1.1.3
parents 677f0627 b972fcf5
......@@ -13,3 +13,8 @@
- 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.
23.09.2016 (1.1.2)
- hsdis - License changed to LGPL 2.1
18.10.2016 (1.1.3)
- bug fix in tests (https://github.com/swojtasiak/fcml-lib/pull/3)
......@@ -17,7 +17,6 @@ EXTRA_DIST = win32/dist.bat \
win32/vs2008/fcml/examples/hsdis/resource.h \
win32/vs2008/fcml/examples/hsdis/hsdis.vcproj \
win32/vs2008/fcml/examples/hsdis/targetver.h \
win32/vs2008/fcml/examples/hsdis/COPYING \
win32/vs2010/fcml/fcml-check/fcml-check.vcxproj \
win32/vs2010/fcml/fcml-check/fcml-check.vcxproj.filters \
win32/vs2010/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj \
......@@ -37,7 +36,6 @@ EXTRA_DIST = win32/dist.bat \
win32/vs2010/fcml/examples/hsdis/hsdis.vcxproj \
win32/vs2010/fcml/examples/hsdis/hsdis.vcxproj.filters \
win32/vs2010/fcml/examples/hsdis/targetver.h \
win32/vs2010/fcml/examples/hsdis/COPYING \
win32/vs2013/fcml/fcml-check/fcml-check.vcxproj \
win32/vs2013/fcml/fcml-check/fcml-check.vcxproj.filters \
win32/vs2013/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj \
......@@ -57,7 +55,25 @@ EXTRA_DIST = win32/dist.bat \
win32/vs2013/fcml/examples/hsdis/hsdis.vcxproj \
win32/vs2013/fcml/examples/hsdis/hsdis.vcxproj.filters \
win32/vs2013/fcml/examples/hsdis/targetver.h \
win32/vs2013/fcml/examples/hsdis/COPYING
win32/vs2015/fcml/examples/hsdis/dllmain.cpp \
win32/vs2015/fcml/examples/hsdis/hsdis.def \
win32/vs2015/fcml/examples/hsdis/hsdis.rc \
win32/vs2015/fcml/examples/hsdis/hsdis.vcxproj \
win32/vs2015/fcml/examples/hsdis/hsdis.vcxproj.filters \
win32/vs2015/fcml/examples/hsdis/resource.h \
win32/vs2015/fcml/examples/hsdis/targetver.h \
win32/vs2015/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj \
win32/vs2015/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj.filters \
win32/vs2015/fcml/fcml-check/fcml-check.vcxproj \
win32/vs2015/fcml/fcml-check/fcml-check.vcxproj.filters \
win32/vs2015/fcml/fcml.sln \
win32/vs2015/fcml/fcml/dllmain.c \
win32/vs2015/fcml/fcml/fcml.def \
win32/vs2015/fcml/fcml/fcml.rc \
win32/vs2015/fcml/fcml/fcml.vcxproj \
win32/vs2015/fcml/fcml/fcml.vcxproj.filters \
win32/vs2015/fcml/fcml/resource.h \
win32/vs2015/fcml/fcml/resource1.h
if HAVE_DOXYGEN
DOXYDIR = docs/doxygen
......
......@@ -350,7 +350,6 @@ EXTRA_DIST = win32/dist.bat \
win32/vs2008/fcml/examples/hsdis/resource.h \
win32/vs2008/fcml/examples/hsdis/hsdis.vcproj \
win32/vs2008/fcml/examples/hsdis/targetver.h \
win32/vs2008/fcml/examples/hsdis/COPYING \
win32/vs2010/fcml/fcml-check/fcml-check.vcxproj \
win32/vs2010/fcml/fcml-check/fcml-check.vcxproj.filters \
win32/vs2010/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj \
......@@ -370,7 +369,6 @@ EXTRA_DIST = win32/dist.bat \
win32/vs2010/fcml/examples/hsdis/hsdis.vcxproj \
win32/vs2010/fcml/examples/hsdis/hsdis.vcxproj.filters \
win32/vs2010/fcml/examples/hsdis/targetver.h \
win32/vs2010/fcml/examples/hsdis/COPYING \
win32/vs2013/fcml/fcml-check/fcml-check.vcxproj \
win32/vs2013/fcml/fcml-check/fcml-check.vcxproj.filters \
win32/vs2013/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj \
......@@ -390,7 +388,25 @@ EXTRA_DIST = win32/dist.bat \
win32/vs2013/fcml/examples/hsdis/hsdis.vcxproj \
win32/vs2013/fcml/examples/hsdis/hsdis.vcxproj.filters \
win32/vs2013/fcml/examples/hsdis/targetver.h \
win32/vs2013/fcml/examples/hsdis/COPYING
win32/vs2015/fcml/examples/hsdis/dllmain.cpp \
win32/vs2015/fcml/examples/hsdis/hsdis.def \
win32/vs2015/fcml/examples/hsdis/hsdis.rc \
win32/vs2015/fcml/examples/hsdis/hsdis.vcxproj \
win32/vs2015/fcml/examples/hsdis/hsdis.vcxproj.filters \
win32/vs2015/fcml/examples/hsdis/resource.h \
win32/vs2015/fcml/examples/hsdis/targetver.h \
win32/vs2015/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj \
win32/vs2015/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj.filters \
win32/vs2015/fcml/fcml-check/fcml-check.vcxproj \
win32/vs2015/fcml/fcml-check/fcml-check.vcxproj.filters \
win32/vs2015/fcml/fcml.sln \
win32/vs2015/fcml/fcml/dllmain.c \
win32/vs2015/fcml/fcml/fcml.def \
win32/vs2015/fcml/fcml/fcml.rc \
win32/vs2015/fcml/fcml/fcml.vcxproj \
win32/vs2015/fcml/fcml/fcml.vcxproj.filters \
win32/vs2015/fcml/fcml/resource.h \
win32/vs2015/fcml/fcml/resource1.h
@HAVE_DOXYGEN_TRUE@DOXYDIR = docs/doxygen
SUBDIRS = include src check example $(DOXYDIR)
......
......@@ -46,6 +46,7 @@ void fcml_tf_symbols_alloc() {
fcml_stf_test_case fctl_ti_symbols[] = {
{ "fcml_tf_symbols_alloc", fcml_tf_symbols_alloc },
FCML_STF_NULL_TEST
};
fcml_stf_test_suite fctl_si_symbols = {
......
......@@ -27,6 +27,7 @@
#include <fcml_intel_dialect.h>
#include <fcml_renderer.h>
#include <fcml_parser.h>
#include <fcml_types.h>
fcml_st_assembler *assembler_intel;
fcml_st_disassembler *disassembler_intel;
......@@ -396,7 +397,7 @@ fcml_bool fcml_fn_ts_instruction_test( fcml_uint8_t *code, fcml_int size, fcml_e
if( j > 0 ) {
printf(", ");
}
printf( "0x"FCML_PRI_INT8_HEX, assembled_code[i][j] );
printf( "0x" FCML_PRI_INT8_HEX, assembled_code[i][j] );
}
printf( " )" );
}
......@@ -406,7 +407,7 @@ fcml_bool fcml_fn_ts_instruction_test( fcml_uint8_t *code, fcml_int size, fcml_e
if( i > 0 ) {
printf(", ");
}
printf( "0x"FCML_PRI_INT8_HEX, assembled_code[0][i] );
printf( "0x" FCML_PRI_INT8_HEX, assembled_code[0][i] );
}
}
......
......@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2015 Free Software Foundation, Inc.
timestamp='2015-03-04'
timestamp='2015-12-14'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
......@@ -221,7 +221,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
release='-gnu'
;;
*)
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
......@@ -249,6 +249,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:Sortix:*:*)
echo ${UNAME_MACHINE}-unknown-sortix
exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
......@@ -962,6 +965,9 @@ EOF
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
k1om:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
......@@ -1049,7 +1055,7 @@ EOF
X86_64_ABI=x32
fi
fi
echo x86_64-unknown-linux-gnu${X86_64_ABI}
echo ${UNAME_MACHINE}-pc-linux-${LIBC}${X86_64_ABI}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
......@@ -1128,7 +1134,7 @@ EOF
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
......@@ -1398,6 +1404,9 @@ EOF
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
esac
cat >&2 <<EOF
......
......@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2015 Free Software Foundation, Inc.
timestamp='2015-03-04'
timestamp='2015-12-14'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
......@@ -53,8 +53,7 @@ timestamp='2015-03-04'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
$0 [OPTION] ALIAS
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
......@@ -255,6 +254,7 @@ case $basic_machine in
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| ba \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
......@@ -305,7 +305,7 @@ case $basic_machine in
| riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
......@@ -376,6 +376,7 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
......@@ -428,12 +429,13 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
| riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
......@@ -518,6 +520,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-aros
;;
asmjs)
basic_machine=asmjs-unknown
;;
aux)
basic_machine=m68k-apple
os=-aux
......@@ -1391,7 +1396,7 @@ case $os in
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
......@@ -1411,7 +1416,8 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
| -onefs* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for fcml 1.1.1.
# Generated by GNU Autoconf 2.69 for fcml 1.1.3.
#
# Report bugs to <bugs@fcml-lib.com>.
#
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='fcml'
PACKAGE_TARNAME='fcml'
PACKAGE_VERSION='1.1.1'
PACKAGE_STRING='fcml 1.1.1'
PACKAGE_VERSION='1.1.3'
PACKAGE_STRING='fcml 1.1.3'
PACKAGE_BUGREPORT='bugs@fcml-lib.com'
PACKAGE_URL=''
......@@ -1342,7 +1342,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures fcml 1.1.1 to adapt to many kinds of systems.
\`configure' configures fcml 1.1.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1412,7 +1412,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of fcml 1.1.1:";;
short | recursive ) echo "Configuration of fcml 1.1.3:";;
esac
cat <<\_ACEOF
......@@ -1533,7 +1533,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
fcml configure 1.1.1
fcml configure 1.1.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2207,7 +2207,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by fcml $as_me 1.1.1, which was
It was created by fcml $as_me 1.1.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -3070,7 +3070,7 @@ fi
# Define the identity of the package.
PACKAGE='fcml'
VERSION='1.1.1'
VERSION='1.1.3'
cat >>confdefs.h <<_ACEOF
......@@ -18651,7 +18651,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by fcml $as_me 1.1.1, which was
This file was extended by fcml $as_me 1.1.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -18717,7 +18717,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
fcml config.status 1.1.1
fcml config.status 1.1.3
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
......@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([fcml], [1.1.1], [bugs@fcml-lib.com])
AC_INIT([fcml], [1.1.3], [bugs@fcml-lib.com])
AM_INIT_AUTOMAKE
LT_PREREQ([2.2])
LT_INIT[win32-dll]
......
......@@ -3,5 +3,4 @@ SUBDIRS = fcml-asm fcml-disasm
EXTRA_DIST = hsdis/hsdis.c \
hsdis/hsdis.h \
hsdis/Makefile.am \
hsdis/Makefile.in \
hsdis/COPYING
hsdis/Makefile.in
......@@ -314,8 +314,7 @@ SUBDIRS = fcml-asm fcml-disasm
EXTRA_DIST = hsdis/hsdis.c \
hsdis/hsdis.h \
hsdis/Makefile.am \
hsdis/Makefile.in \
hsdis/COPYING
hsdis/Makefile.in
all: all-recursive
......
This diff is collapsed.
......@@ -214,7 +214,7 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp COPYING
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
......
/**
/*
* FCML - Free Code Manipulation Library.
* Copyright (C) 2014-2015 Slawomir Wojtasiak
* Copyright (C) 2010-2016 Slawomir Wojtasiak
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* This library 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.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <fcml_types.h>
......
/**
/*
* FCML - Free Code Manipulation Library.
* Copyright (C) 2014-2015 Slawomir Wojtasiak
* Copyright (C) 2010-2016 Slawomir Wojtasiak
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* This library 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.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef FCML_HSDIS_H_
......
......@@ -216,7 +216,7 @@ public:
* @since 1.1.0
*/
fcml_usize getSize() const {
return _assembledInstructions.size();
return static_cast<fcml_usize>(_assembledInstructions.size());
}
/**
......
......@@ -70,7 +70,7 @@ public:
* @since 1.1.0
*/
fcml_usize getSize() const {
return _assembledInstructions.size();
return static_cast<fcml_usize>(_assembledInstructions.size());
}
/**
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* A Bison parser, made by GNU Bison 2.7.12-4996. */
/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-2015 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
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
......@@ -26,13 +26,13 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_GAS_Y_TAB_H_INCLUDED
# define YY_GAS_Y_TAB_H_INCLUDED
/* Enabling traces. */
#ifndef YY_GAS_FCML_GAS_PARSER_DEF_H_INCLUDED
# define YY_GAS_FCML_GAS_PARSER_DEF_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
......@@ -40,26 +40,25 @@
extern int gas_debug;
#endif
/* Tokens. */
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
FCML_TK_UNEXPECTED = 258,
FCML_TK_REG_GPR = 259,
FCML_TK_REG_SIMD = 260,
FCML_TK_REG_FPU = 261,
FCML_TK_REG_SEG = 262,
FCML_TK_REG_CR = 263,
FCML_TK_REG_DR = 264,
FCML_TK_REG_RIP = 265,
FCML_TK_INTEGER = 266,
FCML_TK_SYMBOL = 267,
FCML_TK_PREFIX = 268,
FCML_TK_PO_BYTE = 269,
FCML_OP_UMINUS = 270
};
enum yytokentype
{
FCML_TK_UNEXPECTED = 258,
FCML_TK_REG_GPR = 259,
FCML_TK_REG_SIMD = 260,
FCML_TK_REG_FPU = 261,
FCML_TK_REG_SEG = 262,
FCML_TK_REG_CR = 263,
FCML_TK_REG_DR = 264,
FCML_TK_REG_RIP = 265,
FCML_TK_INTEGER = 266,
FCML_TK_SYMBOL = 267,
FCML_TK_PREFIX = 268,
FCML_TK_PO_BYTE = 269,
FCML_OP_UMINUS = 270
};
#endif
/* Tokens. */
#define FCML_TK_UNEXPECTED 258
......@@ -76,13 +75,12 @@ extern int gas_debug;
#define FCML_TK_PO_BYTE 269
#define FCML_OP_UMINUS 270
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
union YYSTYPE
{
/* Line 2053 of yacc.c */
#line 97 "fcml_gas_parser_def.y"
#line 97 "fcml_gas_parser_def.y" /* yacc.c:1909 */
/*Complex values.*/
fcml_st_ast_val_integer integer_value;
......@@ -95,28 +93,16 @@ typedef union YYSTYPE
fcml_hints hints;
fcml_prefixes prefixes;
#line 97 "fcml_gas_parser_def.h" /* yacc.c:1909 */
};
/* Line 2053 of yacc.c */
#line 101 "fcml_gas_parser_def.h"
} YYSTYPE;
typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int gas_parse (void *YYPARSE_PARAM);
#else
int gas_parse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int gas_parse (struct fcml_st_parser_data *pd);
#else
int gas_parse ();
#endif
#endif /* ! YYPARSE_PARAM */
#endif /* !YY_GAS_Y_TAB_H_INCLUDED */
#endif /* !YY_GAS_FCML_GAS_PARSER_DEF_H_INCLUDED */
......@@ -19,7 +19,8 @@
%define api.pure
%parse-param { struct fcml_st_parser_data *pd }
%name-prefix="gas_"
%lex-param { yyscan_t yyscanner }
%name-prefix "gas_"
%{
#include <stdio.h>
......@@ -90,7 +91,6 @@
/* Printers goes here. */
%printer { YYFPRINTF(yyoutput, "Integer: %ld Overflow: %d", $$.value, $$.overflow); } <integer_value>
%printer { YYFPRINTF(yyoutput, "Float: %f Overflow: %d", $$.value, $$.overflow); } <float_value>
%printer { YYFPRINTF(yyoutput, "AST-Type: %d", $$->type); } <ast>
%printer { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( $$.type ), $$.size, $$.reg, $$.x64_exp); } <reg_value>
......@@ -109,7 +109,7 @@
%{
#include "fcml_gas_lexer.h"
#define YYLEX_PARAM ((yyscan_t)pd->scannerInfo)
#define yyscanner ((yyscan_t)pd->scannerInfo)
%}
%initial-action {
......
This diff is collapsed.
/* A Bison parser, made by GNU Bison 2.7.12-4996. */
/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-2015 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
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
......@@ -26,13 +26,13 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_INTEL_Y_TAB_H_INCLUDED
# define YY_INTEL_Y_TAB_H_INCLUDED
/* Enabling traces. */
#ifndef YY_INTEL_FCML_INTEL_PARSER_DEF_H_INCLUDED
# define YY_INTEL_FCML_INTEL_PARSER_DEF_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
......@@ -40,30 +40,29 @@
extern int intel_debug;
#endif
/* Tokens. */
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
FCML_TK_UNEXPECTED = 258,
FCML_TK_REG_GPR = 259,
FCML_TK_REG_SIMD = 260,
FCML_TK_REG_FPU = 261,
FCML_TK_REG_SEG = 262,
FCML_TK_REG_CR = 263,
FCML_TK_REG_DR = 264,
FCML_TK_REG_RIP = 265,
FCML_TK_INTEGER = 266,
FCML_TK_FLOAT = 267,
FCML_TK_SIZE_OPERATOR = 268,
FCML_TK_SYMBOL = 269,
FCML_TK_HINTS = 270,
FCML_TK_EAO_HINTS = 271,
FCML_TK_SIB_HINT = 272,
FCML_TK_PREFIX = 273,
FCML_OP_UMINUS = 274
};
enum yytokentype
{
FCML_TK_UNEXPECTED = 258,
FCML_TK_REG_GPR = 259,
FCML_TK_REG_SIMD = 260,
FCML_TK_REG_FPU = 261,
FCML_TK_REG_SEG = 262,
FCML_TK_REG_CR = 263,
FCML_TK_REG_DR = 264,
FCML_TK_REG_RIP = 265,
FCML_TK_INTEGER = 266,
FCML_TK_FLOAT = 267,
FCML_TK_SIZE_OPERATOR = 268,
FCML_TK_SYMBOL = 269,
FCML_TK_HINTS = 270,
FCML_TK_EAO_HINTS = 271,
FCML_TK_SIB_HINT = 272,
FCML_TK_PREFIX = 273,
FCML_OP_UMINUS = 274
};
#endif
/* Tokens. */
#define FCML_TK_UNEXPECTED 258
......@@ -84,13 +83,12 @@ extern int intel_debug;
#define FCML_TK_PREFIX 273
#define FCML_OP_UMINUS 274